mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-03-11 09:14:10 +00:00
refactor(ui): Change the styling of "Server is not ready" card
This commit is contained in:
parent
44553eaf85
commit
80547785d3
5 changed files with 21 additions and 50 deletions
assets/translations
lib/ui
|
@ -197,9 +197,6 @@
|
||||||
"migration_done": "Finish"
|
"migration_done": "Finish"
|
||||||
},
|
},
|
||||||
"not_ready_card": {
|
"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."
|
"in_menu": "Server is not set up yet. Please finish setup using setup wizard for further work."
|
||||||
},
|
},
|
||||||
"service_page": {
|
"service_page": {
|
||||||
|
|
|
@ -197,9 +197,6 @@
|
||||||
"migration_done": "Завершить"
|
"migration_done": "Завершить"
|
||||||
},
|
},
|
||||||
"not_ready_card": {
|
"not_ready_card": {
|
||||||
"begin": "Завершите настройку приложения используя ",
|
|
||||||
"insertion": "Мастер Настройки",
|
|
||||||
"end": " для продолжения работы",
|
|
||||||
"in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения."
|
"in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения."
|
||||||
},
|
},
|
||||||
"service_page": {
|
"service_page": {
|
||||||
|
|
|
@ -299,9 +299,6 @@
|
||||||
"data_migration_notice": "Під час переносу всі послуги будуть вимкнені."
|
"data_migration_notice": "Під час переносу всі послуги будуть вимкнені."
|
||||||
},
|
},
|
||||||
"not_ready_card": {
|
"not_ready_card": {
|
||||||
"begin": "Будь ласка, завершіть налаштування програми ",
|
|
||||||
"insertion": "Майстер налаштувань",
|
|
||||||
"end": " Для подальшої роботи",
|
|
||||||
"in_menu": "Сервер ще не налаштовано. Будь ласка, завершіть налаштування за допомогою майстра налаштування для подальшої роботи."
|
"in_menu": "Сервер ще не налаштовано. Будь ласка, завершіть налаштування за допомогою майстра налаштування для подальшої роботи."
|
||||||
},
|
},
|
||||||
"service_page": {
|
"service_page": {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:selfprivacy/config/brand_colors.dart';
|
import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart';
|
||||||
import 'package:selfprivacy/config/text_themes.dart';
|
|
||||||
import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart';
|
import 'package:selfprivacy/ui/pages/setup/initializing/initializing.dart';
|
||||||
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
@ -9,45 +8,26 @@ class NotReadyCard extends StatelessWidget {
|
||||||
const NotReadyCard({super.key});
|
const NotReadyCard({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) => Container(
|
Widget build(final BuildContext context) => FilledCard(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10),
|
tertiary: true,
|
||||||
decoration: BoxDecoration(
|
child: ListTile(
|
||||||
borderRadius: BorderRadius.circular(15),
|
contentPadding:
|
||||||
color: BrandColors.gray6,
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
),
|
onTap: () => Navigator.of(context).push(
|
||||||
child: RichText(
|
materialRoute(
|
||||||
text: TextSpan(
|
const InitializingPage(),
|
||||||
children: [
|
),
|
||||||
TextSpan(
|
),
|
||||||
text: 'not_ready_card.begin'.tr(),
|
title: Text(
|
||||||
style: const TextStyle(color: BrandColors.white),
|
'not_ready_card.in_menu'.tr(),
|
||||||
),
|
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||||
WidgetSpan(
|
color: Theme.of(context).colorScheme.onTertiaryContainer,
|
||||||
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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
trailing: Icon(
|
||||||
text: 'not_ready_card.end'.tr(),
|
Icons.arrow_forward_ios_outlined,
|
||||||
style: const TextStyle(color: BrandColors.white),
|
size: 16,
|
||||||
),
|
color: Theme.of(context).colorScheme.onTertiaryContainer,
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -72,7 +72,7 @@ class _ProvidersPageState extends State<ProvidersPage> {
|
||||||
children: [
|
children: [
|
||||||
if (!isReady) ...[
|
if (!isReady) ...[
|
||||||
const NotReadyCard(),
|
const NotReadyCard(),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 16),
|
||||||
],
|
],
|
||||||
_Card(
|
_Card(
|
||||||
state: getServerStatus(),
|
state: getServerStatus(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue