Merge branch 'production' into front

This commit is contained in:
“kirukib” 2026-02-27 17:20:40 +03:00
commit c7447f68ad
3 changed files with 23 additions and 4 deletions

2
src/globals.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare const __BUILD_HASH__: string
declare const __BUILD_TIME__: string

View File

@ -216,7 +216,7 @@ export function LoginPage() {
<div className="h-9 w-9 rotate-45 rounded-lg bg-white/90" /> <div className="h-9 w-9 rotate-45 rounded-lg bg-white/90" />
</div> </div>
<h2 className="mb-4 text-3xl font-bold tracking-tight text-white"> <h2 className="mb-4 text-3xl font-bold tracking-tight text-white">
Yimaru Academy Yimaru Academy Test Mode
</h2> </h2>
<p className="text-base leading-relaxed text-white/70"> <p className="text-base leading-relaxed text-white/70">
Manage your academy, track student progress, and streamline Manage your academy, track student progress, and streamline
@ -401,11 +401,15 @@ export function LoginPage() {
</form> </form>
{/* Footer */} {/* Footer */}
<p className="mt-10 text-center text-xs text-grayScale-400"> <div className="mt-10 text-center text-xs text-grayScale-400">
© {new Date().getFullYear()} Yimaru Academy · All rights reserved <p>© {new Date().getFullYear()} Yimaru Academy · All rights reserved</p>
</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> </div>
</div> </div>
); );
} }

View File

@ -1,8 +1,21 @@
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
import { execSync } from 'child_process'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], 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()),
},
}) })