File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 run : |
4141 VERSION="${GITHUB_REF_NAME#v}"
4242 jq --arg v "$VERSION" '.version = $v' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json
43+ sed -i.bak "s/^version = \"[^\"]*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml && rm -f src-tauri/Cargo.toml.bak
4344
4445 - name : Install frontend dependencies
4546 run : npm install
Original file line number Diff line number Diff line change 11[package ]
22name = " stack"
3- version = " 0.1.1 "
3+ version = " 1.0.3 "
44description = " Local sample library manager"
55authors = [" Stack" ]
66edition = " 2021"
Original file line number Diff line number Diff line change 11import { useEffect , useState } from 'react' ;
2+ import { getVersion } from '@tauri-apps/api/app' ;
23import { useQuery , useQueryClient } from '@tanstack/react-query' ;
34import { libraryService } from '../services/libraryService' ;
45import { settingsService } from '../services/settingsService' ;
@@ -198,6 +199,11 @@ export function SettingsPage() {
198199 const [ settings , setSettings ] = useState < Settings > ( DEFAULT_SETTINGS ) ;
199200 const [ saving , setSaving ] = useState ( false ) ;
200201 const [ confirmDisablePlaygroundOpen , setConfirmDisablePlaygroundOpen ] = useState ( false ) ;
202+ const [ appVersion , setAppVersion ] = useState < string > ( '' ) ;
203+
204+ useEffect ( ( ) => {
205+ getVersion ( ) . then ( setAppVersion ) . catch ( ( ) => { } ) ;
206+ } , [ ] ) ;
201207
202208 // Sync OS autostart state on mount
203209 useEffect ( ( ) => {
@@ -482,7 +488,7 @@ export function SettingsPage() {
482488 { /* ── About ── */ }
483489 < SettingSection title = "About" >
484490 < div className = "rounded-md border border-gray-700 bg-gray-800 p-4 text-sm text-gray-300 space-y-2" >
485- < div > < span className = "text-gray-500" > Version </ span > < span className = "mono" > 0.1.0 </ span > </ div >
491+ < div > < span className = "text-gray-500" > Version </ span > < span className = "mono" > { appVersion || '—' } </ span > </ div >
486492 < div > < span className = "text-gray-500" > Stack </ span > < span className = "mono" > Tauri 2 · React 18 · SQLite · Rust</ span > </ div >
487493 < div className = "pt-2" >
488494 < Button
You can’t perform that action at this time.
0 commit comments