2023-05-16 16:13:20 +02:00
|
|
|
<script lang="ts">
|
2023-07-01 00:50:47 -04:00
|
|
|
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 ShareVariantOutline from 'svelte-material-icons/ShareVariantOutline.svelte';
|
|
|
|
|
import { getAssetControlContext } from '../asset-select-control-bar.svelte';
|
2023-05-16 16:13:20 +02:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
let showModal = false;
|
2023-08-03 10:11:02 -04:00
|
|
|
const { getAssets } = getAssetControlContext();
|
2023-05-16 16:13:20 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<CircleIconButton title="Share" logo={ShareVariantOutline} on:click={() => (showModal = true)} />
|
|
|
|
|
|
|
|
|
|
{#if showModal}
|
2023-08-11 12:00:51 -04:00
|
|
|
<CreateSharedLinkModal assetIds={Array.from(getAssets()).map(({ id }) => id)} on:close={() => (showModal = false)} />
|
2023-05-16 16:13:20 +02:00
|
|
|
{/if}
|