mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(mobile): clear local storage option (#4635)
* feat(mobile): clear local storage option * en json
This commit is contained in:
parent
e47a11b8ba
commit
aefd052888
4 changed files with 101 additions and 15 deletions
|
|
@ -82,23 +82,33 @@ class NotificationSetting extends HookConsumerWidget {
|
|||
if (!hasPermission)
|
||||
ListTile(
|
||||
leading: const Icon(Icons.notifications_outlined),
|
||||
title: const Text('notification_permission_list_tile_title').tr(),
|
||||
title: Text(
|
||||
'notification_permission_list_tile_title',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
).tr(),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text('notification_permission_list_tile_content').tr(),
|
||||
Text(
|
||||
'notification_permission_list_tile_content',
|
||||
style: Theme.of(context).textTheme.labelMedium,
|
||||
).tr(),
|
||||
const SizedBox(height: 8),
|
||||
ElevatedButton(
|
||||
onPressed: ()
|
||||
=> ref.watch(notificationPermissionProvider.notifier)
|
||||
.requestNotificationPermission().then((permission) {
|
||||
if (permission == PermissionStatus.permanentlyDenied) {
|
||||
showPermissionsDialog();
|
||||
}
|
||||
onPressed: () => ref
|
||||
.watch(notificationPermissionProvider.notifier)
|
||||
.requestNotificationPermission()
|
||||
.then((permission) {
|
||||
if (permission == PermissionStatus.permanentlyDenied) {
|
||||
showPermissionsDialog();
|
||||
}
|
||||
}),
|
||||
child:
|
||||
const Text('notification_permission_list_tile_enable_button')
|
||||
.tr(),
|
||||
child: const Text(
|
||||
'notification_permission_list_tile_enable_button',
|
||||
).tr(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -130,7 +140,8 @@ class NotificationSetting extends HookConsumerWidget {
|
|||
).tr(args: [formattedValue]),
|
||||
subtitle: Slider(
|
||||
value: sliderValue.value,
|
||||
onChanged: !hasPermission ? null : (double v) => sliderValue.value = v,
|
||||
onChanged:
|
||||
!hasPermission ? null : (double v) => sliderValue.value = v,
|
||||
onChangeEnd: (double v) => appSettingService.setSetting(
|
||||
AppSettingsEnum.uploadErrorNotificationGracePeriod,
|
||||
v.toInt(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue