groups: AI enhance for gallery photos (photo_jobs.group_photo_id, before/after compare modal)

This commit is contained in:
dev
2026-10-09 13:52:02 +03:00
parent df9c67b047
commit ec47659ec6
12 changed files with 1499 additions and 74 deletions
+3 -1
View File
@@ -384,6 +384,7 @@ function normalizeRestoreData(data) {
id: reqInt(x.id),
group_id: reqInt(x.group_id),
photo_path: reqUploadPath(x.photo_path, 255),
photo_original_path: optUploadPath(x.photo_original_path, 255),
caption: optStr(x.caption, 10000),
taken_at: optDate(x.taken_at),
sort_order: optInt(x.sort_order, -2147483648, 2147483647),
@@ -471,7 +472,8 @@ function normalizeRestoreData(data) {
const PHOTO_JOB_STATUSES = new Set(['pending', 'processing', 'done', 'error', 'rejected']);
const photo_jobs = (data.photo_jobs || []).map(x => ({
id: reqInt(x.id),
entry_id: reqInt(x.entry_id),
entry_id: optInt(x.entry_id, 1, 2147483647),
group_photo_id: optInt(x.group_photo_id, 1, 2147483647),
action: (x.action && PHOTO_JOB_ACTIONS.has(x.action)) ? x.action : 'ai',
params: optJsonText(x.params, 20000),
before_path: optPhotoRefPath(x.before_path, 255),