mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: optimize copy image to clipboard (#12366)
* feat: optimize copy image to clipboard * pr feedback * fix: urlToBlob Co-authored-by: Jason Rasmussen <jason@rasm.me> * fix: imgToBlob Co-authored-by: Jason Rasmussen <jason@rasm.me> * chore: finish rename * fix: dimensions --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
ecc85ff6c6
commit
a653d9d29f
6 changed files with 52 additions and 19 deletions
|
|
@ -41,7 +41,7 @@
|
|||
mdiPresentationPlay,
|
||||
mdiUpload,
|
||||
} from '@mdi/js';
|
||||
import { canCopyImagesToClipboard } from 'copy-image-clipboard';
|
||||
import { canCopyImageToClipboard } from '$lib/utils/asset-utils';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
export let asset: AssetResponseDto;
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
on:click={onZoomImage}
|
||||
/>
|
||||
{/if}
|
||||
{#if canCopyImagesToClipboard() && asset.type === AssetTypeEnum.Image}
|
||||
{#if canCopyImageToClipboard() && asset.type === AssetTypeEnum.Image}
|
||||
<CircleIconButton color="opaque" icon={mdiContentCopy} title={$t('copy_image')} on:click={onCopyImage} />
|
||||
{/if}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue