mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-04 23:24:20 +00:00
feat: add "other" records category
This commit is contained in:
parent
e3f510c44b
commit
142249adec
|
@ -215,6 +215,8 @@
|
||||||
"services_subtitle": "Type “A” records required for each service.",
|
"services_subtitle": "Type “A” records required for each service.",
|
||||||
"email_title": "Email",
|
"email_title": "Email",
|
||||||
"email_subtitle": "Records necessary for secure email exchange.",
|
"email_subtitle": "Records necessary for secure email exchange.",
|
||||||
|
"other_title": "Other",
|
||||||
|
"other_subtitle": "Other records needed for the work of the SelfPrivacy",
|
||||||
"update_list": "Update list"
|
"update_list": "Update list"
|
||||||
},
|
},
|
||||||
"backup": {
|
"backup": {
|
||||||
|
@ -725,4 +727,4 @@
|
||||||
"server_provider_unknown": "Unknown server provider",
|
"server_provider_unknown": "Unknown server provider",
|
||||||
"server_provider_unknown_description": "Your server provider is not supported by this app version."
|
"server_provider_unknown_description": "Your server provider is not supported by this app version."
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -140,7 +140,9 @@ class DnsRecordsCubit extends ServerConnectionDependentCubit<DnsRecordsState> {
|
||||||
isSatisfied: foundMatch,
|
isSatisfied: foundMatch,
|
||||||
category: pendingDnsRecord.type == 'A'
|
category: pendingDnsRecord.type == 'A'
|
||||||
? DnsRecordsCategory.services
|
? DnsRecordsCategory.services
|
||||||
: DnsRecordsCategory.email,
|
: (pendingDnsRecord.type == 'CAA'
|
||||||
|
? DnsRecordsCategory.other
|
||||||
|
: DnsRecordsCategory.email),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,6 +198,46 @@ class _DnsDetailsPageState extends State<DnsDetailsPage> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 16.0),
|
||||||
|
ListTile(
|
||||||
|
title: Text(
|
||||||
|
'domain.other_title'.tr(),
|
||||||
|
style: Theme.of(context).textTheme.headlineSmall!.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
subtitle: Text(
|
||||||
|
'domain.other_subtitle'.tr(),
|
||||||
|
style: Theme.of(context).textTheme.labelMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
...dnsCubit.dnsRecords
|
||||||
|
.where(
|
||||||
|
(final dnsRecord) =>
|
||||||
|
dnsRecord.category == DnsRecordsCategory.other,
|
||||||
|
)
|
||||||
|
.map(
|
||||||
|
(final dnsRecord) => Column(
|
||||||
|
children: [
|
||||||
|
ListTile(
|
||||||
|
leading: Icon(
|
||||||
|
dnsRecord.isSatisfied
|
||||||
|
? Icons.check_circle_outline
|
||||||
|
: dnsCubit.dnsState == DnsRecordsStatus.refreshing
|
||||||
|
? Icons.refresh
|
||||||
|
: Icons.error_outline,
|
||||||
|
color: dnsRecord.isSatisfied
|
||||||
|
? goodColor
|
||||||
|
: dnsCubit.dnsState == DnsRecordsStatus.refreshing
|
||||||
|
? neutralColor
|
||||||
|
: errorColor,
|
||||||
|
),
|
||||||
|
title: Text(dnsRecord.displayName ?? dnsRecord.name),
|
||||||
|
subtitle: Text(dnsRecord.content),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue