generate pdf, organize pages

This commit is contained in:
m
2026-07-12 15:56:23 +02:00
parent db3d18cf33
commit 380866e919
5 changed files with 422 additions and 98 deletions
+12
View File
@@ -48,6 +48,17 @@ export function useBatchStore() {
setBatchIds((batchIds ?? []).filter((id) => id !== batchId));
}, [batchIds, setBatchIds]);
const removePhotoFromBatch = useCallback((batchId: string, photoId: string) => {
const batch = getBatch(batchId);
if (!batch) return;
batch.photos = batch.photos.filter((p) => p.id !== photoId);
if (batch.photos.length === 0) {
deleteBatch(batchId);
} else {
storage.set(`batch_${batchId}`, JSON.stringify(batch));
}
}, [getBatch, deleteBatch]);
return {
saveBatch,
getBatch,
@@ -55,5 +66,6 @@ export function useBatchStore() {
addTagToBatch,
removeTagFromBatch,
deleteBatch,
removePhotoFromBatch,
};
}