feat: Add DNS provider selection page

Upload cloudflare svg
pull/213/head
NaiJi ✨ 2023-01-04 14:42:22 +04:00
parent 6767b679a0
commit 2980887333
5 changed files with 25 additions and 35 deletions

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="256px" height="116px" viewBox="0 0 256 116" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
<g>
<g transform="translate(0.000000, -1.000000)">
<path d="M202.3569,50.394 L197.0459,48.27 C172.0849,104.434 72.7859,70.289 66.8109,86.997 C65.8149,98.283 121.0379,89.143 160.5169,91.056 C172.5559,91.639 178.5929,100.727 173.4809,115.54 L183.5499,115.571 C195.1649,79.362 232.2329,97.841 233.7819,85.891 C231.2369,78.034 191.1809,85.891 202.3569,50.394 Z" fill="#FFFFFF"></path>
<path d="M176.332,109.3483 C177.925,104.0373 177.394,98.7263 174.739,95.5393 C172.083,92.3523 168.365,90.2283 163.585,89.6973 L71.17,88.6343 C70.639,88.6343 70.108,88.1033 69.577,88.1033 C69.046,87.5723 69.046,87.0413 69.577,86.5103 C70.108,85.4483 70.639,84.9163 71.701,84.9163 L164.647,83.8543 C175.801,83.3233 187.486,74.2943 191.734,63.6723 L197.046,49.8633 C197.046,49.3313 197.577,48.8003 197.046,48.2693 C191.203,21.1823 166.772,0.9993 138.091,0.9993 C111.535,0.9993 88.697,17.9953 80.73,41.8963 C75.419,38.1783 69.046,36.0533 61.61,36.5853 C48.863,37.6473 38.772,48.2693 37.178,61.0163 C36.647,64.2033 37.178,67.3903 37.71,70.5763 C16.996,71.1073 0,88.1033 0,109.3483 C0,111.4723 0,113.0663 0.531,115.1903 C0.531,116.2533 1.593,116.7843 2.125,116.7843 L172.614,116.7843 C173.676,116.7843 174.739,116.2533 174.739,115.1903 L176.332,109.3483 Z" fill="#F4811F"></path>
<path d="M205.5436,49.8628 L202.8876,49.8628 C202.3566,49.8628 201.8256,50.3938 201.2946,50.9248 L197.5766,63.6718 C195.9836,68.9828 196.5146,74.2948 199.1706,77.4808 C201.8256,80.6678 205.5436,82.7918 210.3236,83.3238 L229.9756,84.3858 C230.5066,84.3858 231.0376,84.9168 231.5686,84.9168 C232.0996,85.4478 232.0996,85.9788 231.5686,86.5098 C231.0376,87.5728 230.5066,88.1038 229.4436,88.1038 L209.2616,89.1658 C198.1076,89.6968 186.4236,98.7258 182.1746,109.3478 L181.1116,114.1288 C180.5806,114.6598 181.1116,115.7218 182.1746,115.7218 L252.2826,115.7218 C253.3446,115.7218 253.8756,115.1908 253.8756,114.1288 C254.9376,109.8798 255.9996,105.0998 255.9996,100.3188 C255.9996,72.7008 233.1616,49.8628 205.5436,49.8628" fill="#FAAD3F"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -285,11 +285,13 @@
"select_provider_countries_text_hetzner": "Germany, Finland, USA",
"select_provider_countries_text_do": "USA, Netherlands, Singapore, UK, Germany, Canada, India, Australia",
"select_provider_price_title": "Average price",
"select_provider_price_free": "Free",
"select_provider_price_text_hetzner": "€8 per month for a relatively small server and 50GB of disk storage",
"select_provider_price_text_do": "$17 per month for a relatively small server and 50GB of disk storage",
"select_provider_payment_title": "Payment methods",
"select_provider_payment_text_hetzner": "Credit cards, SWIFT, SEPA, PayPal",
"select_provider_payment_text_do": "Credit cards, Google Pay, PayPal",
"select_provider_payment_text_cloudflare": "Credit cards",
"select_provider_email_notice": "E-mail hosting won't be available for new clients. Nevertheless it will be unlocked as soon as you complete your first payment.",
"select_provider_site_button": "Visit site",
"connect_to_server_provider": "Now log in ",
@ -310,7 +312,7 @@
"choose_server_type_storage": "{} GB of system storage",
"choose_server_type_payment_per_month": "{} per month",
"no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.",
"cloudflare_bad_key_error": "Cloudflare API key is invalid",
"dns_provider_bad_key_error": "API key is invalid",
"backblaze_bad_key_error": "Backblaze storage information is invalid",
"connect_to_dns": "Connect the DNS provider",
"select_dns": "Now let's select a DNS provider",

