Skip to content
This repository was archived by the owner on Sep 22, 2023. It is now read-only.

Commit e7356d2

Browse files
authored
Merge pull request #291 from manonthemat/main
use of label in DID list
2 parents 27b6ecf + be84172 commit e7356d2

File tree

2 files changed

+131
-144
lines changed

2 files changed

+131
-144
lines changed

src/main/index.js

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (!isDev) {
2121
if (gotTheLock) {
2222
app.on('second-instance', () => {
2323
// Someone tried to run a second instance, we should focus our window.
24-
if (mainWindow && mainWindow.isMinimized()) {
24+
if (mainWindow?.isMinimized()) {
2525
mainWindow.restore()
2626
}
2727
mainWindow.focus()
@@ -65,8 +65,6 @@ function createWindow() {
6565
show: false,
6666
})
6767

68-
// eslint-disable-next-line
69-
7068
// load root file/url
7169
if (isDev) {
7270
mainWindow.loadURL('http://localhost:9080')
@@ -89,31 +87,30 @@ function createWindow() {
8987
})
9088
mainWindow.webContents.on('context-menu', (e, props) => {
9189
const InputMenu = Menu.buildFromTemplate([{
92-
label: 'Undo',
93-
role: 'undo',
90+
label: 'Undo',
91+
role: 'undo',
9492
}, {
95-
label: 'Redo',
96-
role: 'redo',
93+
label: 'Redo',
94+
role: 'redo',
9795
}, {
98-
type: 'separator',
96+
type: 'separator',
9997
}, {
100-
label: 'Cut',
101-
role: 'cut',
98+
label: 'Cut',
99+
role: 'cut',
102100
}, {
103-
label: 'Copy',
104-
role: 'copy',
101+
label: 'Copy',
102+
role: 'copy',
105103
}, {
106-
label: 'Paste',
107-
role: 'paste',
104+
label: 'Paste',
105+
role: 'paste',
108106
}, {
109-
type: 'separator',
107+
type: 'separator',
110108
}, {
111-
label: 'Select all',
112-
role: 'selectall',
109+
label: 'Select all',
110+
role: 'selectall',
113111
},
114112
]);
115-
const { inputFieldType } = props;
116-
if (inputFieldType === 'plainText') {
113+
if (props?.inputFieldType === 'plainText') {
117114
InputMenu.popup(mainWindow);
118115
}
119116
});

0 commit comments

Comments
 (0)