summaryrefslogtreecommitdiffhomepage
path: root/src/app
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-22 11:23:43 +0900
committerAdam Malczewski <[email protected]>2026-06-22 11:23:43 +0900
commitd6f60f4a81d9714176ef3d8cc60938c01c55b7d6 (patch)
tree95a9f9fba4fe9669ec6425415055bcc4d27ff66c /src/app
parent9744b0271e173264a0375db8bb6667a45da1ed5e (diff)
downloaddispatch-web-d6f60f4a81d9714176ef3d8cc60938c01c55b7d6.tar.gz
dispatch-web-d6f60f4a81d9714176ef3d8cc60938c01c55b7d6.zip
feat: show 5-char git hash next to hamburger for cache-bust detection
Vite define bakes __APP_VERSION__ (git rev-parse --short=5 HEAD) at build time — survives bundling into the arch package deploy. Falls back to 'dev' when not in a git repo. Also fixes two noNonNullAssertion warnings in place.ts.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/App.svelte6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app/App.svelte b/src/app/App.svelte
index 3024a44..41e68ef 100644
--- a/src/app/App.svelte
+++ b/src/app/App.svelte
@@ -301,6 +301,12 @@
onClose={(id) => store.closeTab(id)}
onNewDraft={() => store.newDraft()}
/>
+ <span
+ class="shrink-0 select-none px-1 font-mono text-[10px] leading-none text-base-content/30"
+ title="Build version (git short hash)"
+ >
+ {__APP_VERSION__}
+ </span>
<button
class="btn btn-square btn-ghost btn-sm mx-1 shrink-0"
aria-label="Toggle sidebar"