chore: singe source of truth for version & show it on splash screen (#7)

Co-authored-by: 2mal3 <56305732+2mal3@users.noreply.github.com>
This commit is contained in:
E44
2026-01-10 14:06:10 -05:00
committed by GitHub
parent c64eb345fd
commit b0a57f9c67
6 changed files with 31 additions and 5 deletions
+5
View File
@@ -2,7 +2,12 @@ package shared
import (
_ "embed"
"strings"
)
//go:embed splash_screen.html
var SplashScreenTemplate string
//go:embed version.txt
var versionNotTrimmed string
var Version = strings.TrimSpace(versionNotTrimmed)
+16
View File
@@ -167,6 +167,7 @@
/>
<path class="window-controls" d="M 550 375 h 15" />
</svg>
<div class="fade-in">
<div
class="cursor-x"
@@ -196,6 +197,8 @@
</svg>
</div>
</div>
<span id="version-label" aria-label="Version">%%APP-VERSION%%</span>
</div>
<style>
@@ -216,6 +219,8 @@
--other-button: oklch(55.3% 0.013 58.071);
--splash-control-monitor: oklch(44.4% 0.011 73.639);
--version-color: oklch(55.3% 0.013 58.071);
--mouse-size: 50px;
--mouse-bounce-delay: 5s;
--mouse-start-x: calc((35 * 100vw) / 1920);
@@ -229,6 +234,17 @@
--gap: 20;
}
#version-label {
position: absolute;
right: 1rem;
top: 1rem;
display: block;
color: var(--version-color);
padding: 0.4rem 0.8rem;
font-size: 1.4rem;
text-align: right;
}
#splash {
position: fixed;
inset: 0;
+1
View File
@@ -0,0 +1 @@
v0.0.10