Show app version from Tauri instead of sidecar
The version label was reading from backendStore.version which comes from the sidecar's version.py (hardcoded at build time). Now uses Tauri's getVersion() API which reads from tauri.conf.json -- the actual app version that gets bumped by the release workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
let sidecarState = $state<SidecarState>("checking");
|
let sidecarState = $state<SidecarState>("checking");
|
||||||
let debugLog = $state("");
|
let debugLog = $state("");
|
||||||
let availableUpdate = $state("");
|
let availableUpdate = $state("");
|
||||||
|
let appVersion = $state("");
|
||||||
|
|
||||||
let obsDisplayUrl = $derived(backendStore.obsUrl);
|
let obsDisplayUrl = $derived(backendStore.obsUrl);
|
||||||
let syncDisplayUrl = $derived(backendStore.syncUrl);
|
let syncDisplayUrl = $derived(backendStore.syncUrl);
|
||||||
@@ -108,6 +109,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
// Get app version from Tauri
|
||||||
|
import("@tauri-apps/api/app").then(({ getVersion }) =>
|
||||||
|
getVersion().then((v) => { appVersion = v; })
|
||||||
|
).catch(() => {
|
||||||
|
// Browser dev mode -- read from package.json or use fallback
|
||||||
|
appVersion = "dev";
|
||||||
|
});
|
||||||
|
|
||||||
checkAndLaunchSidecar();
|
checkAndLaunchSidecar();
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
@@ -201,7 +210,7 @@
|
|||||||
<TranscriptionDisplay />
|
<TranscriptionDisplay />
|
||||||
<Controls />
|
<Controls />
|
||||||
|
|
||||||
<div class="version-label">v{backendStore.version}</div>
|
<div class="version-label">v{appVersion || backendStore.version}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if showSettings}
|
{#if showSettings}
|
||||||
|
|||||||
Reference in New Issue
Block a user