update onboarding; add missing safe areas

This commit is contained in:
Fabian Freund
2026-03-17 08:46:09 +01:00
parent 79b68f137e
commit 25f4d27f0d
49 changed files with 3938 additions and 2430 deletions
@@ -23,6 +23,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:weblibre/features/settings/presentation/controllers/save_settings.dart';
import 'package:weblibre/features/user/data/models/general_settings.dart';
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
import 'package:weblibre/presentation/widgets/browser_page.dart';
class AiConfigurationPage extends HookConsumerWidget {
const AiConfigurationPage({super.key});
@@ -37,71 +38,77 @@ class AiConfigurationPage extends HookConsumerWidget {
),
);
return ListView(
children: [
const SizedBox(height: 24),
Center(
child: Text('AI Features', style: theme.textTheme.headlineMedium),
),
const SizedBox(height: 24),
SwitchListTile.adaptive(
title: const Text('On Device AI'),
subtitle: const Text(
'Local on-device features including container topic and tab suggestions',
),
secondary: const Icon(MdiIcons.creation),
value: enableLocalAiFeatures,
onChanged: (value) async {
await ref
.read(saveGeneralSettingsControllerProvider.notifier)
.save(
(currentSettings) =>
currentSettings.copyWith.enableLocalAiFeatures(value),
);
},
),
Container(
width: double.infinity,
padding: const EdgeInsets.all(24.0),
margin: const EdgeInsets.symmetric(horizontal: 24, vertical: 24),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.error,
borderRadius: BorderRadius.circular(8.0),
),
child: Text.rich(
TextSpan(
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onError,
height: 1.4,
),
children: [
TextSpan(
text: 'Things to keep in mind\n\n',
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
color: Theme.of(context).colorScheme.onError,
fontWeight: FontWeight.w600,
),
),
const TextSpan(text: ''),
const TextSpan(
text:
'WebLibre uses a local AI model to analyze your open tab titles and suggest container tabs and names. All processing happens entirely on your device.\n\n',
),
const TextSpan(text: ''),
const TextSpan(
text:
'AI enhancements operate entirely within your browser, keeping all data on your device. Local AI processing respects your privacy and provides faster suggestions for container groups and names. You can control this behavior anytime through settings.\n\n',
),
const TextSpan(text: ''),
const TextSpan(
text:
'AI can sometimes make mistakes, so please review suggested group names and tab selections.',
),
],
return BrowserPage(
child: BrowserPageContent(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 24),
Center(
child: Text('AI Features', style: theme.textTheme.headlineMedium),
),
),
const SizedBox(height: 24),
SwitchListTile.adaptive(
contentPadding: EdgeInsets.zero,
title: const Text('On Device AI'),
subtitle: const Text(
'Local on-device features including container topic and tab suggestions',
),
secondary: const Icon(MdiIcons.creation),
value: enableLocalAiFeatures,
onChanged: (value) async {
await ref
.read(saveGeneralSettingsControllerProvider.notifier)
.save(
(currentSettings) =>
currentSettings.copyWith.enableLocalAiFeatures(value),
);
},
),
Container(
width: double.infinity,
padding: const EdgeInsets.all(24.0),
margin: const EdgeInsets.symmetric(vertical: 24),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.error,
borderRadius: BorderRadius.circular(8.0),
),
child: Text.rich(
TextSpan(
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onError,
height: 1.4,
),
children: [
TextSpan(
text: 'Things to keep in mind\n\n',
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
color: Theme.of(context).colorScheme.onError,
fontWeight: FontWeight.w600,
),
),
const TextSpan(text: ''),
const TextSpan(
text:
'WebLibre uses a local AI model to analyze your open tab titles and suggest container tabs and names. All processing happens entirely on your device.\n\n',
),
const TextSpan(text: ''),
const TextSpan(
text:
'AI enhancements operate entirely within your browser, keeping all data on your device. Local AI processing respects your privacy and provides faster suggestions for container groups and names. You can control this behavior anytime through settings.\n\n',
),
const TextSpan(text: ''),
const TextSpan(
text:
'AI can sometimes make mistakes, so please review suggested group names and tab selections.',
),
],
),
),
),
],
),
],
),
);
}
}