Restructure settings
This commit is contained in:
parent
12cb62f87a
commit
c19496e2cf
|
@ -293,16 +293,7 @@ class _ManageAccount extends HookWidget {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(L10n.of(context)!.type),
|
||||
const Text(
|
||||
'This has currently no effect on lemmur',
|
||||
style: TextStyle(fontSize: 10),
|
||||
)
|
||||
],
|
||||
),
|
||||
Text(L10n.of(context)!.type),
|
||||
RadioPicker<PostListingType>(
|
||||
values: const [
|
||||
PostListingType.all,
|
||||
|
@ -319,16 +310,7 @@ class _ManageAccount extends HookWidget {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(L10n.of(context)!.sort_type),
|
||||
const Text(
|
||||
'This has currently no effect on lemmur',
|
||||
style: TextStyle(fontSize: 10),
|
||||
)
|
||||
],
|
||||
),
|
||||
Text(L10n.of(context)!.sort_type),
|
||||
RadioPicker<SortType>(
|
||||
values: SortType.values,
|
||||
groupValue: defaultSortType.value,
|
||||
|
@ -338,30 +320,28 @@ class _ManageAccount extends HookWidget {
|
|||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
CheckboxListTile(
|
||||
SwitchListTile.adaptive(
|
||||
value: showAvatars.value,
|
||||
onChanged: (checked) {
|
||||
if (checked != null) showAvatars.value = checked;
|
||||
showAvatars.value = checked;
|
||||
},
|
||||
title: Text(L10n.of(context)!.show_avatars),
|
||||
subtitle: const Text('This has currently no effect on lemmur'),
|
||||
dense: true,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
CheckboxListTile(
|
||||
SwitchListTile.adaptive(
|
||||
value: showNsfw.value,
|
||||
onChanged: (checked) {
|
||||
if (checked != null) showNsfw.value = checked;
|
||||
showNsfw.value = checked;
|
||||
},
|
||||
title: Text(L10n.of(context)!.show_nsfw),
|
||||
subtitle: const Text('This has currently no effect on lemmur'),
|
||||
dense: true,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
CheckboxListTile(
|
||||
SwitchListTile.adaptive(
|
||||
value: sendNotificationsToEmail.value,
|
||||
onChanged: (checked) {
|
||||
if (checked != null) sendNotificationsToEmail.value = checked;
|
||||
sendNotificationsToEmail.value = checked;
|
||||
},
|
||||
title: Text(L10n.of(context)!.send_notifications_to_email),
|
||||
dense: true,
|
||||
|
|
|
@ -42,6 +42,13 @@ class SettingsPage extends StatelessWidget {
|
|||
goTo(context, (_) => const AppearanceConfigPage());
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.settings),
|
||||
title: const Text('General'),
|
||||
onTap: () {
|
||||
goTo(context, (_) => const GeneralConfigPage());
|
||||
},
|
||||
),
|
||||
const AboutTile()
|
||||
],
|
||||
),
|
||||
|
@ -57,12 +64,9 @@ class AppearanceConfigPage extends HookWidget {
|
|||
final configStore = useConfigStore();
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Appearance'),
|
||||
),
|
||||
appBar: AppBar(title: const Text('Appearance')),
|
||||
body: ListView(
|
||||
children: [
|
||||
const _SectionHeading('Theme'),
|
||||
for (final theme in ThemeMode.values)
|
||||
RadioListTile<ThemeMode>(
|
||||
value: theme,
|
||||
|
@ -79,8 +83,24 @@ class AppearanceConfigPage extends HookWidget {
|
|||
configStore.amoledDarkMode = checked;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const _SectionHeading('General'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// General settings
|
||||
class GeneralConfigPage extends HookWidget {
|
||||
const GeneralConfigPage();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final configStore = useConfigStore();
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('General')),
|
||||
body: ListView(
|
||||
children: [
|
||||
SwitchListTile.adaptive(
|
||||
title: Text(L10n.of(context)!.show_nsfw),
|
||||
value: configStore.showNsfw,
|
||||
|
|
Loading…
Reference in New Issue