- Add metadata_batch job type with background processing via tokio::spawn - Auto-apply metadata only when single result at 100% confidence - Support primary + fallback provider per library, "none" to opt out - Add batch report/results API endpoints and job detail UI - Add series_status and has_missing filters to both series listing pages - Add GET /series/statuses endpoint for dynamic filter options - Normalize series_metadata status values (migration 0036) - Hide ComicVine provider tab when no API key configured - Translate entire backoffice UI from English to French Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { useState } from "react";
|
|
import { FolderPicker } from "./FolderPicker";
|
|
import { FolderItem } from "../../lib/api";
|
|
import { Button, FormField, FormInput, FormRow } from "./ui";
|
|
|
|
interface LibraryFormProps {
|
|
initialFolders: FolderItem[];
|
|
action: (formData: FormData) => void;
|
|
}
|
|
|
|
export function LibraryForm({ initialFolders, action }: LibraryFormProps) {
|
|
const [selectedPath, setSelectedPath] = useState<string>("");
|
|
|
|
return (
|
|
<form action={action}>
|
|
<FormRow>
|
|
<FormField className="flex-1 min-w-48">
|
|
<FormInput name="name" placeholder="Nom de la bibliothèque" required />
|
|
</FormField>
|
|
<FormField className="flex-1 min-w-64">
|
|
<input type="hidden" name="root_path" value={selectedPath} />
|
|
<FolderPicker
|
|
initialFolders={initialFolders}
|
|
selectedPath={selectedPath}
|
|
onSelect={setSelectedPath}
|
|
/>
|
|
</FormField>
|
|
</FormRow>
|
|
<div className="mt-4 flex justify-end">
|
|
<Button type="submit" disabled={!selectedPath}>
|
|
Ajouter une bibliothèque
|
|
</Button>
|
|
</div>
|
|
</form>
|
|
);
|
|
}
|