mirror of
https://github.com/immich-app/immich.git
synced 2025-12-07 17:23:12 +03:00
Compare commits
5 Commits
refactor/r
...
feat/notif
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1233277f46 | ||
|
|
3df0a9dbf1 | ||
|
|
f936b5e292 | ||
|
|
112130c739 | ||
|
|
6e1d49fd60 |
@@ -904,6 +904,7 @@
|
||||
"enable": "Enable",
|
||||
"enable_backup": "Enable Backup",
|
||||
"enable_biometric_auth_description": "Enter your PIN code to enable biometric authentication",
|
||||
"enable_notifications": "Enable notifications",
|
||||
"enabled": "Enabled",
|
||||
"end_date": "End date",
|
||||
"enqueued": "Enqueued",
|
||||
@@ -1426,6 +1427,7 @@
|
||||
"note_apply_storage_label_to_previously_uploaded assets": "Note: To apply the Storage Label to previously uploaded assets, run the",
|
||||
"notes": "Notes",
|
||||
"nothing_here_yet": "Nothing here yet",
|
||||
"notification_backup_reliability": "Enable notifications to improve background backup reliability",
|
||||
"notification_permission_dialog_content": "To enable notifications, go to Settings and select allow.",
|
||||
"notification_permission_list_tile_content": "Grant permission to enable notifications.",
|
||||
"notification_permission_list_tile_enable_button": "Enable Notifications",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
PODS:
|
||||
- app_settings (5.1.1):
|
||||
- Flutter
|
||||
- background_downloader (0.0.1):
|
||||
- Flutter
|
||||
- bonsoir_darwin (0.0.1):
|
||||
@@ -133,6 +135,7 @@ PODS:
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- app_settings (from `.symlinks/plugins/app_settings/ios`)
|
||||
- background_downloader (from `.symlinks/plugins/background_downloader/ios`)
|
||||
- bonsoir_darwin (from `.symlinks/plugins/bonsoir_darwin/darwin`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
@@ -178,6 +181,8 @@ SPEC REPOS:
|
||||
- SwiftyGif
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
app_settings:
|
||||
:path: ".symlinks/plugins/app_settings/ios"
|
||||
background_downloader:
|
||||
:path: ".symlinks/plugins/background_downloader/ios"
|
||||
bonsoir_darwin:
|
||||
@@ -246,6 +251,7 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2
|
||||
background_downloader: 50e91d979067b82081aba359d7d916b3ba5fadad
|
||||
bonsoir_darwin: 29c7ccf356646118844721f36e1de4b61f6cbd0e
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:app_settings/app_settings.dart';
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -8,18 +9,22 @@ import 'package:immich_mobile/domain/models/album/local_album.model.dart';
|
||||
import 'package:immich_mobile/domain/models/store.model.dart';
|
||||
import 'package:immich_mobile/entities/store.entity.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/platform_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/translate_extensions.dart';
|
||||
import 'package:immich_mobile/generated/intl_keys.g.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/backup/backup_toggle_button.widget.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/providers/background_sync.provider.dart';
|
||||
import 'package:immich_mobile/providers/backup/backup_album.provider.dart';
|
||||
import 'package:immich_mobile/providers/backup/drift_backup.provider.dart';
|
||||
import 'package:immich_mobile/providers/sync_status.provider.dart';
|
||||
import 'package:immich_mobile/providers/user.provider.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/widgets/backup/backup_info_card.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||
|
||||
@RoutePage()
|
||||
@@ -112,6 +117,11 @@ class _DriftBackupPageState extends ConsumerState<DriftBackupPage> {
|
||||
icon: const Icon(Icons.arrow_back_ios_rounded),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.cloud_upload),
|
||||
onPressed: () => context.pushRoute(const DriftUploadDetailRoute()),
|
||||
tooltip: "view_details".t(context: context),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
context.pushRoute(const DriftBackupOptionsRoute());
|
||||
@@ -161,10 +171,40 @@ class _DriftBackupPageState extends ConsumerState<DriftBackupPage> {
|
||||
),
|
||||
),
|
||||
},
|
||||
TextButton.icon(
|
||||
icon: const Icon(Icons.info_outline_rounded),
|
||||
onPressed: () => context.pushRoute(const DriftUploadDetailRoute()),
|
||||
label: Text("view_details".t(context: context)),
|
||||
FutureBuilder(
|
||||
future: Permission.notification.isGranted,
|
||||
builder: (context, snapshot) {
|
||||
final isBackupEnabled = ref
|
||||
.watch(appSettingsServiceProvider)
|
||||
.getSetting(AppSettingsEnum.enableBackup);
|
||||
|
||||
final isGranted = snapshot.data ?? false;
|
||||
|
||||
if (isBackupEnabled && !isGranted && CurrentPlatform.isAndroid) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 8, bottom: 8),
|
||||
child: Column(
|
||||
spacing: 0,
|
||||
children: [
|
||||
Text(
|
||||
"notification_backup_reliability".t(),
|
||||
style: context.textTheme.bodySmall?.copyWith(
|
||||
color: context.colorScheme.onSurfaceSecondary,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
TextButton.icon(
|
||||
onPressed: () => AppSettings.openAppSettings(type: AppSettingsType.notification),
|
||||
icon: const Icon(Icons.open_in_new, size: 16),
|
||||
label: Text("enable_notifications".t()),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
],
|
||||
|
||||
@@ -33,6 +33,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
app_settings:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: app_settings
|
||||
sha256: "3e46c561441e5820d3a25339bf8b51b9e45a5f686873851a20c257a530917795"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.1"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -9,6 +9,7 @@ environment:
|
||||
flutter: 3.35.6
|
||||
|
||||
dependencies:
|
||||
app_settings: ^6.1.1
|
||||
async: ^2.13.0
|
||||
auto_route: ^9.2.0
|
||||
background_downloader: ^9.2.6
|
||||
|
||||
Reference in New Issue
Block a user