diff --git a/assets/translations/en.json b/assets/translations/en.json index ef65c8e5..79d7231d 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -291,6 +291,8 @@ "method_select_other_device": "I have access on another device", "method_select_recovery_key": "I have a recovery key", "method_select_nothing": "I don't have any of that", + "method_device_description": "Open the application on another device, then go to the device page. Press \"Add device\" to receive your token.", + "method_device_button": "I have received my token", "fallback_select_description": "What exactly do you have? Pick the first available option:", "fallback_select_token_copy": "Copy of auth token from other version of the application.", "fallback_select_root_ssh": "Root SSH access to the server.", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 8503dc39..10f51f11 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -292,6 +292,8 @@ "method_select_other_device": "У меня есть доступ на другом устройстве", "method_select_recovery_key": "У меня есть ключ восстановления", "method_select_nothing": "У меня ничего из этого нет", + "method_device_description": "Откройте приложение на другом устройстве и откройте экран управления устройствами. Нажмите \"Добавить устройство\" чтобы получить токен для авторизации.", + "method_device_button": "Я получил токен", "fallback_select_description": "Что у вас из этого есть? Выберите первое, что подходит:", "fallback_select_token_copy": "Копия токена авторизации из другой версии приложения.", "fallback_select_root_ssh": "Root доступ к серверу по SSH.", diff --git a/lib/ui/pages/setup/recovering/recovery_method_device_1.dart b/lib/ui/pages/setup/recovering/recovery_method_device_1.dart new file mode 100644 index 00000000..dd2566ec --- /dev/null +++ b/lib/ui/pages/setup/recovering/recovery_method_device_1.dart @@ -0,0 +1,25 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:selfprivacy/ui/components/brand_button/FilledButton.dart'; +import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/utils/route_transitions/basic.dart'; +import 'package:selfprivacy/ui/pages/rootRoute.dart'; + +class RecoveryMethodDevice1 extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BrandHeroScreen( + heroTitle: "recovering.recovery_main_header".tr(), + heroSubtitle: "recovering.method_device_description".tr(), + hasBackButton: true, + hasFlashButton: false, + children: [ + FilledButton( + title: "recovering.method_device_button".tr(), + onPressed: () => + Navigator.of(context).push(materialRoute(RootPage())), + ) + ], + ); + } +} diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index d71feaa0..f94abc91 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/pages/setup/recovering/recovery_method_device_1.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:selfprivacy/ui/pages/rootRoute.dart'; @@ -22,7 +23,8 @@ class RecoveryMethodSelect extends StatelessWidget { style: Theme.of(context).textTheme.titleMedium, ), leading: Icon(Icons.offline_share_outlined), - onTap: () => Navigator.of(context).push(materialRoute(RootPage())), + onTap: () => Navigator.of(context) + .push(materialRoute(RecoveryMethodDevice1())), ), ), SizedBox(height: 16),