Improve editor, plugin updates, and window transfers for 0.1.41

This commit is contained in:
Knotty Wyvern
2026-10-21 10:42:44 -07:00
parent 68e86ab6eb
commit 42dd0fa711
56 changed files with 2313 additions and 221 deletions
+10 -8
View File
@@ -702,14 +702,16 @@
}
}
async function createTreeNote(parent: string, template?: NoteTemplate) {
try {
const path = await createNote(parent, template);
await load(parent);
onCreated?.({ name: path.split("/").pop()!, rel_path: path, kind: "file" });
} catch (reason) { error = String(reason); }
}
function paneMenuItems(parent: string): MenuItem[] {
const fromTemplate = async (template?: NoteTemplate) => {
try {
const path = await createNote(parent, template);
await load(parent);
onCreated?.({ name: path.split("/").pop()!, rel_path: path, kind: "file" });
} catch (reason) { error = String(reason); }
};
const fromTemplate = (template?: NoteTemplate) => createTreeNote(parent, template);
return [
{
kind: "action",
@@ -881,7 +883,7 @@
<div class="wrap">
<div class="ribbon tree-tools">
<IconButton icon="file-plus" label={$t("New file")} onclick={() => void createIn("", "file")} />
<IconButton icon="file-plus" label={$t("New note")} onclick={() => void createTreeNote("")} />
<IconButton icon="folder-plus" label={$t("New folder")} onclick={() => void createIn("", "folder")} />
<IconButton
icon="sort"