mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-26 04:50:18 +00:00
fixed #40
This commit is contained in:
parent
5957be9526
commit
103410ef09
4 changed files with 19 additions and 6 deletions
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -5411,6 +5411,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"electron-is-dev": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.2.0.tgz",
|
||||
"integrity": "sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw=="
|
||||
},
|
||||
"electron-log": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.2.0.tgz",
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"buefy": "^0.8.20",
|
||||
"bulma": "^0.8.2",
|
||||
"core-js": "^3.6.4",
|
||||
"electron-is-dev": "^1.2.0",
|
||||
"electron-log": "^4.2.0",
|
||||
"electron-store": "^5.1.1",
|
||||
"is-electron": "^2.2.0",
|
||||
|
|
|
@ -40,9 +40,11 @@ i18n.locale = wtconfig.get('general.language', 'en')
|
|||
Vue.config.productionTip = false
|
||||
|
||||
// App Menu Bar
|
||||
log.info('Starting to build App Menu')
|
||||
const menuTemplate = require('./menubar.js')
|
||||
const menu = require('electron').remote.Menu.buildFromTemplate(menuTemplate.default)
|
||||
require('electron').remote.Menu.setApplicationMenu(menu)
|
||||
log.info('App Menu builded')
|
||||
|
||||
new Vue({
|
||||
render: h => h(App),
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import i18n from './i18n'
|
||||
import { shell } from 'electron'
|
||||
|
||||
const isDev = require('electron-is-dev');
|
||||
|
||||
console.log('Ged Mode:' + isDev)
|
||||
|
||||
var appName = require('electron').remote.app.getName();
|
||||
var appHome = require('electron').remote.app.getPath('home')
|
||||
|
||||
var logLinux = appHome + '/.config/' + appName + '/logs'
|
||||
var logWin = appHome + '\\AppData\\Roaming\\' + appName + '\\logs'
|
||||
var logMac = appHome + '/Library/Logs/' + appName
|
||||
|
@ -13,7 +15,6 @@ const isMac = process.platform === 'darwin'
|
|||
const isLinux = process.platform === 'linux'
|
||||
const isWindows = process.platform === 'win32'
|
||||
|
||||
|
||||
// Menu template
|
||||
const menuTemplate = [
|
||||
{
|
||||
|
@ -96,10 +97,14 @@ const menuTemplate = [
|
|||
label: i18n.t("Common.Menu.View.menuForceReload"),
|
||||
role: 'forceReload'
|
||||
},
|
||||
{
|
||||
label: i18n.t("Common.Menu.View.menuToggleDeveloperTools"),
|
||||
role: 'toggleDevTools'
|
||||
},
|
||||
isDev ?
|
||||
{
|
||||
label: i18n.t("Common.Menu.View.menuToggleDeveloperTools"),
|
||||
role: 'toggleDevTools'
|
||||
}: {
|
||||
label: "nothere",
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue