Minor canvas improvements

This commit is contained in:
2026-10-04 15:34:47 +02:00
parent 2903986f44
commit 95002a34ad
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ navigation and canvas.js can save on pagehide. */}}
{{define "shell"}}
<div class="canvas-app" data-version="{{.Version}}"{{if .Error}} data-readonly{{end}}>
<div class="canvas-bar">
<span class="canvas-title truncate"><a href="{{.PageURL}}">{{.PageURL}}</a>{{.Name}}</span>
<span class="canvas-title truncate">{{.Title}}</span>
{{if not .Error}}
<span class="canvas-tools">
<button type="button" class="btn btn-tool" data-canvas="text" title="Add a note (or double-click the background)">TEXT</button>
+2
View File
@@ -132,6 +132,8 @@
// Folders end with "/" — let the browser navigate normally.
var path = (item && item.dataset.path) || anchor.getAttribute('href');
if (!path || path.endsWith('/')) return;
// Canvases open in the wiki's own canvas view.
if (/\.canvas$/i.test(path.split(/[?#]/)[0])) return;
// Allow modified clicks (open in new tab, etc.) to pass through.
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
var rel = wikiPathFromHref(path);
-2
View File
@@ -960,8 +960,6 @@ label.tree-name { flex: 1; cursor: pointer; position: relative; }
font-size: var(--font-sm);
}
.canvas-title { min-width: 0; max-width: 30rem; }
.canvas-title a { color: var(--link); }
.canvas-title a:hover { color: var(--link-hover); }
.canvas-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.canvas-status { margin-left: auto; }
.canvas-status.is-error { color: var(--danger); }