From 79f0ebb53850a566cbfe1dc25e32a8cc0fea0734 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 9 Mar 2026 13:32:03 -0700 Subject: [PATCH] fix(rnotes): create notebook instantly without browser prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip the browser prompt() dialog — clicking "+ New Notebook" now immediately creates an "Untitled Notebook" and opens it for editing. Co-Authored-By: Claude Opus 4.6 --- modules/rnotes/components/folk-notes-app.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/rnotes/components/folk-notes-app.ts b/modules/rnotes/components/folk-notes-app.ts index 29054e6..66d5555 100644 --- a/modules/rnotes/components/folk-notes-app.ts +++ b/modules/rnotes/components/folk-notes-app.ts @@ -740,16 +740,20 @@ Gear: EUR 400 (10%)

Maya is tracking expenses in rF } private async createNotebook() { - const title = prompt("Notebook name:"); - if (!title?.trim()) return; try { const base = this.getApiBase(); - await fetch(`${base}/api/notebooks`, { + const res = await fetch(`${base}/api/notebooks`, { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ title }), + body: JSON.stringify({ title: "Untitled Notebook" }), }); - await this.loadNotebooks(); + const nb = await res.json(); + if (nb?.id) { + this.view = "notebook"; + await this.loadNotebook(nb.id); + } else { + await this.loadNotebooks(); + } } catch { this.error = "Failed to create notebook"; this.render();