mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(web): cannot view publlic shared album (#3829)
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
export let assetInteractionStore: AssetInteractionStore;
|
||||
|
||||
const { selectedGroup, selectedAssets, assetSelectionCandidates, isMultiSelectState } = assetInteractionStore;
|
||||
|
||||
const dispatch = createEventDispatcher<{
|
||||
select: { title: string; assets: AssetResponseDto[] };
|
||||
selectAssets: AssetResponseDto;
|
||||
@@ -97,7 +96,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
assetViewingStore.setAssetId(asset.id);
|
||||
assetViewingStore.setAssetId(asset.id, publicSharedKey);
|
||||
};
|
||||
|
||||
const handleSelectGroup = (title: string, assets: AssetResponseDto[]) => dispatch('select', { title, assets });
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
export let assetInteractionStore: AssetInteractionStore;
|
||||
export let removeAction: AssetAction | null = null;
|
||||
export let publicSharedKey: string | undefined = undefined;
|
||||
|
||||
const { assetSelectionCandidates, assetSelectionStart, selectedGroup, selectedAssets, isMultiSelectState } =
|
||||
assetInteractionStore;
|
||||
const viewport: Viewport = { width: 0, height: 0 };
|
||||
@@ -98,7 +97,7 @@
|
||||
const handlePrevious = async () => {
|
||||
const previousAsset = await assetStore.getPreviousAssetId($viewingAsset.id);
|
||||
if (previousAsset) {
|
||||
assetViewingStore.setAssetId(previousAsset);
|
||||
assetViewingStore.setAssetId(previousAsset, publicSharedKey);
|
||||
}
|
||||
|
||||
return !!previousAsset;
|
||||
@@ -107,7 +106,7 @@
|
||||
const handleNext = async () => {
|
||||
const nextAsset = await assetStore.getNextAssetId($viewingAsset.id);
|
||||
if (nextAsset) {
|
||||
assetViewingStore.setAssetId(nextAsset);
|
||||
assetViewingStore.setAssetId(nextAsset, publicSharedKey);
|
||||
}
|
||||
|
||||
return !!nextAsset;
|
||||
@@ -372,6 +371,7 @@
|
||||
on:unarchived={({ detail: asset }) => handleAction(asset, AssetAction.UNARCHIVE)}
|
||||
on:favorite={({ detail: asset }) => handleAction(asset, AssetAction.FAVORITE)}
|
||||
on:unfavorite={({ detail: asset }) => handleAction(asset, AssetAction.UNFAVORITE)}
|
||||
{publicSharedKey}
|
||||
/>
|
||||
{/if}
|
||||
</Portal>
|
||||
|
||||
Reference in New Issue
Block a user