From 976ff404db08d3a910eae9afe6b35a7409ab85d6 Mon Sep 17 00:00:00 2001 From: lony2003 Date: Sun, 7 Jul 2024 08:27:51 +0800 Subject: [PATCH] let version code in menu fit the package json --- electron/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electron/main.js b/electron/main.js index 29b675d..56e9ab5 100644 --- a/electron/main.js +++ b/electron/main.js @@ -4,7 +4,8 @@ import path from 'node:path' import Store from 'electron-store' import * as urlUtil from "node:url" import {autoUpdater, UpdateInfo} from "electron-updater" -import * as url from "node:url"; +import * as url from "node:url" +import packageJson from "../package.json"; // The built directory structure // @@ -287,7 +288,7 @@ function createWindow() { }, }, { - label: 'BingGPT v0.4.3', + label: `BingGPT v${packageJson.version}`, visible: parameters.selectionText.trim().length === 0, click: () => { shell.openExternal('https://github.com/fangkehou-team/BingGPT_Enhanced_Editon/releases')