refactor: view shared link (#23766)

This commit is contained in:
Jason Rasmussen
2025-11-10 12:21:26 -05:00
committed by GitHub
parent a4e65a7ea8
commit 45304f1211
13 changed files with 74 additions and 76 deletions

View File

@@ -1,7 +1,6 @@
<script lang="ts">
import QrCodeModal from '$lib/modals/QrCodeModal.svelte';
import SharedLinkCreateModal from '$lib/modals/SharedLinkCreateModal.svelte';
import { makeSharedLinkUrl } from '$lib/utils';
import { handleViewSharedLinkQrCode } from '$lib/services/shared-link.service';
import type { AssetResponseDto } from '@immich/sdk';
import { IconButton, modalManager } from '@immich/ui';
import { mdiShareVariantOutline } from '@mdi/js';
@@ -15,9 +14,8 @@
const handleClick = async () => {
const sharedLink = await modalManager.show(SharedLinkCreateModal, { assetIds: [asset.id] });
if (sharedLink) {
await modalManager.show(QrCodeModal, { title: $t('view_link'), value: makeSharedLinkUrl(sharedLink) });
await handleViewSharedLinkQrCode(sharedLink);
}
};
</script>