Skip to content

Commit 5022879

Browse files
phucntphucnt
authored andcommitted
v0.5.1: correct version bump + relaunch fix
1 parent 7cc93e6 commit 5022879

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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"

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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>

src/js/app.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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';

0 commit comments

Comments
 (0)