File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Show build details in footer
Original file line number Diff line number Diff line change @@ -13,9 +13,30 @@ export const Footer: FC = () => {
1313
1414 < div className = "flex items-center gap-2.5" >
1515 < p className = "text-xs text-muted-foreground" >
16- < a href = "#" rel = "noopener noreferrer" target = "_blank" >
17- Version { APP_VERSION }
18- </ a >
16+ Version:{ ' ' }
17+ < a
18+ href = { `${ GITHUB_REPOSITORY_URL } releases/tag/v${ APP_VERSION } ` }
19+ rel = "noopener noreferrer"
20+ target = "_blank"
21+ >
22+ { APP_VERSION }
23+ </ a > { ' ' }
24+ < span className = "hidden md:inline" >
25+ (commit:{ ' ' }
26+ < a
27+ href = { `${ GITHUB_REPOSITORY_URL } commit/${ BUILD_COMMIT } ` }
28+ rel = "noopener noreferrer"
29+ target = "_blank"
30+ >
31+ { BUILD_COMMIT . substring ( 0 , 7 ) }
32+ </ a >
33+ ) built on{ ' ' }
34+ { new Intl . DateTimeFormat ( 'en' , {
35+ year : 'numeric' ,
36+ month : 'numeric' ,
37+ day : 'numeric' ,
38+ } ) . format ( BUILD_DATETIME ) }
39+ </ span >
1940 </ p >
2041 < span className = "text-xs text-muted-foreground" > |</ span >
2142 < a
Original file line number Diff line number Diff line change 22
33declare const APP_VERSION : string
44declare const BUILD_COMMIT : string
5+ declare const BUILD_DATETIME : number
6+ declare const GITHUB_REPOSITORY_URL : string
57
68interface ImportMetaEnv {
79 VITE_WALLET_CONNECT_PROJECT_ID : string
Original file line number Diff line number Diff line change 1- import { defineConfig } from 'vite' ;
2- import react from '@vitejs/plugin-react' ;
3- import tailwindcss from '@tailwindcss/vite' ;
4- import { version } from './package.json' ;
1+ import { defineConfig } from 'vite'
2+ import react from '@vitejs/plugin-react'
3+ import tailwindcss from '@tailwindcss/vite'
4+ import { version } from './package.json'
55import { execSync } from 'node:child_process'
66
77// https://vite.dev/config/
@@ -10,5 +10,7 @@ export default defineConfig({
1010 define : {
1111 APP_VERSION : JSON . stringify ( version ) ,
1212 BUILD_COMMIT : JSON . stringify ( execSync ( 'git rev-parse HEAD' ) . toString ( ) . trim ( ) ) ,
13+ BUILD_DATETIME : JSON . stringify ( new Date ( ) . getTime ( ) ) ,
14+ GITHUB_REPOSITORY_URL : JSON . stringify ( 'https://github.com/oasisprotocol/rofl-app/' ) ,
1315 } ,
14- } ) ;
16+ } )
You can’t perform that action at this time.
0 commit comments