mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 17:43:58 +01:00
fix: electron minimise
This commit is contained in:
parent
d58ec90b5b
commit
00b2b497f0
|
@ -24,11 +24,6 @@ function createWindow() {
|
|||
|
||||
createTray(win);
|
||||
|
||||
win.on('minimize', (event) => {
|
||||
event.preventDefault();
|
||||
win.hide();
|
||||
});
|
||||
|
||||
win.maximize();
|
||||
win.show();
|
||||
|
||||
|
@ -51,7 +46,13 @@ const createTray = (window) => {
|
|||
)
|
||||
);
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
{ label: 'Show', click: () => window.show() },
|
||||
{
|
||||
label: 'Show',
|
||||
click: () => {
|
||||
win.maximize();
|
||||
window.show();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Exit',
|
||||
click: () => {
|
||||
|
@ -61,7 +62,10 @@ const createTray = (window) => {
|
|||
},
|
||||
]);
|
||||
|
||||
tray.on('click', () => window.show());
|
||||
tray.on('click', () => {
|
||||
win.maximize();
|
||||
window.show();
|
||||
});
|
||||
tray.setToolTip('Better ChatGPT');
|
||||
tray.setContextMenu(contextMenu);
|
||||
|
||||
|
|
Loading…
Reference in a new issue