feat(about): two-column build info, show git commit hash
- Build Info grid now uses 2-column layout (Version|License, Platform|Build) - Build field shows date + short commit hash (6 chars) injected at build time via VITE_BUILD_COMMIT
This commit is contained in:
1 parent
321a165285
commit
8051f1745b
3 files changed
+13
-2
No files matched your search
@@ -13,6 +13,7 @@
|
||||
let { isOpen, onClose }: Props = $props();
|
||||
|
||||
const BUILD_DATE = import.meta.env.VITE_BUILD_DATE || new Date().toISOString().split('T')[0];
|
||||
const BUILD_COMMIT = import.meta.env.VITE_BUILD_COMMIT || '';
|
||||
|
||||
let appName = $state('QBZ');
|
||||
let appVersion = $state('0.0.0');
|
||||
@@ -100,7 +101,7 @@
|
||||
<span class="label">Platform</span>
|
||||
<span class="value">{platformLabel}</span>
|
||||
<span class="label">Build</span>
|
||||
<span class="value">{BUILD_DATE}</span>
|
||||
<span class="value">{BUILD_DATE}{#if BUILD_COMMIT} <span class="commit">({BUILD_COMMIT})</span>{/if}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -330,7 +331,7 @@
|
||||
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-columns: auto 1fr auto 1fr;
|
||||
gap: 6px 16px;
|
||||
font-size: 13px;
|
||||
}
|
||||
@@ -344,6 +345,11 @@
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.commit {
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.attributions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
Reference in new issue
Block a user