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:
martin
2024-09-06 15:16:59 +02:00
committed by GitHub
parent ecc85ff6c6
commit a653d9d29f
6 changed files with 52 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
import type { AssetResponseDto } from '@immich/sdk';
import { getAssetFilename, getFilenameExtension } from './asset-utils';
import { canCopyImageToClipboard, getAssetFilename, getFilenameExtension } from './asset-utils';
describe('get file extension from filename', () => {
it('returns the extension without including the dot', () => {
@@ -56,3 +56,9 @@ describe('get asset filename', () => {
}
});
});
describe('copy image to clipboard', () => {
it('should not allow copy image to clipboard', () => {
expect(canCopyImageToClipboard()).toEqual(false);
});
});