mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
revert: changes...
This commit is contained in:
@@ -2022,7 +2022,6 @@
|
|||||||
"theme": "テーマ",
|
"theme": "テーマ",
|
||||||
"theme_selection": "テーマ選択",
|
"theme_selection": "テーマ選択",
|
||||||
"theme_selection_description": "ブラウザのシステム設定に基づいてテーマを明色または暗色に自動的に設定します",
|
"theme_selection_description": "ブラウザのシステム設定に基づいてテーマを明色または暗色に自動的に設定します",
|
||||||
"theme_setting_asset_list_show_owner_name_title": "アセット所有者名を表示",
|
|
||||||
"theme_setting_asset_list_storage_indicator_title": "ストレージに関する情報を表示",
|
"theme_setting_asset_list_storage_indicator_title": "ストレージに関する情報を表示",
|
||||||
"theme_setting_asset_list_tiles_per_row_title": "一行ごとの表示枚数: {count}",
|
"theme_setting_asset_list_tiles_per_row_title": "一行ごとの表示枚数: {count}",
|
||||||
"theme_setting_colorful_interface_subtitle": "アクセントカラーを背景にも使用する",
|
"theme_setting_colorful_interface_subtitle": "アクセントカラーを背景にも使用する",
|
||||||
|
|||||||
@@ -169,10 +169,6 @@ class Asset {
|
|||||||
@Enumerated(EnumType.ordinal)
|
@Enumerated(EnumType.ordinal)
|
||||||
AssetVisibilityEnum visibility;
|
AssetVisibilityEnum visibility;
|
||||||
|
|
||||||
/// Transient field for storing owner name (used in shared albums)
|
|
||||||
@ignore
|
|
||||||
String? ownerName;
|
|
||||||
|
|
||||||
/// Returns null if the asset has no sync access to the exif info
|
/// Returns null if the asset has no sync access to the exif info
|
||||||
@ignore
|
@ignore
|
||||||
double? get aspectRatio {
|
double? get aspectRatio {
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ class AlbumViewer extends HookConsumerWidget {
|
|||||||
MultiselectGrid(
|
MultiselectGrid(
|
||||||
key: const ValueKey("albumViewerMultiselectGrid"),
|
key: const ValueKey("albumViewerMultiselectGrid"),
|
||||||
renderListProvider: albumTimelineProvider(album.id),
|
renderListProvider: albumTimelineProvider(album.id),
|
||||||
album: album,
|
|
||||||
topWidget: Container(
|
topWidget: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import 'package:immich_mobile/widgets/asset_grid/asset_grid_data_structure.dart'
|
|||||||
import 'package:immich_mobile/widgets/asset_grid/immich_asset_grid_view.dart';
|
import 'package:immich_mobile/widgets/asset_grid/immich_asset_grid_view.dart';
|
||||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||||
import 'package:immich_mobile/entities/album.entity.dart';
|
|
||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
|
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
|
||||||
|
|
||||||
@@ -34,7 +33,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||||||
final bool showDragScroll;
|
final bool showDragScroll;
|
||||||
final bool showDragScrollLabel;
|
final bool showDragScrollLabel;
|
||||||
final bool showStack;
|
final bool showStack;
|
||||||
final Album? album;
|
|
||||||
|
|
||||||
const ImmichAssetGrid({
|
const ImmichAssetGrid({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -56,7 +54,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||||||
this.showDragScroll = true,
|
this.showDragScroll = true,
|
||||||
this.showDragScrollLabel = true,
|
this.showDragScrollLabel = true,
|
||||||
this.showStack = false,
|
this.showStack = false,
|
||||||
this.album,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -118,7 +115,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||||||
showDragScroll: showDragScroll,
|
showDragScroll: showDragScroll,
|
||||||
showStack: showStack,
|
showStack: showStack,
|
||||||
showLabel: showDragScrollLabel,
|
showLabel: showDragScrollLabel,
|
||||||
album: album,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ import 'package:flutter/rendering.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/entities/album.entity.dart';
|
|
||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/utils/hash.dart';
|
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/extensions/collection_extensions.dart';
|
import 'package:immich_mobile/extensions/collection_extensions.dart';
|
||||||
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
||||||
@@ -57,7 +55,6 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
|
|||||||
final bool showDragScroll;
|
final bool showDragScroll;
|
||||||
final bool showStack;
|
final bool showStack;
|
||||||
final bool showLabel;
|
final bool showLabel;
|
||||||
final Album? album;
|
|
||||||
|
|
||||||
const ImmichAssetGridView({
|
const ImmichAssetGridView({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -79,7 +76,6 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
|
|||||||
this.showDragScroll = true,
|
this.showDragScroll = true,
|
||||||
this.showStack = false,
|
this.showStack = false,
|
||||||
this.showLabel = true,
|
this.showLabel = true,
|
||||||
this.album,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -157,32 +153,6 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
|
|||||||
return widget.selectionActive && assets.firstWhereOrNull((e) => !_selectedAssets.contains(e)) == null;
|
return widget.selectionActive && assets.firstWhereOrNull((e) => !_selectedAssets.contains(e)) == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String? _getOwnerName(Asset asset) {
|
|
||||||
final album = widget.album;
|
|
||||||
if (album == null || !album.shared) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load owner and sharedUsers if not loaded
|
|
||||||
album.owner.loadSync();
|
|
||||||
album.sharedUsers.loadSync();
|
|
||||||
|
|
||||||
// Check if asset owner matches album owner
|
|
||||||
final owner = album.owner.value;
|
|
||||||
if (owner != null && asset.ownerId == fastHash(owner.id)) {
|
|
||||||
return owner.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check shared users
|
|
||||||
for (final user in album.sharedUsers) {
|
|
||||||
if (asset.ownerId == fastHash(user.id)) {
|
|
||||||
return user.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _scrollToIndex(int index) async {
|
Future<void> _scrollToIndex(int index) async {
|
||||||
// if the index is so far down, that the end of the list is reached on the screen
|
// if the index is so far down, that the end of the list is reached on the screen
|
||||||
// the scroll_position widget crashes. This is a workaround to prevent this.
|
// the scroll_position widget crashes. This is a workaround to prevent this.
|
||||||
@@ -227,7 +197,6 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
|
|||||||
ref.read(showControlsProvider.notifier).show = false;
|
ref.read(showControlsProvider.notifier).show = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getOwnerName: _getOwnerName,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +580,6 @@ class _Section extends StatelessWidget {
|
|||||||
final int heroOffset;
|
final int heroOffset;
|
||||||
final bool showStorageIndicator;
|
final bool showStorageIndicator;
|
||||||
final void Function(Asset) onAssetTap;
|
final void Function(Asset) onAssetTap;
|
||||||
final String? Function(Asset)? getOwnerName;
|
|
||||||
|
|
||||||
const _Section({
|
const _Section({
|
||||||
required this.section,
|
required this.section,
|
||||||
@@ -630,7 +598,6 @@ class _Section extends StatelessWidget {
|
|||||||
required this.heroOffset,
|
required this.heroOffset,
|
||||||
required this.showStorageIndicator,
|
required this.showStorageIndicator,
|
||||||
required this.onAssetTap,
|
required this.onAssetTap,
|
||||||
this.getOwnerName,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -684,7 +651,6 @@ class _Section extends StatelessWidget {
|
|||||||
onSelect: (asset) => selectAssets([asset]),
|
onSelect: (asset) => selectAssets([asset]),
|
||||||
onDeselect: (asset) => deselectAssets([asset]),
|
onDeselect: (asset) => deselectAssets([asset]),
|
||||||
onAssetTap: onAssetTap,
|
onAssetTap: onAssetTap,
|
||||||
getOwnerName: getOwnerName,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -764,7 +730,6 @@ class _AssetRow extends StatelessWidget {
|
|||||||
final void Function(Asset)? onSelect;
|
final void Function(Asset)? onSelect;
|
||||||
final void Function(Asset)? onDeselect;
|
final void Function(Asset)? onDeselect;
|
||||||
final bool isSelectionActive;
|
final bool isSelectionActive;
|
||||||
final String? Function(Asset)? getOwnerName;
|
|
||||||
|
|
||||||
const _AssetRow({
|
const _AssetRow({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -786,7 +751,6 @@ class _AssetRow extends StatelessWidget {
|
|||||||
required this.onAssetTap,
|
required this.onAssetTap,
|
||||||
this.onSelect,
|
this.onSelect,
|
||||||
this.onDeselect,
|
this.onDeselect,
|
||||||
this.getOwnerName,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ class MultiselectGrid extends HookConsumerWidget {
|
|||||||
this.unfavorite = false,
|
this.unfavorite = false,
|
||||||
this.downloadEnabled = true,
|
this.downloadEnabled = true,
|
||||||
this.emptyIndicator,
|
this.emptyIndicator,
|
||||||
this.album,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
final ProviderListenable<AsyncValue<RenderList>> renderListProvider;
|
final ProviderListenable<AsyncValue<RenderList>> renderListProvider;
|
||||||
@@ -66,7 +65,6 @@ class MultiselectGrid extends HookConsumerWidget {
|
|||||||
final bool unfavorite;
|
final bool unfavorite;
|
||||||
final bool editEnabled;
|
final bool editEnabled;
|
||||||
final Widget? emptyIndicator;
|
final Widget? emptyIndicator;
|
||||||
final Album? album;
|
|
||||||
Widget buildDefaultLoadingIndicator() => const Center(child: CircularProgressIndicator());
|
Widget buildDefaultLoadingIndicator() => const Center(child: CircularProgressIndicator());
|
||||||
|
|
||||||
Widget buildEmptyIndicator() => emptyIndicator ?? Center(child: const Text("no_assets_to_show").tr());
|
Widget buildEmptyIndicator() => emptyIndicator ?? Center(child: const Text("no_assets_to_show").tr());
|
||||||
@@ -420,7 +418,6 @@ class MultiselectGrid extends HookConsumerWidget {
|
|||||||
topWidget: topWidget,
|
topWidget: topWidget,
|
||||||
showStack: stackEnabled,
|
showStack: stackEnabled,
|
||||||
showDragScrollLabel: dragScrollLabelEnabled,
|
showDragScrollLabel: dragScrollLabelEnabled,
|
||||||
album: album,
|
|
||||||
),
|
),
|
||||||
error: (error, _) => Center(child: Text(error.toString())),
|
error: (error, _) => Center(child: Text(error.toString())),
|
||||||
loading: buildLoadingIndicator ?? buildDefaultLoadingIndicator,
|
loading: buildLoadingIndicator ?? buildDefaultLoadingIndicator,
|
||||||
|
|||||||
Reference in New Issue
Block a user