feat: image editing (#24155)

This commit is contained in:
Brandon Wees
2026-01-09 17:59:52 -05:00
committed by GitHub
parent 76241a7b2b
commit e8c80d88a5
141 changed files with 7836 additions and 1634 deletions
+6 -5
View File
@@ -166,6 +166,7 @@ export const getQueueName = derived(t, ($t) => {
[QueueName.BackupDatabase]: $t('admin.backup_database'),
[QueueName.Ocr]: $t('admin.machine_learning_ocr'),
[QueueName.Workflow]: $t('workflows'),
[QueueName.Editor]: $t('editor'),
};
return names[name];
@@ -192,7 +193,7 @@ const createUrl = (path: string, parameters?: Record<string, unknown>) => {
return getBaseUrl() + url.pathname + url.search + url.hash;
};
type AssetUrlOptions = { id: string; cacheKey?: string | null };
type AssetUrlOptions = { id: string; cacheKey?: string | null; edited?: boolean };
export const getAssetUrl = ({
asset,
@@ -232,16 +233,16 @@ export const getAssetOriginalUrl = (options: string | AssetUrlOptions) => {
if (typeof options === 'string') {
options = { id: options };
}
const { id, cacheKey } = options;
return createUrl(getAssetOriginalPath(id), { ...authManager.params, c: cacheKey });
const { id, cacheKey, edited = true } = options;
return createUrl(getAssetOriginalPath(id), { ...authManager.params, c: cacheKey, edited });
};
export const getAssetThumbnailUrl = (options: string | (AssetUrlOptions & { size?: AssetMediaSize })) => {
if (typeof options === 'string') {
options = { id: options };
}
const { id, size, cacheKey } = options;
return createUrl(getAssetThumbnailPath(id), { ...authManager.params, size, c: cacheKey });
const { id, size, cacheKey, edited = true } = options;
return createUrl(getAssetThumbnailPath(id), { ...authManager.params, size, c: cacheKey, edited });
};
export const getAssetPlaybackUrl = (options: string | AssetUrlOptions) => {