张恒

--no commit message

1 // 这里是定义菜单的地方,详情请查看 https://electronjs.org/docs/api/menu 1 // 这里是定义菜单的地方,详情请查看 https://electronjs.org/docs/api/menu
2 const { dialog } = require('electron') 2 const { dialog } = require('electron')
3 -const menu = [{ 3 +const menu = [
4 - label: '文档操作', 4 + {
5 - submenu: [{ 5 + label: '设置',
6 - label: '撤销', 6 + submenu: [{
7 - accelerator: 'CmdOrCtrl+Z', 7 + label: '快速重启',
8 - role: 'undo' 8 + accelerator: 'F5',
9 + role: 'reload'
10 + }, {
11 + label: '退出',
12 + accelerator: 'CmdOrCtrl+F4',
13 + role: 'close'
14 + }]
9 }, { 15 }, {
10 - label: '复制', 16 + label: '帮助',
11 - accelerator: 'CmdOrCtrl+C', 17 + submenu: [{
12 - role: 'copy' 18 + label: '切换到开发者模式',
19 + accelerator: 'CmdOrCtrl+I',
20 + role: 'toggledevtools'
21 + }, {
22 + label: '关于',
23 + role: 'about',
24 + click: function () {
25 + dialog.showMessageBox({
26 + title: '关于',
27 + type: 'info',
28 + message: '存放显示这个的信息是在,src/main/menu.js中,请自行修改'
29 + })
30 + }
31 + }]
13 }] 32 }]
14 -},
15 -{
16 - label: '设置',
17 - submenu: [{
18 - label: '快速重启',
19 - accelerator: 'F5',
20 - role: 'reload'
21 - }, {
22 - label: '退出',
23 - accelerator: 'CmdOrCtrl+F4',
24 - role: 'close'
25 - }]
26 -}, {
27 - label: '帮助',
28 - submenu: [{
29 - label: '切换到开发者模式',
30 - accelerator: 'CmdOrCtrl+I',
31 - role: 'toggledevtools'
32 - }, {
33 - label: '关于',
34 - role: 'about',
35 - click: function () {
36 - dialog.showMessageBox({
37 - title: '关于',
38 - type: 'info',
39 - message: '存放显示这个的信息是在,src/main/menu.js中,请自行修改'
40 - })
41 - }
42 - }]
43 -}]
44 export default menu 33 export default menu
......
...@@ -14,7 +14,6 @@ function createMainWindow () { ...@@ -14,7 +14,6 @@ function createMainWindow () {
14 useContentSize: true, 14 useContentSize: true,
15 width: 1000, 15 width: 1000,
16 show: false, 16 show: false,
17 - // transparent: true,
18 titleBarStyle: 'hidden', 17 titleBarStyle: 'hidden',
19 webPreferences: { 18 webPreferences: {
20 nodeIntegration: true 19 nodeIntegration: true
...@@ -39,7 +38,7 @@ function loadindWindow (loadingURL) { ...@@ -39,7 +38,7 @@ function loadindWindow (loadingURL) {
39 width: 400, 38 width: 400,
40 height: 600, 39 height: 600,
41 frame: false, 40 frame: false,
42 - 41 + backgroundColor: '#222428',
43 transparent: true, 42 transparent: true,
44 webPreferences: { experimentalFeatures: true } 43 webPreferences: { experimentalFeatures: true }
45 }) 44 })
...@@ -48,11 +47,12 @@ function loadindWindow (loadingURL) { ...@@ -48,11 +47,12 @@ function loadindWindow (loadingURL) {
48 47
49 loadWindow.show() 48 loadWindow.show()
50 49
51 - setTimeout(() => { 50 + // setTimeout(() => {
52 - createMainWindow() 51 + // createMainWindow()
53 - loadWindow.destroy() 52 + // loadWindow.destroy()
54 - }, 2000) 53 + // }, 2000)
55 } 54 }
55 +
56 function initWindow (loadingURL) { 56 function initWindow (loadingURL) {
57 if (config.UseStartupChart) { 57 if (config.UseStartupChart) {
58 return loadindWindow(loadingURL) 58 return loadindWindow(loadingURL)
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
13 } 13 }
14 14
15 html body { 15 html body {
16 - background: #222428;
17 /* on the windows it's con't use l don't why */ 16 /* on the windows it's con't use l don't why */
18 - /* -webkit-backdrop-filter: brightness(150%) blur(30px);
19 - backdrop-filter: brightness(150%) blur(30px); */
20 background-size: 163px; 17 background-size: 163px;
21 font: 14px/21px Monaco, sans-serif; 18 font: 14px/21px Monaco, sans-serif;
22 color: #999; 19 color: #999;
......