refactor(ui): Change the styling of "Server is not ready" card

pull/193/head
Inex Code 2023-02-01 01:29:17 +03:00
parent 44553eaf85
commit 80547785d3
5 changed files with 21 additions and 50 deletions

View File

@ -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": {

View File

@ -197,9 +197,6 @@
"migration_done": "Завершить"
},
"not_ready_card": {
"begin": "Завершите настройку приложения используя ",
"insertion": "Мастер Настройки",
"end": " для продолжения работы",
"in_menu": "Сервер ещё не настроен, воспользуйтесь мастером подключения."
},
"service_page": {

View File

@ -299,9 +299,6 @@
"data_migration_notice": "Під час переносу всі послуги будуть вимкнені."
},
"not_ready_card": {
"begin": "Будь ласка, завершіть налаштування програми ",
"insertion": "Майстер налаштувань",
"end": " Для подальшої роботи",
"in_menu": "Сервер ще не налаштовано. Будь ласка, завершіть налаштування за допомогою майстра налаштування для подальшої роботи."
},
"service_page": {

View File

@ -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,
),
),
);

View File

@ -72,7 +72,7 @@ class _ProvidersPageState extends State<ProvidersPage> {
children: [
if (!isReady) ...[
const NotReadyCard(),
const SizedBox(height: 24),
const SizedBox(height: 16),
],
_Card(
state: getServerStatus(),