mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Move attribute logic to main
This commit is contained in:
parent
9ab08b16d8
commit
c6e2244ce8
2 changed files with 6 additions and 2 deletions
|
@ -38,10 +38,8 @@ export function injectTitlebar() {
|
|||
maximize!.addEventListener("click", () => {
|
||||
if (ipcRenderer.sendSync("win-isMaximized") == true) {
|
||||
ipcRenderer.send("win-unmaximize");
|
||||
document.body.removeAttribute("isMaximized");
|
||||
} else {
|
||||
ipcRenderer.send("win-maximize");
|
||||
document.body.setAttribute("isMaximized", "");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -81,6 +81,12 @@ async function doAfterDefiningTheWindow() {
|
|||
app.quit();
|
||||
}
|
||||
});
|
||||
mainWindow.on('maximize',() =>{
|
||||
mainWindow.webContents.executeJavaScript(`document.body.setAttribute("isMaximized", "");`)
|
||||
})
|
||||
mainWindow.on('unmaximize',() =>{
|
||||
mainWindow.webContents.executeJavaScript(`document.body.removeAttribute("isMaximized");`)
|
||||
})
|
||||
console.log(contentPath);
|
||||
if ((await getConfig("inviteWebsocket")) == true) {
|
||||
startServer();
|
||||
|
|
Loading…
Reference in a new issue