mirror of
https://github.com/heyman/heynote.git
synced 2025-08-15 09:12:38 +02:00
Add version number to settings dialog.
For the web app we also display the git hash.
This commit is contained in:
12
electron/main/version.js
Normal file
12
electron/main/version.js
Normal file
@ -0,0 +1,12 @@
|
||||
import { app, ipcMain } from "electron"
|
||||
import CONFIG from "../config"
|
||||
|
||||
export function getVersionString() {
|
||||
let versionString = app.getVersion()
|
||||
if (CONFIG.get("settings.allowBetaVersions")) {
|
||||
versionString += " (beta channel)"
|
||||
}
|
||||
return versionString
|
||||
}
|
||||
|
||||
ipcMain.handle("getVersion", () => getVersionString())
|
Reference in New Issue
Block a user