mirror of
https://github.com/immich-app/immich.git
synced 2026-01-16 06:52:35 -08:00
23 lines
701 B
Svelte
23 lines
701 B
Svelte
<script lang="ts">
|
|
import { getAssetControlContext } from '$lib/components/timeline/AssetSelectControlBar.svelte';
|
|
import SharedLinkCreateModal from '$lib/modals/SharedLinkCreateModal.svelte';
|
|
import { IconButton, modalManager } from '@immich/ui';
|
|
import { mdiShareVariantOutline } from '@mdi/js';
|
|
import { t } from 'svelte-i18n';
|
|
|
|
const { getAssets } = getAssetControlContext();
|
|
|
|
const handleClick = async () => {
|
|
await modalManager.show(SharedLinkCreateModal, { assetIds: [...getAssets()].map(({ id }) => id) });
|
|
};
|
|
</script>
|
|
|
|
<IconButton
|
|
shape="round"
|
|
color="secondary"
|
|
variant="ghost"
|
|
aria-label={$t('share')}
|
|
icon={mdiShareVariantOutline}
|
|
onclick={handleClick}
|
|
/>
|