Rebuild the visual identity from the actual Ombrora mark (violet/cyan aurora blobs) instead of the generic blue/amber scheme, add Bricolage Grotesque and IBM Plex Mono for display and code-like text, and give the hero an animated aurora backdrop, gradient headline, and a format-pair marquee driven by the real registered converters. Rework the file config form: target format and icon size are both chip groups now instead of a native select, and quality/compression sliders get a gradient-filled track, custom thumb, and a mono value pill to match. File type icons are color-coded by family (images/documents/fonts/ebooks) and reused across FileConfigCard, FileCard, and FormatsGrid. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
export async function fetchFormats(source) {
|
|
const response = await fetch(`/api/formats?source=${encodeURIComponent(source)}`);
|
|
const data = await response.json();
|
|
return data.targets;
|
|
}
|
|
|
|
export async function fetchConfig() {
|
|
const response = await fetch('/api/config');
|
|
return response.json();
|
|
}
|
|
|
|
export async function uploadFiles(items) {
|
|
const formData = new FormData();
|
|
const targetFormats = [];
|
|
const qualities = [];
|
|
const iconSizes = [];
|
|
for (const item of items) {
|
|
formData.append('files', item.file);
|
|
targetFormats.push(item.targetFormat);
|
|
qualities.push(item.quality ?? null);
|
|
iconSizes.push(item.iconSize ?? null);
|
|
}
|
|
formData.append('targetFormats', JSON.stringify(targetFormats));
|
|
formData.append('qualities', JSON.stringify(qualities));
|
|
formData.append('iconSizes', JSON.stringify(iconSizes));
|
|
|
|
const response = await fetch('/api/jobs', { method: 'POST', body: formData });
|
|
const data = await response.json();
|
|
return data.jobs;
|
|
}
|
|
|
|
export async function fetchJobStatus(id) {
|
|
const response = await fetch(`/api/jobs/${id}`);
|
|
return response.json();
|
|
}
|
|
|
|
export function downloadUrl(id) {
|
|
return `/api/jobs/${id}/download`;
|
|
}
|