mirror of
https://github.com/immich-app/immich.git
synced 2025-01-10 05:46:46 +01:00
a9859bc029
* Added dto, logic to insert description and web implementation * create text field and update on remote database * Update description and save changes * styling * fix web test * fix server test * preserve description on metadata extraction job run * handle exif info is null situation * pr feedback * format openapi spec * update createAssetDto * refactor logic to service * move files * only owner can update description * Render description correctly in shared album * Render description correctly in shared link * disable description edit for not owner of asset on mobile * localization and clean up * fix test * Uses providers for description text (#2244) * uses providers for description text * comments * fixes initial data setting * fixes notifier --------- Co-authored-by: martyfuhry <martyfuhry@gmail.com>
52 lines
1.7 KiB
Dart
52 lines
1.7 KiB
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/modules/settings/providers/app_settings.provider.dart';
|
|
import 'package:immich_mobile/modules/settings/services/app_settings.service.dart';
|
|
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
|
|
|
class AdvancedSettings extends HookConsumerWidget {
|
|
const AdvancedSettings({super.key});
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final appSettingService = ref.watch(appSettingsServiceProvider);
|
|
final isEnabled =
|
|
useState(AppSettingsEnum.advancedTroubleshooting.defaultValue);
|
|
|
|
useEffect(
|
|
() {
|
|
isEnabled.value = appSettingService.getSetting<bool>(
|
|
AppSettingsEnum.advancedTroubleshooting,
|
|
);
|
|
return null;
|
|
},
|
|
[],
|
|
);
|
|
return ExpansionTile(
|
|
textColor: Theme.of(context).primaryColor,
|
|
title: const Text(
|
|
"advanced_settings_tile_title",
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
).tr(),
|
|
subtitle: const Text(
|
|
"advanced_settings_tile_subtitle",
|
|
style: TextStyle(
|
|
fontSize: 13,
|
|
),
|
|
).tr(),
|
|
children: [
|
|
SettingsSwitchListTile(
|
|
enabled: true,
|
|
appSettingService: appSettingService,
|
|
valueNotifier: isEnabled,
|
|
settingsEnum: AppSettingsEnum.advancedTroubleshooting,
|
|
title: "advanced_settings_troubleshooting_title".tr(),
|
|
subtitle: "advanced_settings_troubleshooting_subtitle".tr(),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|