View File

@ -284,11 +284,13 @@
"select_provider_countries_text_hetzner": "Германия, Финляндия, США",
"select_provider_countries_text_do": "США, Нидерланды, Сингапур, Великобритания, Германия, Канада, Индия, Австралия",
"select_provider_price_title": "Средняя цена",
"select_provider_price_free": "Бесплатно",
"select_provider_price_text_hetzner": "€8 в месяц за небольшой сервер и 50GB места на диске",
"select_provider_price_text_do": "$17 в месяц за небольшой сервер и 50GB места на диске",
"select_provider_payment_title": "Методы оплаты",
"select_provider_payment_text_hetzner": "Банковские карты, SWIFT, SEPA, PayPal",
"select_provider_payment_text_do": "Банковские карты, Google Pay, PayPal",
"select_provider_payment_text_cloudflare": "Банковские карты",
"select_provider_email_notice": "Хостинг электронной почты недоступен для новых клиентов. Разблокировать можно будет после первой оплаты.",
"select_provider_site_button": "Посетить сайт",
"connect_to_server_provider": "Авторизоваться в ",
@ -309,7 +311,7 @@
"choose_server_type_storage": "{} GB системного хранилища",
"choose_server_type_payment_per_month": "{} в месяц",
"no_server_types_found": "Не найдено доступных типов сервера! Пожалуйста, убедитесь, что у вас есть доступ к провайдеру сервера...",
"cloudflare_bad_key_error": "Cloudflare API ключ неверен",
"dns_provider_bad_key_error": "API ключ неверен",
"backblaze_bad_key_error": "Информация о Backblaze хранилище неверна",
"connect_to_dns": "Подключите DNS провайдер",
"manage_domain_dns": "Для управления DNS вашего домена",

View File

@ -11,7 +11,6 @@ class DnsProviderFormCubit extends FormCubit {
initalValue: '',
validations: [
RequiredStringValidation('validations.required'.tr()),
LengthStringNotEqualValidation(40)
],
);
@ -43,7 +42,7 @@ class DnsProviderFormCubit extends FormCubit {
}
if (!isKeyValid) {
apiKey.setError('initializing.cloudflare_bad_key_error'.tr());
apiKey.setError('initializing.dns_provider_bad_key_error'.tr());
}
return isKeyValid;

View File

@ -164,7 +164,7 @@ class ProviderSelectionPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'initializing.connect_to_server'.tr(),
'initializing.select_dns'.tr(),
style: Theme.of(context).textTheme.headlineSmall,
),
const SizedBox(height: 10),
@ -187,10 +187,10 @@ class ProviderSelectionPage extends StatelessWidget {
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: const Color(0xFFD50C2D),
color: const Color.fromARGB(255, 241, 215, 166),
),
child: SvgPicture.asset(
'assets/images/logos/hetzner.svg',
'assets/images/logos/cloudflare.svg',
),
),
const SizedBox(width: 16),
@ -201,22 +201,12 @@ class ProviderSelectionPage extends StatelessWidget {
],
),
const SizedBox(height: 16),
Text(
'initializing.select_provider_countries_title'.tr(),
style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'initializing.select_provider_countries_text_hetzner'
.tr(),
style: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(height: 16),
Text(
'initializing.select_provider_price_title'.tr(),
style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'initializing.select_provider_price_text_hetzner'.tr(),
'initializing.select_provider_price_free'.tr(),
style: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(height: 16),
@ -225,12 +215,8 @@ class ProviderSelectionPage extends StatelessWidget {
style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'initializing.select_provider_payment_text_hetzner'.tr(),
style: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(height: 16),
Text(
'initializing.select_provider_email_notice'.tr(),
'initializing.select_provider_payment_text_cloudflare'
.tr(),
style: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(height: 16),
@ -245,7 +231,7 @@ class ProviderSelectionPage extends StatelessWidget {
// Outlined button that will open website
BrandOutlinedButton(
onPressed: () =>
launchURL('https://cloud.digitalocean.com/'),
launchURL('https://dash.cloudflare.com/'),
title: 'initializing.select_provider_site_button'.tr(),
),
],
@ -281,21 +267,12 @@ class ProviderSelectionPage extends StatelessWidget {
],
),
const SizedBox(height: 16),
Text(
'initializing.select_provider_countries_title'.tr(),
style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'initializing.select_provider_countries_text_do'.tr(),
style: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(height: 16),
Text(
'initializing.select_provider_price_title'.tr(),
style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'initializing.select_provider_price_text_do'.tr(),
'initializing.select_provider_price_free'.tr(),
style: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(height: 16),