diff --git a/src/main.js b/src/main.js index f43c0bd3..a26d9340 100644 --- a/src/main.js +++ b/src/main.js @@ -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; @@ -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; diff --git a/vite.config.js b/vite.config.js index 1143fb8a..628ce884 100644 --- a/vite.config.js +++ b/vite.config.js @@ -40,4 +40,7 @@ export default { }, }), ], + define: { + '__APP_VERSION__': JSON.stringify(pkg.version), + }, } \ No newline at end of file