Merge branch 'main' into tor_proxy

This commit is contained in:
Fabian Freund
2025-09-11 15:07:02 +02:00
35 changed files with 495 additions and 163 deletions
@@ -175,17 +175,22 @@ class GeneralSettingsScreen extends HookConsumerWidget {
showSelectedIcon: false,
segments: const [
ButtonSegment(
value: TabType.regular,
value: TabIntentOpenSetting.ask,
label: Text('Prompt'),
icon: Icon(MdiIcons.messageQuestion),
),
ButtonSegment(
value: TabIntentOpenSetting.regular,
label: Text('Regular'),
icon: Icon(MdiIcons.tab),
),
ButtonSegment(
value: TabType.private,
value: TabIntentOpenSetting.private,
label: Text('Private'),
icon: Icon(MdiIcons.tabUnselected),
),
],
selected: {generalSettings.defaultIntentTabType},
selected: {generalSettings.tabIntentOpenSetting},
onSelectionChanged: (value) async {
await ref
.read(
@@ -193,15 +198,16 @@ class GeneralSettingsScreen extends HookConsumerWidget {
)
.save(
(currentSettings) => currentSettings.copyWith
.defaultIntentTabType(value.first),
.tabIntentOpenSetting(value.first),
);
},
style: switch (generalSettings.defaultIntentTabType) {
TabType.regular => null,
TabType.private => SegmentedButton.styleFrom(
selectedBackgroundColor: const Color(0x648000D7),
),
TabType.child => null,
style: switch (generalSettings.tabIntentOpenSetting) {
TabIntentOpenSetting.regular => null,
TabIntentOpenSetting.private =>
SegmentedButton.styleFrom(
selectedBackgroundColor: const Color(0x648000D7),
),
TabIntentOpenSetting.ask => null,
},
),
),
@@ -47,46 +47,47 @@ class WebEngineHardeningGroupScreen extends HookConsumerWidget {
data: (group) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
color: theme.colorScheme.primaryContainer,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SwitchListTile(
value: group.isActiveOrOptional,
title: Text(
groupName,
style: TextStyle(
color: theme.colorScheme.onPrimaryContainer,
),
),
subtitle: group.description.mapNotNull(
(description) => Text(
description,
if (group.showMasterSwitch)
Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
color: theme.colorScheme.primaryContainer,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SwitchListTile(
value: group.isActiveOrOptional,
title: Text(
groupName,
style: TextStyle(
color: theme.colorScheme.onPrimaryContainer,
),
),
),
onChanged: (value) async {
final notifier = ref.read(
preferenceSettingsGroupRepositoryProvider(
PreferencePartition.user,
groupName,
).notifier,
);
subtitle: group.description.mapNotNull(
(description) => Text(
description,
style: TextStyle(
color: theme.colorScheme.onPrimaryContainer,
),
),
),
onChanged: (value) async {
final notifier = ref.read(
preferenceSettingsGroupRepositoryProvider(
PreferencePartition.user,
groupName,
).notifier,
);
if (value) {
await notifier.apply();
} else {
await notifier.reset();
}
},
if (value) {
await notifier.apply();
} else {
await notifier.reset();
}
},
),
),
),
),
),
Expanded(
child: ListView(
children: group.settings.entries.map((setting) {