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