0.3.1: la nota nasce nella cartella aperta, navigazione senza voci fantasma

- NewNoteDialog riceve la cartella corrente: il file va dove sei, non nella
  radice del caveau. Un nome gia' presente viene rifiutato (la PUT avrebbe
  sovrascritto la nota senza chiedere) e il nome non puo' contenere "/".
- PropfindParser.listing(): scarta la collezione stessa (il PROPFIND Depth:1 la
  include, e dentro una cartella sembrava di non essere entrati) e le voci
  nascoste (.obsidian/, .trash/), anche nella scansione di ricerca e tag: le
  note nel cestino non finiscono piu' nei risultati.
- MainPage: se il client e' occupato la navigazione va in coda invece di essere
  persa, e l'elenco precedente viene svuotato subito (non resta sotto
  l'intestazione nuova).
- Test del filtro con la risposta reale di Libro/; verificatore aggiornato per i
  segnali di cambio proprieta' (onBusyChanged).
This commit is contained in:
kaneda committed 2026-11-08 21:04:31 +01:00
1 parent 8259297a27
commit 82d85ab30b
9 files changed
+179 -25

No files matched your search

+22 -2
View File
@@ -73,6 +73,26 @@ function parse(xml, baseUrl) {
return entries;
}
if (typeof module !== "undefined" && module.exports) {
module.exports = { parse: parse };
// Entries to show in a folder listing, given the folder being listed:
// - the collection ITSELF is dropped (a Depth:1 PROPFIND returns it, and in
// the app it looked like the folder had not been entered at all);
// - hidden entries (".obsidian", ".trash", ".git") are dropped: they are
// configuration, not notes, and they only add noise to the navigation.
// Pure ES5 so the node tests cover it.
function listing(entries, currentPath) {
var out = [];
if (!entries) return out;
var self = currentPath || "";
for (var i = 0; i < entries.length; i++) {
var e = entries[i];
if (e.path === self) continue;
var name = e.name || "";
if (!name || name.charAt(0) === ".") continue;
out.push(e);
}
return out;
}
if (typeof module !== "undefined" && module.exports) {
module.exports = { parse: parse, listing: listing };
}