forked from SelfPrivacy/selfprivacy.org.app
Minor UI fixes on recovery key pages
parent
e8d5ecccf6
commit
5909b9a3e6
|
@ -27,17 +27,14 @@ class _RecoveryKeyState extends State<RecoveryKey> {
|
|||
final keyStatus = context.watch<RecoveryKeyCubit>().state;
|
||||
|
||||
final List<Widget> widgets;
|
||||
final String? subtitle =
|
||||
String? subtitle =
|
||||
keyStatus.exists ? null : 'recovery_key.key_main_description'.tr();
|
||||
|
||||
switch (keyStatus.loadingStatus) {
|
||||
case LoadingStatus.refreshing:
|
||||
subtitle = 'recovery_key.key_synchronizing'.tr();
|
||||
widgets = [
|
||||
const Center(child: CircularProgressIndicator()),
|
||||
const SizedBox(height: 16),
|
||||
BrandText(
|
||||
'recovery_key.key_synchronizing'.tr(),
|
||||
type: TextType.h1,
|
||||
),
|
||||
];
|
||||
break;
|
||||
case LoadingStatus.success:
|
||||
|
@ -47,13 +44,9 @@ class _RecoveryKeyState extends State<RecoveryKey> {
|
|||
break;
|
||||
case LoadingStatus.uninitialized:
|
||||
case LoadingStatus.error:
|
||||
subtitle = 'recovery_key.key_connection_error'.tr();
|
||||
widgets = [
|
||||
const Icon(Icons.sentiment_dissatisfied_outlined),
|
||||
const SizedBox(height: 16),
|
||||
BrandText(
|
||||
'recovery_key.key_connection_error'.tr(),
|
||||
type: TextType.h1,
|
||||
),
|
||||
];
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_button/filled_button.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart';
|
||||
import 'package:selfprivacy/ui/pages/root_route.dart';
|
||||
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
||||
|
||||
class RecoveryKeyReceiving extends StatelessWidget {
|
||||
const RecoveryKeyReceiving({required this.recoveryKey, Key? key})
|
||||
|
@ -44,8 +42,7 @@ class RecoveryKeyReceiving extends StatelessWidget {
|
|||
FilledButton(
|
||||
title: 'recovery_key.key_receiving_done'.tr(),
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.pushReplacement(materialRoute(const RootPage()));
|
||||
Navigator.of(context).popUntil((route) => route.isFirst);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue