mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: image editing (#24155)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
Activity,
|
||||
ApiKey,
|
||||
AssetFile,
|
||||
AuthApiKey,
|
||||
AuthSharedLink,
|
||||
AuthUser,
|
||||
@@ -250,6 +251,8 @@ const assetFactory = (asset: Partial<MapAsset> = {}) => ({
|
||||
thumbhash: null,
|
||||
type: AssetType.Image,
|
||||
visibility: AssetVisibility.Timeline,
|
||||
width: null,
|
||||
height: null,
|
||||
...asset,
|
||||
});
|
||||
|
||||
@@ -358,6 +361,7 @@ const assetOcrFactory = (
|
||||
boxScore?: number;
|
||||
textScore?: number;
|
||||
text?: string;
|
||||
isVisible?: boolean;
|
||||
} = {},
|
||||
) => ({
|
||||
id: newUuid(),
|
||||
@@ -373,13 +377,22 @@ const assetOcrFactory = (
|
||||
boxScore: 0.95,
|
||||
textScore: 0.92,
|
||||
text: 'Sample Text',
|
||||
isVisible: true,
|
||||
...ocr,
|
||||
});
|
||||
|
||||
const assetFileFactory = (file: Partial<AssetFile> = {}): AssetFile => ({
|
||||
id: newUuid(),
|
||||
type: AssetFileType.Preview,
|
||||
path: '/uploads/user-id/thumbs/path.jpg',
|
||||
...file,
|
||||
});
|
||||
|
||||
export const factory = {
|
||||
activity: activityFactory,
|
||||
apiKey: apiKeyFactory,
|
||||
asset: assetFactory,
|
||||
assetFile: assetFileFactory,
|
||||
assetOcr: assetOcrFactory,
|
||||
auth: authFactory,
|
||||
authApiKey: authApiKeyFactory,
|
||||
|
||||
Reference in New Issue
Block a user