feat(import): one Import-file entry + vault notebooks
All checks were successful
CI / Windows build (push) Successful in 14m14s

Phase 3. Import becomes a single top-level action beside "Create
notebook" and the library is vault-backed.

- VaultService.createNotebook copies a picked file into a fresh
  (de-duplicated) notebook folder under the vault; its sidecar lives
  beside it, so annotations travel with the file.
- Home screen: one "Import file" action with a multi-extension picker
  (pdf / docx / pptx); routes to the editor by extension.
- The document list is now a vault scan (folders with a source file),
  not the SQLite documents table — no cache, always correct.
- PPTX soffice detection fix; DOCX convert-on-import is best-effort
  and fails gracefully when LibreOffice is unavailable.

analyze clean, tests green.
This commit is contained in:
2026-06-24 21:12:38 +08:00
parent 978111eeff
commit 2f0fda5f95
10 changed files with 654 additions and 97 deletions

View File

@@ -5,6 +5,19 @@
"search": "Search",
"importPdf": "Import PDF",
"importPpt": "Import PPT",
"importFile": "Import file",
"createNotebook": "Create notebook",
"noDocumentsYet": "No documents yet — tap Import file",
"processingImport": "Importing…",
"importFailed": "Couldn't import that file: {error}",
"@importFailed": {
"placeholders": { "error": { "type": "String" } }
},
"convertNeedsLibreOffice": "Importing Word documents needs LibreOffice installed. Convert to PDF first, or install LibreOffice.",
"unsupportedFileType": "Unsupported file type: {ext}",
"@unsupportedFileType": {
"placeholders": { "ext": { "type": "String" } }
},
"penCanvasBeta": "Pen Canvas (beta)",
"newNote": "New Note",
"open": "Open",