Skip to content

Fix current version text in the Blackbox Explorer #746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ import defaultWorkspaceGraphConfigs from './workspaces-ctzsnooze.json';
// TODO: this is a hack, once we move to web fix this
globalThis.userSettings = null;

var VIEWER_VERSION = getManifestVersion(); // Current version

// these values set the initial dimensions of a secondary window
// which always opens at the centre of the user's screen
const NEW_WINDOW_WIDTH = 1000;
Expand Down Expand Up @@ -1045,8 +1043,8 @@ function BlackboxLogViewer() {
});

// Get Latest Version Information
$("#viewer-version").text('You are using version ' + VIEWER_VERSION);
$(".viewer-version", statusBar).text('v'+VIEWER_VERSION);
$("#viewer-version").text('You are using version ' + __APP_VERSION__);
$(".viewer-version", statusBar).text('v'+__APP_VERSION__);
try {
$.getJSON('https://api.github.com/repos/betaflight/blackbox-log-viewer/releases/latest',{},function(data){
latestVersion = data;
Expand Down
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ export default {
},
}),
],
define: {
'__APP_VERSION__': JSON.stringify(pkg.version),
},
}