feat(ui): display version and git hash in header

Add version info display below "ERP Auto" logo showing format:
${version}(${git-hash})

- Inject __APP_VERSION__ and __GIT_HASH__ via vite define
- Add TypeScript declarations for global constants
- Simplify portable artifact name (remove version)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-03-16 15:00:38 +08:00
parent 9e577a2226
commit cccc4e4c8c
5 changed files with 30 additions and 6 deletions

View File

@@ -332,12 +332,17 @@ function App(): React.JSX.Element {
</div>
<div
className="flex items-center gap-2 text-white font-bold text-lg cursor-pointer"
className="flex flex-col cursor-pointer"
onClick={() => setCurrentPage('home')}
style={{ WebkitAppRegion: 'no-drag' } as any}
>
<LayoutDashboard size={22} className="text-blue-500" />
<span>ERP Auto</span>
<div className="flex items-center gap-2 text-white font-bold text-lg">
<LayoutDashboard size={22} className="text-blue-500" />
<span>ERP Auto</span>
</div>
<span className="text-xs text-slate-400 ml-7">
{__APP_VERSION__}({__GIT_HASH__})
</span>
</div>
</div>

View File

@@ -1 +1,4 @@
/// <reference types="vite/client" />
declare const __APP_VERSION__: string
declare const __GIT_HASH__: string