mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2025-02-16 19:38:26 +00:00
added info window with version, shell, renderer, Node, Architecture. Version can be translated.
This commit is contained in:
parent
59a8a82c15
commit
c38c3da265
3 changed files with 42 additions and 2 deletions
|
@ -70,7 +70,12 @@
|
|||
"menuHelp": "Help",
|
||||
"menuForum": "Forums",
|
||||
"menuGithub": "Github",
|
||||
"menuManual": "Manual"
|
||||
"menuManual": "Manual",
|
||||
"menuAbout": "About WebTools",
|
||||
"menuAboutText":{
|
||||
"menuAboutVersion":"Version"
|
||||
}
|
||||
|
||||
},
|
||||
"Sidebar": {
|
||||
"NavSections":{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import i18n from '../../../i18n'
|
||||
import { shell } from 'electron'
|
||||
import { wtutils} from '../../modules/General/wtutils';
|
||||
import { wtutils, dialog} from '../../modules/General/wtutils';
|
||||
|
||||
// Menu template
|
||||
const menuTemplate = [
|
||||
|
@ -129,6 +129,11 @@ const menuTemplate = [
|
|||
{
|
||||
label: i18n.t("Common.Menu.Help.menuManual"),
|
||||
click: () => { shell.openExternal("https://github.com/WebTools-NG/WebTools-NG/wiki") }
|
||||
},
|
||||
{
|
||||
label: i18n.t("Common.Menu.Help.menuAbout"),
|
||||
click: () => { dialog.AboutWindow( i18n.t("Common.Menu.Help.menuAbout"), i18n.t("Common.Ok"));
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
This file contains different functions and methods
|
||||
that we use in our solution.
|
||||
*/
|
||||
import i18n from '../../../i18n'
|
||||
|
||||
const log = require('electron-log');
|
||||
console.log = log.log;
|
||||
|
@ -277,6 +278,35 @@ const dialog = new class Dialog {
|
|||
log.debug('Returned directoryname is: ' + dirName)
|
||||
return dirName
|
||||
|
||||
}
|
||||
|
||||
AboutWindow(Title, OKLabel)
|
||||
{
|
||||
log.debug('Open AboutWindow Dialog')
|
||||
const {remote} = require('electron'),
|
||||
dialog = remote.dialog,
|
||||
WIN = remote.getCurrentWindow();
|
||||
const aboutInformation =
|
||||
(i18n.t("Common.Menu.Help.menuAboutText.menuAboutVersion") +": " + wtutils.AppVersion) +
|
||||
'\nShell: ' + process.versions.electron +
|
||||
'\nRenderer: ' + process.versions.chrome +
|
||||
'\nNode: ' + process.versions.node +
|
||||
'\nArchitecture: ' + process.arch;
|
||||
let options = {
|
||||
buttonLabel : OKLabel,
|
||||
title: Title,
|
||||
message: 'WebTools-NG',
|
||||
detail: aboutInformation,
|
||||
type: 'info',
|
||||
noLink: true,
|
||||
|
||||
}
|
||||
|
||||
let aboutWindow = dialog.showMessageBox(WIN, options)
|
||||
return aboutWindow
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SaveFile(title, defaultPath, OKLabel) {
|
||||
|
|
Loading…
Add table
Reference in a new issue