feat: UI tweaks for server costs

pull/270/head
Inex Code 2023-09-06 20:01:56 +03:00
parent d64764f4a8
commit 0984892a01
2 changed files with 116 additions and 26 deletions

View File

@ -358,9 +358,9 @@
"choose_server_type_ram": "{} GB of RAM",
"choose_server_type_storage": "{} GB of system storage",
"choose_server_type_payment_per_month": "{} per month",
"choose_server_type_payment_server": "{} for server",
"choose_server_type_payment_server": "{} for the server",
"choose_server_type_payment_storage": "{} for additional storage",
"choose_server_type_payment_ip": "{} for public IPv4",
"choose_server_type_payment_ip": "{} for the public IPv4 address",
"no_server_types_found": "No available server types found. Make sure your account is accessible and try to change your server location.",
"dns_provider_bad_key_error": "API key is invalid",
"backblaze_bad_key_error": "Backblaze storage information is invalid",

View File

@ -338,32 +338,122 @@ class SelectTypePage extends StatelessWidget {
),
],
),
Text(
'initializing.choose_server_type_payment_server'
.tr(
args: [type.price.value.toString()],
IntrinsicHeight(
child: Row(
children: [
VerticalDivider(
width: 24.0,
indent: 4.0,
endIndent: 4.0,
color: Theme.of(context)
.colorScheme
.onSurface
.withAlpha(128),
),
const SizedBox(width: 8),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [
Icon(
Icons.memory_outlined,
color: Theme.of(context)
.colorScheme
.onSurface
.withAlpha(128),
size: 16,
),
const SizedBox(width: 8),
Text(
'initializing.choose_server_type_payment_server'
.tr(
args: [
type.price.value
.toString()
],
),
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(
color: Theme.of(context)
.colorScheme
.onSurface
.withAlpha(128),
),
),
],
),
Row(
children: [
Icon(
Icons.sd_card_outlined,
color: Theme.of(context)
.colorScheme
.onSurface
.withAlpha(128),
size: 16,
),
const SizedBox(width: 8),
Text(
'initializing.choose_server_type_payment_storage'
.tr(
args: [
storagePrice.toString()
],
),
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(
color: Theme.of(context)
.colorScheme
.onSurface
.withAlpha(128),
),
),
],
),
if (publicIpPrice != 0)
Row(
children: [
Icon(
Icons.lan_outlined,
color: Theme.of(context)
.colorScheme
.onSurface
.withAlpha(128),
size: 16,
),
const SizedBox(width: 8),
Text(
'initializing.choose_server_type_payment_ip'
.tr(
args: [
publicIpPrice.toString()
],
),
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(
color: Theme.of(
context,
)
.colorScheme
.onSurface
.withAlpha(128),
),
),
],
),
],
),
],
),
style:
Theme.of(context).textTheme.bodyMedium,
),
Text(
'initializing.choose_server_type_payment_storage'
.tr(
args: [storagePrice.toString()],
),
style:
Theme.of(context).textTheme.bodyMedium,
),
if (publicIpPrice != 0)
Text(
'initializing.choose_server_type_payment_ip'
.tr(
args: [publicIpPrice.toString()],
),
style: Theme.of(context)
.textTheme
.bodyMedium,
),
],
),
),