feat(settings): show automatic build number

The launcher settings dialog now shows a Build-Nr value in its footer so users
can identify the exact application build without manually updating a number
before release.

The value is generated by Vite when the frontend bundle is built and injected
as an import.meta.env constant. Using the current millisecond timestamp keeps
the number numeric and monotonic for normal builds without a checked-in counter
file or any extra build-state mutation. The tradeoff is that the value follows
the build machine clock rather than a central sequence service.

The footer layout now keeps the build number on the lower left and the Done
button on the lower right.

Test Plan:
- just frontend-test
- just build
- git diff --cached --check

Refs: local user request
This commit is contained in:
2026-05-21 17:27:23 +02:00
parent a5307d3d6a
commit a913e4c776
4 changed files with 21 additions and 1 deletions
@@ -18,6 +18,8 @@ interface Props {
onClose: () => void;
}
const buildNr = import.meta.env.VITE_LANSPREAD_BUILD_NR;
interface RowProps {
label: string;
hint: string;
@@ -126,6 +128,7 @@ export const SettingsDialog = ({ settings, onChange, onClose }: Props) => (
</div>
<div className="settings-foot">
<div className="settings-build-nr">Build-Nr: {buildNr}</div>
<button type="button" className="settings-done" onClick={onClose}>Done</button>
</div>
</Modal>
@@ -1468,11 +1468,18 @@
}
.settings-foot {
display: flex;
justify-content: flex-end;
align-items: center;
justify-content: space-between;
padding: 14px 22px 18px;
border-top: 1px solid var(--bd-1);
gap: 10px;
}
.settings-build-nr {
min-width: 0;
color: var(--t-3);
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.settings-done {
height: 36px;
padding: 0 22px;
+4
View File
@@ -1 +1,5 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_LANSPREAD_BUILD_NR: string;
}