mirror of
https://github.com/heyman/heynote.git
synced 2025-02-16 10:19:55 +01:00
Add beta channel info to about window
To avoid confusion for users on beta channel when the latest released version is a non-beta version.
This commit is contained in:
parent
6ec64ed3ee
commit
eb886a39e5
@ -1,6 +1,8 @@
|
||||
import { join } from 'node:path'
|
||||
import { app, BrowserWindow, nativeTheme } from 'electron'
|
||||
|
||||
import { win } from "./index"
|
||||
import CONFIG from "../config"
|
||||
|
||||
let aboutWindow = null;
|
||||
|
||||
@ -31,10 +33,15 @@ export function openAboutWindow() {
|
||||
aboutWindow.loadFile(join(process.env.DIST, 'about.html'))
|
||||
}
|
||||
|
||||
let versionString = app.getVersion()
|
||||
if (CONFIG.get("settings.allowBetaVersions")) {
|
||||
versionString += " (beta channel)"
|
||||
}
|
||||
|
||||
// don't show until content is loaded
|
||||
aboutWindow.webContents.on("did-finish-load", () => {
|
||||
aboutWindow.webContents.send("init", {
|
||||
"version": app.getVersion(),
|
||||
"version": versionString,
|
||||
});
|
||||
aboutWindow.show()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user