Land camera-native raw profiles, real ICC soft proofing and 16-bit proxies.
Camera profiles, proofing tables and the half-float sidecar all have to agree with the pixels the editor actually grades, so they land together with the preset filter menu that was unusable while thumbnails streamed in. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -145,6 +145,21 @@ export function uploadOriginal(id: string, file: File | Blob, name: string): Pro
|
||||
});
|
||||
}
|
||||
|
||||
/** Re-decode a stored RAW with the server's current pipeline settings. */
|
||||
export function reprocessRawPhoto(
|
||||
id: string,
|
||||
): Promise<{
|
||||
width: number;
|
||||
height: number;
|
||||
engine?: 'libraw' | 'embedded';
|
||||
note?: string | null;
|
||||
previewVersion?: number;
|
||||
previewUrl?: string;
|
||||
thumbUrl?: string;
|
||||
}> {
|
||||
return request(`/api/photos/${encodeURIComponent(id)}/reprocess`, { method: 'POST' });
|
||||
}
|
||||
|
||||
export function pushPhoto(photo: PhotoRecord): Promise<PhotoRecord> {
|
||||
return request<{ photo: PhotoRecord }>(`/api/photos/${encodeURIComponent(photo.id)}`, {
|
||||
method: 'PUT',
|
||||
@@ -221,10 +236,26 @@ export interface ShareFeedback {
|
||||
createdAt: number;
|
||||
}
|
||||
|
||||
export interface ShareSettings {
|
||||
passwordSet: boolean;
|
||||
expiresAt: number | null;
|
||||
watermark: string;
|
||||
allowDownloads: boolean;
|
||||
downloadCap: number;
|
||||
downloadCount: number;
|
||||
}
|
||||
|
||||
export interface ShareState {
|
||||
token: string | null;
|
||||
picks: { photoId: string; clientName: string }[];
|
||||
feedback?: ShareFeedback[];
|
||||
settings?: ShareSettings | null;
|
||||
}
|
||||
|
||||
export interface GalleryStatus {
|
||||
locked: boolean;
|
||||
expiresAt: number | null;
|
||||
allowDownloads: boolean;
|
||||
}
|
||||
|
||||
export interface GalleryComment {
|
||||
@@ -253,6 +284,8 @@ export interface GalleryPayload {
|
||||
photographer: string;
|
||||
photos: GalleryPhoto[];
|
||||
picks: { total: number; clients: number };
|
||||
downloads?: { allowed: boolean; remaining: number | null };
|
||||
watermark?: string;
|
||||
}
|
||||
|
||||
export function getShare(eventId: string): Promise<ShareState> {
|
||||
@@ -274,6 +307,71 @@ export function galleryDownloadAllUrl(token: string, clientId: string): string {
|
||||
return `/api/galleries/${encodeURIComponent(token)}/download-all?${query}`;
|
||||
}
|
||||
|
||||
export interface ShareSettingsInput {
|
||||
password?: string;
|
||||
expiresAt?: number | null;
|
||||
watermark?: string;
|
||||
allowDownloads?: boolean;
|
||||
downloadCap?: number;
|
||||
}
|
||||
|
||||
export function saveShareSettings(
|
||||
eventId: string,
|
||||
input: ShareSettingsInput,
|
||||
): Promise<ShareSettings> {
|
||||
return request<{ settings: ShareSettings }>(
|
||||
`/api/events/${encodeURIComponent(eventId)}/share/settings`,
|
||||
{
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(input),
|
||||
},
|
||||
).then((res) => res.settings);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ tether api */
|
||||
|
||||
export interface TetherFile {
|
||||
name: string;
|
||||
size: number;
|
||||
mtime: number;
|
||||
}
|
||||
|
||||
export interface TetherState {
|
||||
folder: string;
|
||||
files: TetherFile[];
|
||||
}
|
||||
|
||||
export function listTether(eventId: string): Promise<TetherState> {
|
||||
return request<TetherState>(`/api/events/${encodeURIComponent(eventId)}/tether`);
|
||||
}
|
||||
|
||||
export function tetherFileUrl(eventId: string, name: string): string {
|
||||
const query = new URLSearchParams({ name });
|
||||
return `/api/events/${encodeURIComponent(eventId)}/tether/file?${query}`;
|
||||
}
|
||||
|
||||
export function removeTetherFile(eventId: string, name: string): Promise<void> {
|
||||
const query = new URLSearchParams({ name });
|
||||
return request(`/api/events/${encodeURIComponent(eventId)}/tether/file?${query}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/** Public check for the link's lock and expiry, before loading the gallery. */
|
||||
export function getGalleryStatus(token: string): Promise<GalleryStatus> {
|
||||
return request<GalleryStatus>(`/api/galleries/${encodeURIComponent(token)}/status`);
|
||||
}
|
||||
|
||||
/** Exchanges the gallery password for the unlock cookie the routes require. */
|
||||
export function unlockGallery(token: string, password: string): Promise<void> {
|
||||
return request(`/api/galleries/${encodeURIComponent(token)}/unlock`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ password }),
|
||||
});
|
||||
}
|
||||
|
||||
export function revokeShare(eventId: string): Promise<void> {
|
||||
return request(`/api/events/${encodeURIComponent(eventId)}/share`, { method: 'DELETE' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user