mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-06 16:25:15 -04:00
theming work, revamp contact invitation
This commit is contained in:
parent
3c95c9d1a3
commit
ae841ec42a
26 changed files with 504 additions and 507 deletions
|
@ -65,29 +65,49 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
),
|
||||
GoRoute(
|
||||
path: '/edit_account',
|
||||
redirect: (_, state) {
|
||||
final extra = state.extra;
|
||||
if (extra == null ||
|
||||
extra is! List<Object> ||
|
||||
extra[0] is! TypedKey) {
|
||||
return '/';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
builder: (context, state) {
|
||||
final extra = state.extra! as List<Object?>;
|
||||
final extra = state.extra! as List<Object>;
|
||||
return EditAccountPage(
|
||||
superIdentityRecordKey: extra[0]! as TypedKey,
|
||||
initialValue: extra[1]! as AccountSpec,
|
||||
accountRecord: extra[2]! as OwnedDHTRecordPointer,
|
||||
superIdentityRecordKey: extra[0] as TypedKey,
|
||||
initialValue: extra[1] as AccountSpec,
|
||||
accountRecord: extra[2] as OwnedDHTRecordPointer,
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
path: '/new_account',
|
||||
builder: (context, state) => const NewAccountPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/new_account/recovery_key',
|
||||
builder: (context, state) {
|
||||
final extra = state.extra! as List<Object?>;
|
||||
path: '/new_account',
|
||||
builder: (context, state) => const NewAccountPage(),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: 'recovery_key',
|
||||
redirect: (_, state) {
|
||||
final extra = state.extra;
|
||||
if (extra == null ||
|
||||
extra is! List<Object> ||
|
||||
extra[0] is! WritableSuperIdentity ||
|
||||
extra[1] is! String) {
|
||||
return '/';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
builder: (context, state) {
|
||||
final extra = state.extra! as List<Object>;
|
||||
|
||||
return ShowRecoveryKeyPage(
|
||||
writableSuperIdentity:
|
||||
extra[0]! as WritableSuperIdentity,
|
||||
name: extra[1]! as String);
|
||||
}),
|
||||
return ShowRecoveryKeyPage(
|
||||
writableSuperIdentity:
|
||||
extra[0] as WritableSuperIdentity,
|
||||
name: extra[1] as String);
|
||||
}),
|
||||
]),
|
||||
GoRoute(
|
||||
path: '/settings',
|
||||
builder: (context, state) => const SettingsPage(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue