release: v1.4.0 — 标签系统、操作日志扩展与文档截图更新
ci / ci (22, ubuntu-latest) (push) Canceled after 0s
GitHub Release / release (push) Canceled after 0s
Publish Docker image / build (linux/amd64, ubuntu-latest, amd64) (push) Canceled after 0s
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm, arm64) (push) Canceled after 0s
Publish Docker image / merge (push) Canceled after 0s

- 每用户标签与彩色打标,图库 OR/AND 筛选与批量打标
- 操作日志记录登录、删除、设置与标签操作
- API 标签/打标接口;README 与文档站截图同步
This commit is contained in:
O96u committed 2026-09-09 14:46:52 +08:00
1 parent f17d79b236
commit 737235acff
110 files changed
+5881 -778

No files matched your search

+14 -1
View File
@@ -3,6 +3,8 @@ import type { ImageItem } from '~/types/image'
import type { LogSource } from './db'
import type { AllowedMimeType } from './constants'
import type { StoredImage } from './storage'
import type { TagItem } from './tags'
import { getTagsForImageKeys } from './tags'
import { getImageBaseUrl, isHideFolderInUrl } from './env'
import { toPublicImagePath } from './image-public-path'
import { getActiveBackendRow } from './storage/resolver'
@@ -10,6 +12,17 @@ import { getStorageBackendRow, getStorageBackendFromEnv } from './storage-backen
import type { StorageBackendType, StorageBackendRow } from './storage/types'
import { buildObjectKey, parseS3Config } from './storage/s3'
export function attachTagsToImageItems(items: ImageItem[]): ImageItem[] {
if (!items.length) return items
const tagMap = getTagsForImageKeys(items.map(item => item.key))
return items.map(item => ({
...item,
tags: tagMap.get(item.key) ?? []
}))
}
export type { TagItem }
export function resolveImageOwner(
userId: number | null | undefined,
ownerMap?: Map<number, string>
@@ -72,7 +85,7 @@ export function mapStoredImageToItem(
...item,
...(owner ? { owner } : {}),
...(storage ? { storage } : {}),
...(uploadSource ? { uploadSource } : {})
...(uploadSource === 'web' || uploadSource === 'api' ? { uploadSource } : {})
}
}