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:
@@ -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
3
app/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare const __APP_VERSION__: string;
|
||||
@@ -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'],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user