File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://schema.tauri.app/config/2" ,
33 "productName" : " MyTranslator" ,
4- "version" : " 0.5.0 " ,
4+ "version" : " 0.5.1 " ,
55 "identifier" : " com.personal.translator" ,
66 "build" : {
77 "frontendDist" : " ../src"
Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ <h2>Settings</h2>
408408 < div class ="settings-section about-info ">
409409 < div class ="about-app-header ">
410410 < span class ="about-app-name "> My Translator</ span >
411- < span class ="about-app-version " id ="about-version "> v0.5.0 </ span >
411+ < span class ="about-app-version " id ="about-version "> v0.5.1 </ span >
412412 </ div >
413413 < p class ="hint "> Real-time speech translator for macOS & Windows</ p >
414414 </ div >
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class App {
7777 this . _initAboutTab ( ) ;
7878 this . _checkForUpdates ( ) ;
7979
80- console . log ( '🌐 My Translator v0.5.0 initialized' ) ;
80+ console . log ( '🌐 My Translator v0.5.1 initialized' ) ;
8181 }
8282
8383 async _checkPlatformSupport ( ) {
@@ -1451,6 +1451,15 @@ class App {
14511451 }
14521452 } ) ;
14531453 if ( btnText ) btnText . textContent = 'Restarting...' ;
1454+ // Relaunch the app to apply the update
1455+ const relaunch = window . __TAURI__ ?. process ?. relaunch ;
1456+ if ( relaunch ) {
1457+ await relaunch ( ) ;
1458+ } else {
1459+ // Fallback: use invoke
1460+ const invoke = window . __TAURI__ ?. core ?. invoke ;
1461+ if ( invoke ) await invoke ( 'plugin:process|restart' ) ;
1462+ }
14541463 } catch ( err ) {
14551464 const errMsg = err ?. message || String ( err ) ;
14561465 if ( btnText ) btnText . textContent = 'Failed — try again' ;
You can’t perform that action at this time.
0 commit comments