From d276a8f7084915708cca11a7dc2c1bf2931f69d4 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Thu, 18 May 2023 19:06:13 -0300 Subject: [PATCH] fix: Remove price lists for DNS and move deSEC onto above Cloudflare --- .../initializing/dns_provider_picker.dart | 133 ++++++++---------- 1 file changed, 56 insertions(+), 77 deletions(-) diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 7ee580a7..7e494af4 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -2,12 +2,10 @@ import 'package:cubit_form/cubit_form.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/app_config_dependent/authentication_dependend_cubit.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; @@ -163,72 +161,6 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium, ), const SizedBox(height: 10), - OutlinedCard( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - width: 40, - height: 40, - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(40), - color: const Color.fromARGB(255, 244, 128, 31), - ), - child: SvgPicture.asset( - 'assets/images/logos/cloudflare.svg', - ), - ), - const SizedBox(width: 16), - Text( - 'Cloudflare', - style: Theme.of(context).textTheme.titleMedium, - ), - ], - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_price_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_price_free'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_cloudflare' - .tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), - BrandButton.rised( - text: 'basis.select'.tr(), - onPressed: () { - serverInstallationCubit - .setDnsProviderType(DnsProvider.cloudflare); - callback(DnsProvider.cloudflare); - }, - ), - // Outlined button that will open website - BrandOutlinedButton( - onPressed: () => - launchURL('https://dash.cloudflare.com/'), - title: 'initializing.select_provider_site_button'.tr(), - ), - ], - ), - ), - ), - const SizedBox(height: 16), OutlinedCard( child: Padding( padding: const EdgeInsets.all(16.0), @@ -266,15 +198,6 @@ class ProviderSelectionPage extends StatelessWidget { style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 16), - Text( - 'initializing.select_provider_payment_title'.tr(), - style: Theme.of(context).textTheme.bodyLarge, - ), - Text( - 'initializing.select_provider_payment_text_do'.tr(), - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 16), BrandButton.rised( text: 'basis.select'.tr(), onPressed: () { @@ -292,6 +215,62 @@ class ProviderSelectionPage extends StatelessWidget { ), ), ), + const SizedBox(height: 16), + OutlinedCard( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 40, + height: 40, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + color: const Color.fromARGB(255, 244, 128, 31), + ), + child: SvgPicture.asset( + 'assets/images/logos/cloudflare.svg', + ), + ), + const SizedBox(width: 16), + Text( + 'Cloudflare', + style: Theme.of(context).textTheme.titleMedium, + ), + ], + ), + const SizedBox(height: 16), + Text( + 'initializing.select_provider_price_title'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + Text( + 'initializing.select_provider_price_free'.tr(), + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 16), + BrandButton.rised( + text: 'basis.select'.tr(), + onPressed: () { + serverInstallationCubit + .setDnsProviderType(DnsProvider.cloudflare); + callback(DnsProvider.cloudflare); + }, + ), + // Outlined button that will open website + BrandOutlinedButton( + onPressed: () => + launchURL('https://dash.cloudflare.com/'), + title: 'initializing.select_provider_site_button'.tr(), + ), + ], + ), + ), + ), ], ), );