-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: impl
InitializingNavigationPane
for handling pactus initializ…
…ing panel - add/create `InitializingNavigationPane` & add each `panItem` for each tabs according to figma design - add/create `NavigationPaneCubit` for handling selecting tabs index - add/create `dashboard_navigation_pane.dart` to add specific dashboard navigation panel later - add `initializingNavigationPane` & `dashboardNavigationPane` - update `registrationRoutes` - provide `NavigationPaneCubit` im `main.dart` - add some variables in arb files & generate translation files - add `navigationPanelEnableColor` & `navigationPanelDisableColor` to `AppColors`
- Loading branch information
1 parent
e43458b
commit 1d75309
Showing
21 changed files
with
404 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
lib/src/core/common/navigation_pans/dashboard_navigation_pane.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
///to-do : add navigation pans of dashboard here | ||
library; |
127 changes: 127 additions & 0 deletions
127
lib/src/core/common/navigation_pans/initializing_navigation_pane.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
import 'package:fluent_ui/fluent_ui.dart'; | ||
import 'package:flutter_bloc/flutter_bloc.dart'; | ||
import 'package:gui/src/core/common/colors/app_colors.dart'; | ||
import 'package:gui/src/core/utils/gen/localization/locale_keys.dart'; | ||
import 'package:gui/src/features/confirmation_seed/presentation/screen/confirmation_seed_page.dart'; | ||
import 'package:gui/src/features/finish/presentation/screen/finish_page.dart'; | ||
import 'package:gui/src/features/initialize_mode/presentation/screen/initialize_mode_page.dart'; | ||
import 'package:gui/src/features/initializing/presentation/screen/initializing_page.dart'; | ||
import 'package:gui/src/features/main/language/core/localization_extension.dart'; | ||
import 'package:gui/src/features/main/navigation_pan_cubit/presentation/cubits/navigation_pan_cubit.dart'; | ||
import 'package:gui/src/features/master_password/presentation/screen/master_password_page.dart'; | ||
import 'package:gui/src/features/restoration_seed/presentation/screen/restoration_seed_page.dart'; | ||
import 'package:gui/src/features/validator_config/presentation/screen/validator_config_page.dart'; | ||
|
||
class InitializingNavigationPane extends StatelessWidget { | ||
const InitializingNavigationPane({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return BlocBuilder<NavigationPaneCubit, int>( | ||
builder: (context, selectedIndex) { | ||
return NavigationView( | ||
pane: NavigationPane( | ||
displayMode: PaneDisplayMode.open, | ||
menuButton: const SizedBox(), | ||
size: const NavigationPaneSize( | ||
openMaxWidth: 209, | ||
), | ||
selected: selectedIndex, | ||
onChanged: (index) { | ||
if (index == selectedIndex + 1 || index == selectedIndex - 1) { | ||
context.read<NavigationPaneCubit>().setSelectedIndex(index); | ||
} | ||
}, | ||
indicator: const SizedBox(), | ||
items: [ | ||
PaneItem( | ||
icon: const SizedBox(), | ||
title: Text( | ||
context.tr(LocaleKeys.initialize_mode), | ||
style: TextStyle( | ||
color: selectedIndex == 0 ? | ||
AppColors.navigationPanelEnableColor : | ||
AppColors.navigationPanelDisableColor, | ||
), | ||
), | ||
body: InitializeModePage(), | ||
), | ||
PaneItem( | ||
icon: const SizedBox(), | ||
title: Text( | ||
context.tr(LocaleKeys.wallet_seed), | ||
style: TextStyle( | ||
color: selectedIndex == 1 ? | ||
AppColors.navigationPanelEnableColor : | ||
AppColors.navigationPanelDisableColor, | ||
), | ||
), | ||
body: RestorationSeedPage(), | ||
), | ||
PaneItem( | ||
icon: const SizedBox(), | ||
title: Text( | ||
context.tr(LocaleKeys.confirm_seed), | ||
style: TextStyle( | ||
color: selectedIndex == 2 ? | ||
AppColors.navigationPanelEnableColor : | ||
AppColors.navigationPanelDisableColor, | ||
), | ||
), | ||
body: ConfirmationSeedPage(), | ||
), | ||
PaneItem( | ||
icon: const SizedBox(), | ||
title: Text( | ||
context.tr(LocaleKeys.master_password), | ||
style: TextStyle( | ||
color: selectedIndex == 3 ? | ||
AppColors.navigationPanelEnableColor : | ||
AppColors.navigationPanelDisableColor, | ||
), | ||
), | ||
body: MasterPasswordPage(), | ||
), | ||
PaneItem( | ||
icon: const SizedBox(), | ||
title: Text( | ||
context.tr(LocaleKeys.validator_config), | ||
style: TextStyle( | ||
color: selectedIndex == 4 ? | ||
AppColors.navigationPanelEnableColor : | ||
AppColors.navigationPanelDisableColor, | ||
), | ||
), | ||
body: ValidatorConfigPage(), | ||
), | ||
PaneItem( | ||
icon: const SizedBox(), | ||
title: Text( | ||
context.tr(LocaleKeys.initializing), | ||
style: TextStyle( | ||
color: selectedIndex == 5 ? | ||
AppColors.navigationPanelEnableColor : | ||
AppColors.navigationPanelDisableColor, | ||
), | ||
), | ||
body: InitializingPage(), | ||
), | ||
PaneItem( | ||
icon: const SizedBox(), | ||
title: Text( | ||
context.tr(LocaleKeys.finish), | ||
style: TextStyle( | ||
color: selectedIndex == 6 ? | ||
AppColors.navigationPanelEnableColor : | ||
AppColors.navigationPanelDisableColor, | ||
), | ||
), | ||
body: FinishPage(), | ||
), | ||
], | ||
), | ||
); | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.