Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
ux(OpenWebsite): Remove redundant 3rd step
Browse files Browse the repository at this point in the history
  • Loading branch information
iakdis committed Mar 26, 2023
1 parent becb61c commit a4c14b6
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions lib/src/pages/open_website.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,12 @@ class _OpenWebsiteState extends State<OpenWebsite> {
);
return;
}
setState(() => currentStep++);
} else {
open(sitePath: sitePath);
}
},
onStepCancel: () {
if (currentStep > 0) {
setState(() {
currentStep--;
});
setState(() => currentStep--);
}
},
controlsBuilder: (context, details) {
Expand All @@ -139,7 +135,7 @@ class _OpenWebsiteState extends State<OpenWebsite> {
children: <Widget>[
ElevatedButton(
onPressed: canContinue ? details.onStepContinue : null,
child: Text(details.stepIndex < 2
child: Text(details.stepIndex == 0
? Localization.appLocalizations().continue2
: Localization.appLocalizations().open.toUpperCase()),
),
Expand Down Expand Up @@ -234,23 +230,6 @@ class _OpenWebsiteState extends State<OpenWebsite> {
],
),
),
Step(
isActive: currentStep >= 2,
title: Text(Localization.appLocalizations().open),
content: Column(
children: [
SelectableText.rich(TextSpan(
text: Localization.appLocalizations().openHugoSite,
style: const TextStyle(fontSize: 20),
children: <TextSpan>[
TextSpan(
text: '"$sitePath"',
style: const TextStyle(fontWeight: FontWeight.w500),
),
])),
],
),
),
],
);
}
Expand Down

0 comments on commit a4c14b6

Please sign in to comment.