custom pwa and shortcut support

This commit is contained in:
Fabian Freund
2026-03-26 10:38:36 +01:00
parent b0c9d6c283
commit fe07b182ec
30 changed files with 896 additions and 69 deletions
@@ -48,6 +48,7 @@ class BrowsingSettingsScreen extends StatelessWidget {
children: const [
_TabsSection(),
_NavigationSection(),
_HomeScreenSection(),
_ExternalLinksSection(),
],
);
@@ -665,6 +666,49 @@ class _DoubleBackCloseTabTile extends HookConsumerWidget {
}
}
class _HomeScreenSection extends StatelessWidget {
const _HomeScreenSection();
@override
Widget build(BuildContext context) {
return const Column(
children: [
SettingSection(name: 'Home Screen'),
_AllowNonManifestPwaInstallTile(),
],
);
}
}
class _AllowNonManifestPwaInstallTile extends HookConsumerWidget {
const _AllowNonManifestPwaInstallTile();
@override
Widget build(BuildContext context, WidgetRef ref) {
final allowNonManifestPwaInstall = ref.watch(
generalSettingsWithDefaultsProvider
.select((s) => s.allowNonManifestPwaInstall),
);
return SwitchListTile.adaptive(
title: const Text('Install Sites as Apps'),
subtitle: const Text(
'Allow installing websites without a PWA manifest as standalone apps',
),
secondary: const Icon(Icons.add_to_home_screen),
value: allowNonManifestPwaInstall,
onChanged: (value) async {
await ref
.read(saveGeneralSettingsControllerProvider.notifier)
.save(
(currentSettings) =>
currentSettings.copyWith.allowNonManifestPwaInstall(value),
);
},
);
}
}
class _UrlCleanerSettingsTile extends StatelessWidget {
const _UrlCleanerSettingsTile();