mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
chore(mobile): minor UI tweak (#3021)
* chore(mobile): minor UI tweak * fix test * refactor
This commit is contained in:
@@ -51,31 +51,34 @@ class LayoutSettings extends HookConsumerWidget {
|
||||
children: [
|
||||
SwitchListTile.adaptive(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
title: Text(
|
||||
"asset_list_layout_settings_dynamic_layout_title",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
).tr(),
|
||||
onChanged: switchChanged,
|
||||
value: useDynamicLayout.value,
|
||||
),
|
||||
const Divider(
|
||||
indent: 18,
|
||||
endIndent: 18,
|
||||
),
|
||||
ListTile(
|
||||
title: const Text(
|
||||
"asset_list_layout_settings_group_by",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
).tr(),
|
||||
),
|
||||
RadioListTile(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
title: Text(
|
||||
"asset_list_layout_settings_group_by_month_day",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
style: Theme.of(context).textTheme.labelLarge,
|
||||
).tr(),
|
||||
value: GroupAssetsBy.day,
|
||||
groupValue: groupBy.value,
|
||||
@@ -84,11 +87,9 @@ class LayoutSettings extends HookConsumerWidget {
|
||||
),
|
||||
RadioListTile(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
title: Text(
|
||||
"asset_list_layout_settings_group_by_month",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
style: Theme.of(context).textTheme.labelLarge,
|
||||
).tr(),
|
||||
value: GroupAssetsBy.month,
|
||||
groupValue: groupBy.value,
|
||||
@@ -97,11 +98,9 @@ class LayoutSettings extends HookConsumerWidget {
|
||||
),
|
||||
RadioListTile(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
title: Text(
|
||||
"asset_list_layout_settings_group_automatically",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
style: Theme.of(context).textTheme.labelLarge,
|
||||
).tr(),
|
||||
value: GroupAssetsBy.auto,
|
||||
groupValue: groupBy.value,
|
||||
|
||||
@@ -34,11 +34,12 @@ class StorageIndicator extends HookConsumerWidget {
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
title: Text(
|
||||
"theme_setting_asset_list_storage_indicator_title",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
).tr(),
|
||||
onChanged: switchChanged,
|
||||
value: showStorageIndicator.value,
|
||||
|
||||
@@ -39,7 +39,7 @@ class TilesPerRow extends HookConsumerWidget {
|
||||
title: const Text(
|
||||
"theme_setting_asset_list_tiles_per_row_title",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
).tr(args: ["${itemsValue.value.toInt()}"]),
|
||||
|
||||
@@ -22,15 +22,21 @@ class SettingsSwitchListTile extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return SwitchListTile.adaptive(
|
||||
value: valueNotifier.value,
|
||||
onChanged: !enabled ? null : (value) {
|
||||
valueNotifier.value = value;
|
||||
appSettingService.setSetting(settingsEnum, value);
|
||||
},
|
||||
activeColor: Theme
|
||||
.of(context)
|
||||
.primaryColor,
|
||||
onChanged: !enabled
|
||||
? null
|
||||
: (value) {
|
||||
valueNotifier.value = value;
|
||||
appSettingService.setSetting(settingsEnum, value);
|
||||
},
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
dense: true,
|
||||
title: Text(title, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
title: Text(
|
||||
title,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
subtitle: subtitle != null ? Text(subtitle!) : null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -40,12 +40,12 @@ class ThemeSetting extends HookConsumerWidget {
|
||||
children: [
|
||||
SwitchListTile.adaptive(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
title: Text(
|
||||
'theme_setting_system_theme_switch',
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
).tr(),
|
||||
value: currentTheme.value == ThemeMode.system,
|
||||
onChanged: (bool isSystem) {
|
||||
@@ -78,12 +78,12 @@ class ThemeSetting extends HookConsumerWidget {
|
||||
if (currentTheme.value != ThemeMode.system)
|
||||
SwitchListTile.adaptive(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
title: Text(
|
||||
'theme_setting_dark_mode_switch',
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
).tr(),
|
||||
value: ref.watch(immichThemeProvider) == ThemeMode.dark,
|
||||
onChanged: (bool isDark) {
|
||||
|
||||
Reference in New Issue
Block a user