mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-02-25 09:30:54 -08:00
Fix context menu doesn't work when multiple windows are open (#135)
This commit is contained in:
parent
10cffc8e05
commit
58c904fe01
9 changed files with 39 additions and 8 deletions
|
|
@ -3,3 +3,10 @@ const path = require('path');
|
|||
window.mode = 'about';
|
||||
|
||||
window.iconPath = path.join(__dirname, '..', 'icon.png');
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'add-workspace';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'code-injection';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'custom-user-agent';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'edit-workspace';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'go-to-url';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'license-registration';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'main';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
window.mode = 'menubar';
|
||||
|
||||
const { remote } = require('electron');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
contextMenu({
|
||||
window: remote.getCurrentWindow(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue