mirror of
https://github.com/immich-app/immich.git
synced 2026-07-28 14:47:30 -07:00
feat(web): Keep show more open on duplicates (#29734)
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
co-authored by
Daniel Dietzler
parent
b4530b0671
commit
55dc579059
+2
@@ -54,6 +54,7 @@
|
||||
};
|
||||
|
||||
let duplicates = $state(data.duplicates);
|
||||
let showMore = $state(false);
|
||||
|
||||
const correctDuplicatesIndex = (index: number) => {
|
||||
return Math.max(0, Math.min(index, duplicates.length - 1));
|
||||
@@ -261,6 +262,7 @@
|
||||
<DuplicatesCompareControl
|
||||
assets={duplicates[duplicatesIndex].assets}
|
||||
suggestedKeepAssetIds={duplicates[duplicatesIndex].suggestedKeepAssetIds}
|
||||
bind:showMore
|
||||
onResolve={(duplicateAssetIds, trashIds) =>
|
||||
handleResolve(duplicates[duplicatesIndex].duplicateId, duplicateAssetIds, trashIds)}
|
||||
onStack={(assets) => handleStack(duplicates[duplicatesIndex].duplicateId, assets)}
|
||||
|
||||
+2
-2
@@ -22,11 +22,12 @@
|
||||
interface Props {
|
||||
assets: AssetResponseDto[];
|
||||
suggestedKeepAssetIds: string[];
|
||||
showMore: boolean;
|
||||
onResolve: (duplicateAssetIds: string[], trashIds: string[]) => void;
|
||||
onStack: (assets: AssetResponseDto[]) => void;
|
||||
}
|
||||
|
||||
let { assets, suggestedKeepAssetIds, onResolve, onStack }: Props = $props();
|
||||
let { assets, suggestedKeepAssetIds, onResolve, onStack, showMore = $bindable() }: Props = $props();
|
||||
// eslint-disable-next-line svelte/no-unnecessary-state-wrap
|
||||
let selectedAssetIds = $state(new SvelteSet<string>());
|
||||
let trashCount = $derived(assets.length - selectedAssetIds.size);
|
||||
@@ -36,7 +37,6 @@
|
||||
const differingMetadataFields: DifferingMetadataFields = $derived(computeDifferingMetadataFields(assets));
|
||||
const differingCount = $derived(countDifferingMetadataItems(differingMetadataFields));
|
||||
const hasMore = $derived(differingCount > InitialVisibleCount);
|
||||
let showMore = $state(false);
|
||||
|
||||
onMount(() => {
|
||||
if (suggestedKeepAssetIds.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user