Remove prompt() from createPage() — creates Untitled file directly in correct workspace
This commit is contained in:
@@ -555,9 +555,7 @@
|
|||||||
|
|
||||||
// ── Workspace context → create workspace item ──
|
// ── Workspace context → create workspace item ──
|
||||||
if (ctx.wsId > 0) {
|
if (ctx.wsId > 0) {
|
||||||
var name = prompt('File name:');
|
var body = { name: 'Untitled', type: 'page' };
|
||||||
if (!name || !name.trim()) return;
|
|
||||||
var body = { name: name.trim(), type: 'page' };
|
|
||||||
if (ctx.isGitea) body.workspace_id = ctx.wsId;
|
if (ctx.isGitea) body.workspace_id = ctx.wsId;
|
||||||
|
|
||||||
fetch('/api/local-workspace/items', {
|
fetch('/api/local-workspace/items', {
|
||||||
|
|||||||
Reference in New Issue
Block a user