Skip to content

Commit 67b41be

Browse files
authored
feat(cat-voices): back buttons in get create recovery dialog (#1120)
* feat: adding back button in recovery method panel * feat: adding back button in create your catalyst keychain dialog * chore: deleted generated files that are unnecessary
1 parent 3a04555 commit 67b41be

File tree

3 files changed

+56
-48
lines changed

3 files changed

+56
-48
lines changed

catalyst_voices/apps/voices/lib/pages/registration/create_keychain/stage/splash_panel.dart

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class SplashPanel extends StatelessWidget {
2222
child: Text(context.l10n.accountCreationSplashNextButton),
2323
onTap: () => RegistrationCubit.of(context).nextStep(),
2424
),
25+
const SizedBox(height: 10),
26+
VoicesBackButton(
27+
onTap: () => RegistrationCubit.of(context).previousStep(),
28+
),
2529
],
2630
);
2731
}

catalyst_voices/apps/voices/lib/pages/registration/recover/recover_method_panel.dart

+50-48
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,57 @@ class RecoverMethodPanel extends StatelessWidget {
1919
final colorLvl0 = theme.colors.textOnPrimaryLevel0;
2020
final colorLvl1 = theme.colors.textOnPrimaryLevel1;
2121

22-
return SingleChildScrollView(
23-
child: Column(
24-
crossAxisAlignment: CrossAxisAlignment.stretch,
25-
children: [
26-
const SizedBox(height: 24),
27-
Text(
28-
context.l10n.recoverKeychainMethodsTitle,
29-
style: theme.textTheme.titleMedium?.copyWith(color: colorLvl1),
22+
return Column(
23+
crossAxisAlignment: CrossAxisAlignment.stretch,
24+
children: [
25+
const SizedBox(height: 24),
26+
Text(
27+
context.l10n.recoverKeychainMethodsTitle,
28+
style: theme.textTheme.titleMedium?.copyWith(color: colorLvl1),
29+
),
30+
const SizedBox(height: 12),
31+
_BlocOnDeviceKeychains(onUnlockTap: _unlockKeychain),
32+
const SizedBox(height: 12),
33+
Text(
34+
context.l10n.recoverKeychainMethodsSubtitle,
35+
style: theme.textTheme.bodyMedium?.copyWith(color: colorLvl1),
36+
),
37+
const SizedBox(height: 32),
38+
Text(
39+
context.l10n.recoverKeychainMethodsListTitle,
40+
style: theme.textTheme.titleSmall?.copyWith(color: colorLvl0),
41+
),
42+
Padding(
43+
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 24),
44+
child: Column(
45+
mainAxisSize: MainAxisSize.min,
46+
children: RegistrationRecoverMethod.values
47+
.map<Widget>(
48+
(method) {
49+
return RegistrationTile(
50+
key: ValueKey(method),
51+
icon: method._icon,
52+
title: method._getTitle(context.l10n),
53+
subtitle: method._getSubtitle(context.l10n),
54+
onTap: () {
55+
switch (method) {
56+
case RegistrationRecoverMethod.seedPhrase:
57+
RegistrationCubit.of(context)
58+
.recoverWithSeedPhrase();
59+
}
60+
},
61+
);
62+
},
63+
)
64+
.separatedBy(const SizedBox(height: 12))
65+
.toList(),
3066
),
31-
const SizedBox(height: 12),
32-
_BlocOnDeviceKeychains(onUnlockTap: _unlockKeychain),
33-
const SizedBox(height: 12),
34-
Text(
35-
context.l10n.recoverKeychainMethodsSubtitle,
36-
style: theme.textTheme.bodyMedium?.copyWith(color: colorLvl1),
37-
),
38-
const SizedBox(height: 32),
39-
Text(
40-
context.l10n.recoverKeychainMethodsListTitle,
41-
style: theme.textTheme.titleSmall?.copyWith(color: colorLvl0),
42-
),
43-
Padding(
44-
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 24),
45-
child: Column(
46-
mainAxisSize: MainAxisSize.min,
47-
children: RegistrationRecoverMethod.values
48-
.map<Widget>(
49-
(method) {
50-
return RegistrationTile(
51-
key: ValueKey(method),
52-
icon: method._icon,
53-
title: method._getTitle(context.l10n),
54-
subtitle: method._getSubtitle(context.l10n),
55-
onTap: () {
56-
switch (method) {
57-
case RegistrationRecoverMethod.seedPhrase:
58-
RegistrationCubit.of(context)
59-
.recoverWithSeedPhrase();
60-
}
61-
},
62-
);
63-
},
64-
)
65-
.separatedBy(const SizedBox(height: 12))
66-
.toList(),
67-
),
68-
),
69-
],
70-
),
67+
),
68+
const Spacer(),
69+
VoicesBackButton(
70+
onTap: () => RegistrationCubit.of(context).previousStep(),
71+
),
72+
],
7173
);
7274
}
7375

catalyst_voices/apps/voices/macos/Flutter/GeneratedPluginRegistrant.swift

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import gal
1212
import irondash_engine_context
1313
import package_info_plus
1414
import path_provider_foundation
15+
import quill_native_bridge_macos
1516
import sentry_flutter
1617
import super_native_extensions
1718
import url_launcher_macos
@@ -25,6 +26,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
2526
IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin"))
2627
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
2728
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
29+
QuillNativeBridgePlugin.register(with: registry.registrar(forPlugin: "QuillNativeBridgePlugin"))
2830
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
2931
SuperNativeExtensionsPlugin.register(with: registry.registrar(forPlugin: "SuperNativeExtensionsPlugin"))
3032
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))

0 commit comments

Comments
 (0)