diff --git a/src/lib/views/Settings.svelte b/src/lib/views/Settings.svelte index 35d81e2..1b0a963 100644 --- a/src/lib/views/Settings.svelte +++ b/src/lib/views/Settings.svelte @@ -5,6 +5,7 @@ import { onMount } from "svelte"; import { settings } from "../stores/settings.svelte"; import { calendar } from "../stores/calendar.svelte"; + import { meetings } from "../stores/meetings.svelte"; import ConsentNotice from "../components/ConsentNotice.svelte"; import HostedAiBanner from "../components/HostedAiBanner.svelte"; import { open } from "@tauri-apps/plugin-dialog"; @@ -34,6 +35,8 @@ Globe, Download, Trash2, + FolderInput, + FolderOutput, } from "@lucide/svelte"; import { OLLAMA_OPTIONS, @@ -503,6 +506,50 @@ settings.setRetentionPolicy(age, size); } + // ---- Export / Import (FR-STORE-4) — move recordings between computers as + // portable "bundle" folders (audio + transcript + notes + summary + + // meeting.json manifest). Drop a bundle on any synced/removable drive, or a + // sync target's local mount, to carry it across. ---- + let exportBusy = $state(false); + let importBusy = $state(false); + let ioStatus = $state(null); + let ioError = $state(false); + + async function exportAllMeetings() { + const dir = await open({ directory: true, title: "Export all meetings into…" }); + if (typeof dir !== "string") return; + exportBusy = true; + ioStatus = null; + ioError = false; + try { + const n = await api.bulkExportMeetings(dir, "bundle"); + ioStatus = `Exported ${n} meeting${n === 1 ? "" : "s"}.`; + } catch (e) { + ioStatus = errorMessage(e); + ioError = true; + } finally { + exportBusy = false; + } + } + + async function importMeetings() { + const dir = await open({ directory: true, title: "Import a bundle (or a folder of bundles)…" }); + if (typeof dir !== "string") return; + importBusy = true; + ioStatus = null; + ioError = false; + try { + const n = await api.importMeetingBundle(dir); + await meetings.load(); + ioStatus = `Imported ${n} meeting${n === 1 ? "" : "s"}.`; + } catch (e) { + ioStatus = errorMessage(e); + ioError = true; + } finally { + importBusy = false; + } + } + // ---- Add-target form ---- const PROVIDERS = ["nextcloud", "owncloud", "cloudreve", "seafile", "synology", "generic"]; let form = $state(blankForm("webdav")); @@ -1022,6 +1069,27 @@ /> + +

Export & import

+

+ Move recordings between computers as portable bundle folders (audio, transcript, notes, + summary, and a meeting.json manifest). Export to any folder — a synced drive, + a USB stick, or a sync target's local mount — then import it on the other machine. + Imported meetings get a fresh id, so re-importing never overwrites anything. +

+
+ + +
+ {#if ioStatus} +

{ioStatus}

+ {/if} {:else if section === "calendar"}