mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: bump line length to 120 (#20191)
This commit is contained in:
parent
977c9b96ba
commit
ad65e9011a
517 changed files with 4520 additions and 9514 deletions
|
|
@ -23,13 +23,9 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final bool isSelected =
|
||||
ref.watch(backupProvider).selectedBackupAlbums.contains(album);
|
||||
final bool isExcluded =
|
||||
ref.watch(backupProvider).excludedBackupAlbums.contains(album);
|
||||
final syncAlbum = ref
|
||||
.watch(appSettingsServiceProvider)
|
||||
.getSetting(AppSettingsEnum.syncAlbums);
|
||||
final bool isSelected = ref.watch(backupProvider).selectedBackupAlbums.contains(album);
|
||||
final bool isExcluded = ref.watch(backupProvider).excludedBackupAlbums.contains(album);
|
||||
final syncAlbum = ref.watch(appSettingsServiceProvider).getSetting(AppSettingsEnum.syncAlbums);
|
||||
|
||||
final isDarkTheme = context.isDarkTheme;
|
||||
|
||||
|
|
@ -37,10 +33,8 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
context.primaryColor.withAlpha(100),
|
||||
BlendMode.darken,
|
||||
);
|
||||
ColorFilter excludedFilter =
|
||||
ColorFilter.mode(Colors.red.withAlpha(75), BlendMode.darken);
|
||||
ColorFilter unselectedFilter =
|
||||
const ColorFilter.mode(Colors.black, BlendMode.color);
|
||||
ColorFilter excludedFilter = ColorFilter.mode(Colors.red.withAlpha(75), BlendMode.darken);
|
||||
ColorFilter unselectedFilter = const ColorFilter.mode(Colors.black, BlendMode.color);
|
||||
|
||||
buildSelectedTextBox() {
|
||||
if (isSelected) {
|
||||
|
|
@ -133,9 +127,7 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
Radius.circular(12), // if you need this
|
||||
),
|
||||
side: BorderSide(
|
||||
color: isDarkTheme
|
||||
? const Color.fromARGB(255, 37, 35, 35)
|
||||
: const Color(0xFFC9C9C9),
|
||||
color: isDarkTheme ? const Color.fromARGB(255, 37, 35, 35) : const Color(0xFFC9C9C9),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
|
|
@ -190,8 +182,7 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2.0),
|
||||
child: Text(
|
||||
album.assetCount.toString() +
|
||||
(album.isAll ? " (${'all'.tr()})" : ""),
|
||||
album.assetCount.toString() + (album.isAll ? " (${'all'.tr()})" : ""),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
|
|
|
|||
|
|
@ -19,23 +19,15 @@ class AlbumInfoListTile extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final bool isSelected =
|
||||
ref.watch(backupProvider).selectedBackupAlbums.contains(album);
|
||||
final bool isExcluded =
|
||||
ref.watch(backupProvider).excludedBackupAlbums.contains(album);
|
||||
final syncAlbum = ref
|
||||
.watch(appSettingsServiceProvider)
|
||||
.getSetting(AppSettingsEnum.syncAlbums);
|
||||
final bool isSelected = ref.watch(backupProvider).selectedBackupAlbums.contains(album);
|
||||
final bool isExcluded = ref.watch(backupProvider).excludedBackupAlbums.contains(album);
|
||||
final syncAlbum = ref.watch(appSettingsServiceProvider).getSetting(AppSettingsEnum.syncAlbums);
|
||||
|
||||
buildTileColor() {
|
||||
if (isSelected) {
|
||||
return context.isDarkTheme
|
||||
? context.primaryColor.withAlpha(100)
|
||||
: context.primaryColor.withAlpha(25);
|
||||
return context.isDarkTheme ? context.primaryColor.withAlpha(100) : context.primaryColor.withAlpha(25);
|
||||
} else if (isExcluded) {
|
||||
return context.isDarkTheme
|
||||
? Colors.red[300]?.withAlpha(150)
|
||||
: Colors.red[100]?.withAlpha(150);
|
||||
return context.isDarkTheme ? Colors.red[300]?.withAlpha(150) : Colors.red[100]?.withAlpha(150);
|
||||
} else {
|
||||
return Colors.transparent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,9 +82,7 @@ class BackupAssetInfoTable extends ConsumerWidget {
|
|||
),
|
||||
).tr(
|
||||
namedArgs: {
|
||||
'date': isUploadInProgress
|
||||
? _getAssetCreationDate(asset)
|
||||
: "-",
|
||||
'date': isUploadInProgress ? _getAssetCreationDate(asset) : "-",
|
||||
},
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -22,19 +22,13 @@ class DriftAlbumInfoListTile extends HookConsumerWidget {
|
|||
final bool isSelected = album.backupSelection == BackupSelection.selected;
|
||||
final bool isExcluded = album.backupSelection == BackupSelection.excluded;
|
||||
|
||||
final syncAlbum = ref
|
||||
.watch(appSettingsServiceProvider)
|
||||
.getSetting(AppSettingsEnum.syncAlbums);
|
||||
final syncAlbum = ref.watch(appSettingsServiceProvider).getSetting(AppSettingsEnum.syncAlbums);
|
||||
|
||||
buildTileColor() {
|
||||
if (isSelected) {
|
||||
return context.isDarkTheme
|
||||
? context.primaryColor.withAlpha(100)
|
||||
: context.primaryColor.withAlpha(25);
|
||||
return context.isDarkTheme ? context.primaryColor.withAlpha(100) : context.primaryColor.withAlpha(25);
|
||||
} else if (isExcluded) {
|
||||
return context.isDarkTheme
|
||||
? Colors.red[300]?.withAlpha(150)
|
||||
: Colors.red[100]?.withAlpha(150);
|
||||
return context.isDarkTheme ? Colors.red[300]?.withAlpha(150) : Colors.red[100]?.withAlpha(150);
|
||||
} else {
|
||||
return Colors.transparent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ class BackupErrorChip extends ConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final hasErrors =
|
||||
ref.watch(errorBackupListProvider.select((value) => value.isNotEmpty));
|
||||
final hasErrors = ref.watch(errorBackupListProvider.select((value) => value.isNotEmpty));
|
||||
if (!hasErrors) {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,20 +17,17 @@ class IcloudDownloadProgressBar extends ConsumerWidget {
|
|||
|
||||
final isIcloudAsset = isManualUpload
|
||||
? ref.watch(
|
||||
manualUploadProvider
|
||||
.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
manualUploadProvider.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
)
|
||||
: ref.watch(
|
||||
backupProvider
|
||||
.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
backupProvider.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
);
|
||||
|
||||
if (!isIcloudAsset) {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
final iCloudDownloadProgress = ref
|
||||
.watch(backupProvider.select((value) => value.iCloudDownloadProgress));
|
||||
final iCloudDownloadProgress = ref.watch(backupProvider.select((value) => value.iCloudDownloadProgress));
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ class IosDebugInfoTile extends HookConsumerWidget {
|
|||
if (processes == 0) {
|
||||
title = 'ios_debug_info_no_processes_queued'.t(context: context);
|
||||
} else {
|
||||
title = 'ios_debug_info_processes_queued'
|
||||
.t(context: context, args: {'count': processes});
|
||||
title = 'ios_debug_info_processes_queued'.t(context: context, args: {'count': processes});
|
||||
}
|
||||
|
||||
final df = DateFormat.yMd().add_jm();
|
||||
|
|
@ -33,14 +32,11 @@ class IosDebugInfoTile extends HookConsumerWidget {
|
|||
if (fetch == null && processing == null) {
|
||||
subtitle = 'ios_debug_info_no_sync_yet'.t(context: context);
|
||||
} else if (fetch != null && processing == null) {
|
||||
subtitle = 'ios_debug_info_fetch_ran_at'
|
||||
.t(context: context, args: {'dateTime': df.format(fetch)});
|
||||
subtitle = 'ios_debug_info_fetch_ran_at'.t(context: context, args: {'dateTime': df.format(fetch)});
|
||||
} else if (processing != null && fetch == null) {
|
||||
subtitle = 'ios_debug_info_processing_ran_at'
|
||||
.t(context: context, args: {'dateTime': df.format(processing)});
|
||||
subtitle = 'ios_debug_info_processing_ran_at'.t(context: context, args: {'dateTime': df.format(processing)});
|
||||
} else {
|
||||
final fetchOrProcessing =
|
||||
fetch!.isAfter(processing!) ? fetch : processing;
|
||||
final fetchOrProcessing = fetch!.isAfter(processing!) ? fetch : processing;
|
||||
subtitle = 'ios_debug_info_last_sync_at'.t(
|
||||
context: context,
|
||||
args: {'dateTime': df.format(fetchOrProcessing)},
|
||||
|
|
|
|||
|
|
@ -18,12 +18,10 @@ class BackupUploadProgressBar extends ConsumerWidget {
|
|||
|
||||
final isIcloudAsset = isManualUpload
|
||||
? ref.watch(
|
||||
manualUploadProvider
|
||||
.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
manualUploadProvider.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
)
|
||||
: ref.watch(
|
||||
backupProvider
|
||||
.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
backupProvider.select((value) => value.currentUploadAsset.isIcloudAsset),
|
||||
);
|
||||
|
||||
final uploadProgress = isManualUpload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue