diff --git a/assets/translations/en.json b/assets/translations/en.json index 08967745..893d5884 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -197,9 +197,6 @@ "migration_done": "Finish" }, "not_ready_card": { - "begin": "Please finish application setup using ", - "insertion": "Setup Wizard", - "end": " for further work", "in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work." }, "service_page": { diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 23a388e9..a26808ed 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -197,9 +197,6 @@ "migration_done": "Завершить" }, "not_ready_card": { - "begin": "Завершите настройку приложения используя ", - "insertion": "Мастер Настройки", - "end": " для продолжения работы", "in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения." }, "service_page": { diff --git a/assets/translations/uk.json b/assets/translations/uk.json index 904932ba..00d76b50 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -299,9 +299,6 @@ "data_migration_notice": "Під час переносу всі послуги будуть вимкнені." }, "not_ready_card": { - "begin": "Будь ласка, завершіть налаштування програми ", - "insertion": "Майстер налаштувань", - "end": " Для подальшої роботи", "in_menu": "Сервер ще не налаштовано. Будь ласка, завершіть налаштування за допомогою майстра налаштування для подальшої роботи." }, "service_page": { diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/components/not_ready_card/not_ready_card.dart index e161e8d3..379abf27 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/components/not_ready_card/not_ready_card.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; -import 'package:selfprivacy/config/text_themes.dart'; +import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -9,45 +8,26 @@ class NotReadyCard extends StatelessWidget { const NotReadyCard({super.key}); @override - Widget build(final BuildContext context) => Container( - padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15), - color: BrandColors.gray6, - ), - child: RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'not_ready_card.begin'.tr(), - style: const TextStyle(color: BrandColors.white), - ), - WidgetSpan( - child: Padding( - padding: const EdgeInsets.only(bottom: 0.5), - child: GestureDetector( - onTap: () => Navigator.of(context).push( - materialRoute( - const InitializingPage(), - ), - ), - child: Text( - 'not_ready_card.insertion'.tr(), - style: body1Style.copyWith( - color: Colors.white, - fontWeight: FontWeight.bold, - decoration: TextDecoration.underline, - // height: 1.1, - ), - ), - ), + Widget build(final BuildContext context) => FilledCard( + tertiary: true, + child: ListTile( + contentPadding: + const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + onTap: () => Navigator.of(context).push( + materialRoute( + const InitializingPage(), + ), + ), + title: Text( + 'not_ready_card.in_menu'.tr(), + style: Theme.of(context).textTheme.titleSmall?.copyWith( + color: Theme.of(context).colorScheme.onTertiaryContainer, ), - ), - TextSpan( - text: 'not_ready_card.end'.tr(), - style: const TextStyle(color: BrandColors.white), - ), - ], + ), + trailing: Icon( + Icons.arrow_forward_ios_outlined, + size: 16, + color: Theme.of(context).colorScheme.onTertiaryContainer, ), ), ); diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index ee01085e..d234c984 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -72,7 +72,7 @@ class _ProvidersPageState extends State { children: [ if (!isReady) ...[ const NotReadyCard(), - const SizedBox(height: 24), + const SizedBox(height: 16), ], _Card( state: getServerStatus(),