Add version number display to UI header

Inject app version (v1.0.0) at build time via Vite define config
and display it below the title in muted text.
This commit is contained in:
2026-03-13 15:45:58 -04:00
parent 10b56789e2
commit 5c598d1fc6
3 changed files with 8 additions and 1 deletions

View File

@@ -102,9 +102,10 @@ function App() {
/>
</>
)}
<h1 style={{ fontSize: '20px', marginBottom: '12px', color: '#111' }}>
<h1 style={{ fontSize: '20px', marginBottom: '2px', color: '#111' }}>
EMBA Specialization Solver
</h1>
<div style={{ fontSize: '11px', color: '#999', marginBottom: '12px' }}>v{__APP_VERSION__}</div>
<ModeToggle mode={state.mode} onSetMode={setMode} />

3
app/src/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
/// <reference types="vite/client" />
declare const __APP_VERSION__: string;

View File

@@ -5,6 +5,9 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
define: {
__APP_VERSION__: JSON.stringify('1.0.0'),
},
server: {
allowedHosts: ['soos'],
},