mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 09:31:13 +00:00
Merge pull request 'fix/inex-ui' (#193) from fix/inex-ui into master
Reviewed-on: https://git.selfprivacy.org/kherel/selfprivacy.org.app/pulls/193 Reviewed-by: NaiJi ✨ <naiji@udongein.xyz>
This commit is contained in:
commit
c4e5d44b8e
|
@ -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": {
|
||||||
|
|
|
@ -31,3 +31,7 @@ For developers:
|
||||||
- App now only uses GraphQL API to communicate with the server. All REST API calls have been removed.
|
- App now only uses GraphQL API to communicate with the server. All REST API calls have been removed.
|
||||||
- Server can now be deployed with staging ACME certificates
|
- Server can now be deployed with staging ACME certificates
|
||||||
- Language assets have been reorganized
|
- Language assets have been reorganized
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
- Added translation for Ukrainian
|
||||||
|
- Also activated unfinished translations for German, French, Spanish, Czech, Polish, Thai
|
||||||
|
|
|
@ -10,7 +10,17 @@ class Localization extends StatelessWidget {
|
||||||
final Widget? child;
|
final Widget? child;
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) => EasyLocalization(
|
Widget build(final BuildContext context) => EasyLocalization(
|
||||||
supportedLocales: const [Locale('ru'), Locale('en')],
|
supportedLocales: const [
|
||||||
|
Locale('ru'),
|
||||||
|
Locale('en'),
|
||||||
|
Locale('uk'),
|
||||||
|
Locale('de'),
|
||||||
|
Locale('fr'),
|
||||||
|
Locale('es'),
|
||||||
|
Locale('cs'),
|
||||||
|
Locale('pl'),
|
||||||
|
Locale('th'),
|
||||||
|
],
|
||||||
path: 'assets/translations',
|
path: 'assets/translations',
|
||||||
fallbackLocale: const Locale('en'),
|
fallbackLocale: const Locale('en'),
|
||||||
useFallbackTranslations: true,
|
useFallbackTranslations: true,
|
||||||
|
|
|
@ -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),
|
||||||
),
|
|
||||||
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(
|
onTap: () => Navigator.of(context).push(
|
||||||
materialRoute(
|
materialRoute(
|
||||||
const InitializingPage(),
|
const InitializingPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
title: Text(
|
||||||
'not_ready_card.insertion'.tr(),
|
'not_ready_card.in_menu'.tr(),
|
||||||
style: body1Style.copyWith(
|
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||||
color: Colors.white,
|
color: Theme.of(context).colorScheme.onTertiaryContainer,
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
// height: 1.1,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
trailing: Icon(
|
||||||
),
|
Icons.arrow_forward_ios_outlined,
|
||||||
),
|
size: 16,
|
||||||
TextSpan(
|
color: Theme.of(context).colorScheme.onTertiaryContainer,
|
||||||
text: 'not_ready_card.end'.tr(),
|
|
||||||
style: const TextStyle(color: BrandColors.white),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -21,8 +21,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) => SafeArea(
|
Widget build(final BuildContext context) => Scaffold(
|
||||||
child: Scaffold(
|
|
||||||
body: PageView(
|
body: PageView(
|
||||||
controller: pageController,
|
controller: pageController,
|
||||||
children: [
|
children: [
|
||||||
|
@ -30,7 +29,6 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||||
_withPadding(secondPage()),
|
_withPadding(secondPage()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _withPadding(final Widget child) => Padding(
|
Widget _withPadding(final Widget child) => Padding(
|
||||||
|
@ -45,7 +43,9 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||||
maxHeight: MediaQuery.of(context).size.height,
|
maxHeight: MediaQuery.of(context).size.height,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
Text(
|
Text(
|
||||||
|
@ -57,9 +57,8 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||||
'onboarding.page1_text'.tr(),
|
'onboarding.page1_text'.tr(),
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 32),
|
||||||
Flexible(
|
Center(
|
||||||
child: Center(
|
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
_fileName(
|
_fileName(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -69,6 +68,8 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
BrandButton.rised(
|
BrandButton.rised(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -90,7 +91,9 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||||
maxHeight: MediaQuery.of(context).size.height,
|
maxHeight: MediaQuery.of(context).size.height,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
Text(
|
Text(
|
||||||
|
@ -133,6 +136,9 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
BrandButton.rised(
|
BrandButton.rised(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.read<AppSettingsCubit>().turnOffOnboarding();
|
context.read<AppSettingsCubit>().turnOffOnboarding();
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
|
@ -52,8 +52,7 @@ class _RootPageState extends State<RootPage> with TickerProviderStateMixin {
|
||||||
final bool isReady = context.watch<ServerInstallationCubit>().state
|
final bool isReady = context.watch<ServerInstallationCubit>().state
|
||||||
is ServerInstallationFinished;
|
is ServerInstallationFinished;
|
||||||
|
|
||||||
return SafeArea(
|
return Provider<ChangeTab>(
|
||||||
child: Provider<ChangeTab>(
|
|
||||||
create: (final _) => ChangeTab(tabController.animateTo),
|
create: (final _) => ChangeTab(tabController.animateTo),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: TabBarView(
|
body: TabBarView(
|
||||||
|
@ -86,7 +85,6 @@ class _RootPageState extends State<RootPage> with TickerProviderStateMixin {
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ import 'package:selfprivacy/logic/models/service.dart';
|
||||||
import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart';
|
import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart';
|
||||||
import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart';
|
import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart';
|
||||||
import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart';
|
import 'package:selfprivacy/ui/pages/server_storage/binds_migration/services_migration.dart';
|
||||||
|
import 'package:selfprivacy/utils/launch_url.dart';
|
||||||
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
|
||||||
|
|
||||||
class ServicePage extends StatefulWidget {
|
class ServicePage extends StatefulWidget {
|
||||||
const ServicePage({required this.serviceId, super.key});
|
const ServicePage({required this.serviceId, super.key});
|
||||||
|
@ -59,7 +59,7 @@ class _ServicePageState extends State<ServicePage> {
|
||||||
if (service.url != null)
|
if (service.url != null)
|
||||||
ListTile(
|
ListTile(
|
||||||
iconColor: Theme.of(context).colorScheme.onBackground,
|
iconColor: Theme.of(context).colorScheme.onBackground,
|
||||||
onTap: () => _launchURL(service.url),
|
onTap: () => launchURL(service.url),
|
||||||
leading: const Icon(Icons.open_in_browser),
|
leading: const Icon(Icons.open_in_browser),
|
||||||
title: Text(
|
title: Text(
|
||||||
'service_page.open_in_browser'.tr(),
|
'service_page.open_in_browser'.tr(),
|
||||||
|
@ -232,15 +232,3 @@ class ServiceStatusCard extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _launchURL(final url) async {
|
|
||||||
try {
|
|
||||||
final Uri uri = Uri.parse(url);
|
|
||||||
await launchUrl(
|
|
||||||
uri,
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
print(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -12,9 +12,9 @@ import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart
|
||||||
import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart';
|
import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:selfprivacy/ui/pages/services/service_page.dart';
|
import 'package:selfprivacy/ui/pages/services/service_page.dart';
|
||||||
|
import 'package:selfprivacy/utils/launch_url.dart';
|
||||||
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
||||||
import 'package:selfprivacy/utils/ui_helpers.dart';
|
import 'package:selfprivacy/utils/ui_helpers.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
|
||||||
|
|
||||||
class ServicesPage extends StatefulWidget {
|
class ServicesPage extends StatefulWidget {
|
||||||
const ServicesPage({super.key});
|
const ServicesPage({super.key});
|
||||||
|
@ -23,18 +23,6 @@ class ServicesPage extends StatefulWidget {
|
||||||
State<ServicesPage> createState() => _ServicesPageState();
|
State<ServicesPage> createState() => _ServicesPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _launchURL(final url) async {
|
|
||||||
try {
|
|
||||||
final Uri uri = Uri.parse(url);
|
|
||||||
await launchUrl(
|
|
||||||
uri,
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
print(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ServicesPageState extends State<ServicesPage> {
|
class _ServicesPageState extends State<ServicesPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) {
|
Widget build(final BuildContext context) {
|
||||||
|
@ -145,7 +133,7 @@ class _Card extends StatelessWidget {
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => _launchURL(
|
onTap: () => launchURL(
|
||||||
service.url,
|
service.url,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
|
@ -67,6 +67,9 @@ class InitializingPage extends StatelessWidget {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
title: Text(
|
||||||
|
'more_page.configuration_wizard'.tr(),
|
||||||
|
),
|
||||||
bottom: PreferredSize(
|
bottom: PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(28),
|
preferredSize: const Size.fromHeight(28),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
|
@ -12,7 +12,7 @@ import 'package:selfprivacy/ui/components/brand_button/outlined_button.dart';
|
||||||
import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart';
|
import 'package:selfprivacy/ui/components/brand_cards/outlined_card.dart';
|
||||||
import 'package:selfprivacy/ui/components/brand_md/brand_md.dart';
|
import 'package:selfprivacy/ui/components/brand_md/brand_md.dart';
|
||||||
import 'package:selfprivacy/ui/components/info_box/info_box.dart';
|
import 'package:selfprivacy/ui/components/info_box/info_box.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:selfprivacy/utils/launch_url.dart';
|
||||||
|
|
||||||
class ServerProviderPicker extends StatefulWidget {
|
class ServerProviderPicker extends StatefulWidget {
|
||||||
const ServerProviderPicker({
|
const ServerProviderPicker({
|
||||||
|
@ -249,7 +249,7 @@ class ProviderSelectionPage extends StatelessWidget {
|
||||||
// Outlined button that will open website
|
// Outlined button that will open website
|
||||||
BrandOutlinedButton(
|
BrandOutlinedButton(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
_launchURL('https://www.hetzner.com/cloud'),
|
launchURL('https://www.hetzner.com/cloud'),
|
||||||
title: 'initializing.select_provider_site_button'.tr(),
|
title: 'initializing.select_provider_site_button'.tr(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -323,7 +323,7 @@ class ProviderSelectionPage extends StatelessWidget {
|
||||||
// Outlined button that will open website
|
// Outlined button that will open website
|
||||||
BrandOutlinedButton(
|
BrandOutlinedButton(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
_launchURL('https://www.digitalocean.com'),
|
launchURL('https://www.digitalocean.com'),
|
||||||
title: 'initializing.select_provider_site_button'.tr(),
|
title: 'initializing.select_provider_site_button'.tr(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -336,15 +336,3 @@ class ProviderSelectionPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _launchURL(final url) async {
|
|
||||||
try {
|
|
||||||
final Uri uri = Uri.parse(url);
|
|
||||||
await launchUrl(
|
|
||||||
uri,
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
print(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
13
lib/utils/launch_url.dart
Normal file
13
lib/utils/launch_url.dart
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
void launchURL(final url) async {
|
||||||
|
try {
|
||||||
|
final Uri uri = Uri.parse(url);
|
||||||
|
await launchUrl(
|
||||||
|
uri,
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue