mirror of
https://github.com/immich-app/immich.git
synced 2025-12-01 09:49:53 +09:00
feat(web): Improve duplicate suggestion (#14947)
* feat: Improve duplicate suggestion * format * feat(web): Add deduplication info popup * fix: lint * fmt --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
committed by
GitHub
parent
23f3e737fd
commit
b4c1304b46
@@ -16,13 +16,11 @@ import {
|
||||
linkOAuthAccount,
|
||||
startOAuth,
|
||||
unlinkOAuthAccount,
|
||||
type AssetResponseDto,
|
||||
type PersonResponseDto,
|
||||
type SharedLinkResponseDto,
|
||||
type UserResponseDto,
|
||||
} from '@immich/sdk';
|
||||
import { mdiCogRefreshOutline, mdiDatabaseRefreshOutline, mdiHeadSyncOutline, mdiImageRefreshOutline } from '@mdi/js';
|
||||
import { sortBy } from 'lodash-es';
|
||||
import { init, register, t } from 'svelte-i18n';
|
||||
import { derived, get } from 'svelte/store';
|
||||
|
||||
@@ -332,9 +330,5 @@ export const withError = async <T>(fn: () => Promise<T>): Promise<[undefined, T]
|
||||
}
|
||||
};
|
||||
|
||||
export const suggestDuplicateByFileSize = (assets: AssetResponseDto[]): AssetResponseDto | undefined => {
|
||||
return sortBy(assets, (asset) => asset.exifInfo?.fileSizeInByte).pop();
|
||||
};
|
||||
|
||||
// eslint-disable-next-line unicorn/prefer-code-point
|
||||
export const decodeBase64 = (data: string) => Uint8Array.from(atob(data), (c) => c.charCodeAt(0));
|
||||
|
||||
Reference in New Issue
Block a user