version display added
This commit is contained in:
parent
a030b925d3
commit
6f9323de27
1
.env
1
.env
|
|
@ -1,2 +1,3 @@
|
|||
VITE_API_BASE_URL=http://localhost:8080/api/v1
|
||||
VITE_GOOGLE_CLIENT_ID=google_client_id
|
||||
VERSION=1.0.0
|
||||
|
|
|
|||
2
src/globals.d.ts
vendored
Normal file
2
src/globals.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
declare const __BUILD_HASH__: string
|
||||
declare const __BUILD_TIME__: string
|
||||
|
|
@ -401,11 +401,15 @@ export function LoginPage() {
|
|||
</form>
|
||||
|
||||
{/* Footer */}
|
||||
<p className="mt-10 text-center text-xs text-grayScale-400">
|
||||
© {new Date().getFullYear()} Yimaru Academy · All rights reserved
|
||||
<div className="mt-10 text-center text-xs text-grayScale-400">
|
||||
<p>© {new Date().getFullYear()} Yimaru Academy · All rights reserved</p>
|
||||
<p className="mt-1 font-mono text-[10px] text-grayScale-300">
|
||||
v{__BUILD_HASH__} · {new Date(__BUILD_TIME__).toLocaleDateString()}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,21 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { execSync } from 'child_process'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
define: {
|
||||
__BUILD_HASH__: JSON.stringify(
|
||||
(() => {
|
||||
try {
|
||||
return execSync('git rev-parse --short HEAD').toString().trim()
|
||||
} catch {
|
||||
return 'unknown'
|
||||
}
|
||||
})()
|
||||
),
|
||||
__BUILD_TIME__: JSON.stringify(new Date().toISOString()),
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user