feat(ui): back-to-library, export-only download button, save in book setup

This commit is contained in:
pj committed 2026-06-20 15:09:13 -04:00
1 parent 686c7768c7
commit e9669290ec
3 files changed
+30 -13

No files matched your search

+16 -3
View File
@@ -28,12 +28,14 @@ function Field({ label, children }: { label: string; children: ReactNode }) {
);
}
export function Settings({ onClose }: { onClose: () => void }) {
const metadata = useBook((s) => s.book.metadata);
const settings = useBook((s) => s.book.settings);
export function Settings({ onClose, onSave }: { onClose: () => void; onSave: () => void }) {
const book = useBook((s) => s.book);
const setMetadata = useBook((s) => s.setMetadata);
const setSettings = useBook((s) => s.setSettings);
if (!book) return null;
const { metadata, settings } = book;
return (
<div className="overlay" onClick={onClose}>
<div className="panel" onClick={(e) => e.stopPropagation()}>
@@ -81,6 +83,17 @@ export function Settings({ onClose }: { onClose: () => void }) {
Add bleed for full-page images (print)
</label>
</div>
<div className="panel-foot">
<button
className="btn-primary"
onClick={() => {
onSave();
onClose();
}}
>
Save
</button>
</div>
</div>
</div>
);