mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +02:00
* only show download button if allowDownload add SelectAll to individual share * fix allow download if not share
This commit is contained in:
parent
3948247055
commit
c065705608
@ -351,7 +351,9 @@
|
|||||||
clearSelect={() => (multiSelectAsset = new Set())}
|
clearSelect={() => (multiSelectAsset = new Set())}
|
||||||
>
|
>
|
||||||
<CircleIconButton title="Select all" logo={SelectAll} on:click={handleSelectAll} />
|
<CircleIconButton title="Select all" logo={SelectAll} on:click={handleSelectAll} />
|
||||||
|
{#if sharedLink?.allowDownload || !isPublicShared}
|
||||||
<DownloadAction filename={album.albumName} sharedLinkKey={sharedLink?.key} />
|
<DownloadAction filename={album.albumName} sharedLinkKey={sharedLink?.key} />
|
||||||
|
{/if}
|
||||||
{#if isOwned}
|
{#if isOwned}
|
||||||
<RemoveFromAlbum bind:album />
|
<RemoveFromAlbum bind:album />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
import AssetSelectControlBar from '../photos-page/asset-select-control-bar.svelte';
|
import AssetSelectControlBar from '../photos-page/asset-select-control-bar.svelte';
|
||||||
import ControlAppBar from '../shared-components/control-app-bar.svelte';
|
import ControlAppBar from '../shared-components/control-app-bar.svelte';
|
||||||
import GalleryViewer from '../shared-components/gallery-viewer/gallery-viewer.svelte';
|
import GalleryViewer from '../shared-components/gallery-viewer/gallery-viewer.svelte';
|
||||||
|
import SelectAll from 'svelte-material-icons/SelectAll.svelte';
|
||||||
import ImmichLogo from '../shared-components/immich-logo.svelte';
|
import ImmichLogo from '../shared-components/immich-logo.svelte';
|
||||||
import {
|
import {
|
||||||
notificationController,
|
notificationController,
|
||||||
@ -53,12 +54,19 @@
|
|||||||
handleError(e, 'Unable to add assets to shared link');
|
handleError(e, 'Unable to add assets to shared link');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSelectAll = () => {
|
||||||
|
selectedAssets = new Set(assets);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="bg-immich-bg dark:bg-immich-dark-bg">
|
<section class="bg-immich-bg dark:bg-immich-dark-bg">
|
||||||
{#if isMultiSelectionMode}
|
{#if isMultiSelectionMode}
|
||||||
<AssetSelectControlBar assets={selectedAssets} clearSelect={() => (selectedAssets = new Set())}>
|
<AssetSelectControlBar assets={selectedAssets} clearSelect={() => (selectedAssets = new Set())}>
|
||||||
|
<CircleIconButton title="Select all" logo={SelectAll} on:click={handleSelectAll} />
|
||||||
|
{#if sharedLink?.allowDownload}
|
||||||
<DownloadAction filename="immich-shared" sharedLinkKey={sharedLink.key} />
|
<DownloadAction filename="immich-shared" sharedLinkKey={sharedLink.key} />
|
||||||
|
{/if}
|
||||||
{#if isOwned}
|
{#if isOwned}
|
||||||
<RemoveFromSharedLink bind:sharedLink />
|
<RemoveFromSharedLink bind:sharedLink />
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user