mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 09:15:44 +03:00
24 lines
835 B
Svelte
24 lines
835 B
Svelte
|
|
<script lang="ts">
|
||
|
|
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
||
|
|
import CreateSharedLinkModal from '$lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte';
|
||
|
|
import { SharedLinkType } from '@api';
|
||
|
|
import ShareVariantOutline from 'svelte-material-icons/ShareVariantOutline.svelte';
|
||
|
|
import { getAssetControlContext } from '../asset-select-control-bar.svelte';
|
||
|
|
|
||
|
|
let showModal = false;
|
||
|
|
const { getAssets, clearSelect } = getAssetControlContext();
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<CircleIconButton title="Share" logo={ShareVariantOutline} on:click={() => (showModal = true)} />
|
||
|
|
|
||
|
|
{#if showModal}
|
||
|
|
<CreateSharedLinkModal
|
||
|
|
sharedAssets={Array.from(getAssets())}
|
||
|
|
shareType={SharedLinkType.Individual}
|
||
|
|
on:close={() => {
|
||
|
|
showModal = false;
|
||
|
|
clearSelect();
|
||
|
|
}}
|
||
|
|
/>
|
||
|
|
{/if}
|