feat(web): вкладка «Редактирование» с инструментом «Свет»

В правой панели фото появилась вкладка «Редактирование» с инструментом «Свет»:
ползунки экспозиции, контраста, светов, теней, белых и чёрных и точечная кривая
с выбором канала. Правки сохраняются автоматически, переключатель «Сброс»
удаляет параметры правок и отредактированную версию фото.

Редактирование неразрушающее: параметры хранятся в метаданных фото, а
отредактированная версия рендерится в фоне отдельным объектом (edit, edit_thumb,
edit_medium, edit_preview) рядом с исходными вариантами. Оригинал не меняется,
скачивание отдаёт исходный файл. Сетка, просмотр и обложки альбомов показывают
отредактированную версию, когда она отрендерена.
This commit is contained in:
iu
2026-10-20 23:06:24 +03:00
parent afaaaab5f0
commit 0548b1ab5e
32 changed files with 1954 additions and 24 deletions
+17
View File
@@ -68,6 +68,23 @@ type Repository interface {
// dimensions on the original object.
SetMediaMeta(ctx context.Context, photoID, objectID string, durationMS int64, width, height int) error
// SetEditParams stores the non-destructive editing parameters of a photo.
SetEditParams(ctx context.Context, photoID string, params []byte) error
// ClearEditParams removes the editing parameters of a photo.
ClearEditParams(ctx context.Context, photoID string) error
// EnqueueEditJob schedules the render of the edited version of a photo.
EnqueueEditJob(ctx context.Context, photoID string) error
// DeleteEditJob drops the pending render of a photo.
DeleteEditJob(ctx context.Context, photoID string) error
// ClaimEditJobs leases due edit renders and returns their photo ids.
ClaimEditJobs(ctx context.Context, limit int, lease time.Duration) ([]string, error)
// CompleteEditJob removes a finished edit render.
CompleteEditJob(ctx context.Context, photoID string) error
// FailEditJob records a failure and schedules a retry.
FailEditJob(ctx context.Context, photoID, errMsg string, maxAttempts int) error
// DeleteObjectBindings removes the bindings of a photo for the given roles.
DeleteObjectBindings(ctx context.Context, photoID string, roles ...string) error
// AllStorageKeys returns every key registered in the object journal.
AllStorageKeys(ctx context.Context) ([]string, error)
}