Skip to content

Commit b810f7a

Browse files
committed
Fix current version text in the Blackbox Explorer
1 parent 8ab3213 commit b810f7a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/main.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ import defaultWorkspaceGraphConfigs from './workspaces-ctzsnooze.json';
3838
// TODO: this is a hack, once we move to web fix this
3939
globalThis.userSettings = null;
4040

41-
var VIEWER_VERSION = getManifestVersion(); // Current version
42-
4341
// these values set the initial dimensions of a secondary window
4442
// which always opens at the centre of the user's screen
4543
const NEW_WINDOW_WIDTH = 1000;
@@ -1045,8 +1043,8 @@ function BlackboxLogViewer() {
10451043
});
10461044

10471045
// Get Latest Version Information
1048-
$("#viewer-version").text('You are using version ' + VIEWER_VERSION);
1049-
$(".viewer-version", statusBar).text('v'+VIEWER_VERSION);
1046+
$("#viewer-version").text('You are using version ' + __APP_VERSION__);
1047+
$(".viewer-version", statusBar).text('v'+__APP_VERSION__);
10501048
try {
10511049
$.getJSON('https://api.github.com/repos/betaflight/blackbox-log-viewer/releases/latest',{},function(data){
10521050
latestVersion = data;

vite.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ export default {
4040
},
4141
}),
4242
],
43+
define: {
44+
'__APP_VERSION__': JSON.stringify(pkg.version),
45+
},
4346
}

0 commit comments

Comments
 (0)