add setting to block http protocol

This commit is contained in:
Fabian Freund
2024-06-25 15:43:54 +02:00
parent d2f55400aa
commit e20ed23c76
7 changed files with 56 additions and 2 deletions
@@ -214,6 +214,19 @@ class SettingsScreen extends HookConsumerWidget {
);
},
),
SwitchListTile.adaptive(
title: const Text('Block HTTP Protocol'),
subtitle: const Text(
'Prevents loading of HTTP (unsecure) content entirely. When enabled, only HTTPS (secure) is allowed.',
),
value: settings.blockHttpProtocol,
onChanged: (value) async {
await ref.read(saveSettingsControllerProvider.notifier).save(
(currentSettings) =>
currentSettings.copyWith.blockHttpProtocol(value),
);
},
),
SwitchListTile.adaptive(
title: const Text('Launch Links Externally'),
subtitle: const Text(