mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 01:21:14 +00:00
fix: Make minor improvements for deSEC
This commit is contained in:
parent
8b0d318eac
commit
73ec2687b2
|
@ -352,7 +352,9 @@ class DesecApi extends DnsProviderApi {
|
||||||
for (final DesiredDnsRecord record in desiredRecords) {
|
for (final DesiredDnsRecord record in desiredRecords) {
|
||||||
if (record.description == 'record.dkim') {
|
if (record.description == 'record.dkim') {
|
||||||
final DnsRecord foundRecord = records.firstWhere(
|
final DnsRecord foundRecord = records.firstWhere(
|
||||||
(final r) => (r.name == record.name) && r.type == record.type,
|
(final r) =>
|
||||||
|
('${r.name}.${domain.domainName}' == record.name) &&
|
||||||
|
r.type == record.type,
|
||||||
orElse: () => DnsRecord(
|
orElse: () => DnsRecord(
|
||||||
name: record.name,
|
name: record.name,
|
||||||
type: record.type,
|
type: record.type,
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:selfprivacy/config/brand_theme.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/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/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/logic/models/hive/server_domain.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/buttons/brand_button.dart';
|
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
||||||
|
@ -51,7 +52,7 @@ class _DnsProviderPickerState extends State<DnsProviderPicker> {
|
||||||
providerType: DnsProvider.cloudflare,
|
providerType: DnsProvider.cloudflare,
|
||||||
pathToHow: 'how_cloudflare',
|
pathToHow: 'how_cloudflare',
|
||||||
image: Image.asset(
|
image: Image.asset(
|
||||||
'assets/images/logos/cloudflare.png',
|
'assets/images/logos/cloudflare.svg',
|
||||||
width: 150,
|
width: 150,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -62,9 +63,9 @@ class _DnsProviderPickerState extends State<DnsProviderPicker> {
|
||||||
providerCubit: widget.formCubit,
|
providerCubit: widget.formCubit,
|
||||||
providerInfo: ProviderPageInfo(
|
providerInfo: ProviderPageInfo(
|
||||||
providerType: DnsProvider.desec,
|
providerType: DnsProvider.desec,
|
||||||
pathToHow: 'how_digital_ocean_dns',
|
pathToHow: 'how_desec',
|
||||||
image: Image.asset(
|
image: Image.asset(
|
||||||
'assets/images/logos/digital_ocean.png',
|
'assets/images/logos/desec.svg',
|
||||||
width: 150,
|
width: 150,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -100,7 +101,7 @@ class ProviderInputDataPage extends StatelessWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'initializing.connect_to_dns'.tr(),
|
'initializing.cloudflare_api_token'.tr(),
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
@ -125,22 +126,12 @@ class ProviderInputDataPage extends StatelessWidget {
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
BrandOutlinedButton(
|
BrandOutlinedButton(
|
||||||
child: Text('initializing.how'.tr()),
|
child: Text('initializing.how'.tr()),
|
||||||
onPressed: () => showModalBottomSheet<void>(
|
onPressed: () {
|
||||||
context: context,
|
context.read<SupportSystemCubit>().showArticle(
|
||||||
isScrollControlled: true,
|
article: providerInfo.pathToHow,
|
||||||
backgroundColor: Colors.transparent,
|
context: context,
|
||||||
builder: (final BuildContext context) => Padding(
|
);
|
||||||
padding: paddingH15V0,
|
},
|
||||||
child: ListView(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
||||||
children: [
|
|
||||||
BrandMarkdown(
|
|
||||||
fileName: providerInfo.pathToHow,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -186,7 +177,7 @@ class ProviderSelectionPage extends StatelessWidget {
|
||||||
padding: const EdgeInsets.all(10),
|
padding: const EdgeInsets.all(10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(40),
|
borderRadius: BorderRadius.circular(40),
|
||||||
color: const Color.fromARGB(255, 241, 215, 166),
|
color: const Color.fromARGB(255, 244, 128, 31),
|
||||||
),
|
),
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
'assets/images/logos/cloudflare.svg',
|
'assets/images/logos/cloudflare.svg',
|
||||||
|
@ -194,7 +185,7 @@ class ProviderSelectionPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
Text(
|
Text(
|
||||||
'Hetzner Cloud',
|
'Cloudflare',
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -45,9 +45,7 @@ class RecoveryServerProviderConnected extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
BrandButton.filled(
|
BrandButton.filled(
|
||||||
onPressed: formCubitState.isSubmitting
|
onPressed: () => context.read<ProviderFormCubit>().trySubmit(),
|
||||||
? null
|
|
||||||
: () => context.read<ProviderFormCubit>().trySubmit(),
|
|
||||||
child: Text('basis.continue'.tr()),
|
child: Text('basis.continue'.tr()),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
|
Loading…
Reference in a new issue