diff --git a/.gitignore b/.gitignore index f3d2f08..5915d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ yarn.lock package-lock.json pnpm-lock.yaml .yarn +.yarn/install-state.gz diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index f6105e6..951dccd 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/src/base/components/titlebar.html b/src/base/components/titlebar.html index bd713df..a12691b 100644 --- a/src/base/components/titlebar.html +++ b/src/base/components/titlebar.html @@ -5,7 +5,10 @@ - - - +
\ No newline at end of file diff --git a/src/base/styles/index.css b/src/base/styles/index.css index 0b0e662..b922e51 100644 --- a/src/base/styles/index.css +++ b/src/base/styles/index.css @@ -1 +1 @@ -body{background:#1d1f20;font-family:arial}.titlebar{position:fixed;top:0px;right:0px;width:max-content;text-align:right;margin:4px 4px 0px 0px;cursor:default;z-index:5;app-region:no-drag}.titlebar .linux-titlebar{display:none}.titlebar button{width:32px;height:32px;font-size:0px;border:none;border-radius:6px;background:rgba(0,0,0,0)}.titlebar button:hover{background:#303236}.titlebar button svg{width:16px;height:16px;filter:invert(1)}sl-include.alert-modal{position:fixed;z-index:50;bottom:24px;left:50%;transform:translate(-50%);width:max-content}drag{position:fixed;top:0px;left:0px;width:100%;height:50px;app-region:drag;z-index:1}.dropdown-modal{position:fixed;top:40px;right:0px;z-index:50;display:none;flex-direction:column;background:#242428;border-radius:6px;border:1px #36363b solid;margin:6px;min-width:250px;width:300px;transition:1s all}.dropdown-modal div:nth-child(1)>div.settings-section-header{border-radius:4px 4px 0px 0px}.dropdown-modal .settings-section-header{background:#303236;padding:6px 0px 6px 16px;font-size:12px}.dropdown-modal .settings-section-header h2{margin:0px}.dropdown-modal .settings-section-content{display:flex;margin:12px}.dropdown-modal .settings-section-content input{padding:6px 12px;border-radius:4px;border:1px #656565 solid;margin-right:6px}.dropdown-modal .settings-section-content input#InstanceSaveButton{background:#575151;color:#fff;border:none;border-radius:4px;padding:0px 12px} +body{background:#1d1f20;font-family:arial}.titlebar{position:fixed;top:0px;right:0px;width:max-content;text-align:right;margin:4px 4px 0px 0px;cursor:default;z-index:5;app-region:no-drag;display:flex}.titlebar .linux-titlebar{display:none}.titlebar button{width:32px;height:32px;font-size:0px;border:none;border-radius:6px;background:rgba(0,0,0,0)}.titlebar button:hover{background:#303236}.titlebar button svg{width:16px;height:16px;filter:invert(1)}sl-include.alert-modal{position:fixed;z-index:50;bottom:24px;left:50%;transform:translate(-50%);width:max-content}drag{position:fixed;top:0px;left:0px;width:100%;height:50px;app-region:drag;z-index:1}.dropdown-modal{position:fixed;top:40px;right:0px;z-index:50;display:none;flex-direction:column;background:#242428;border-radius:6px;border:1px #36363b solid;margin:6px;min-width:250px;width:300px;transition:1s all}.dropdown-modal div:nth-child(1)>div.settings-section-header{border-radius:4px 4px 0px 0px}.dropdown-modal .settings-section-header{background:#303236;padding:6px 0px 6px 16px;font-size:12px}.dropdown-modal .settings-section-header h2{margin:0px}.dropdown-modal .settings-section-content{display:flex;margin:12px}.dropdown-modal .settings-section-content input{padding:6px 12px;border-radius:4px;border:1px #656565 solid;margin-right:6px}.dropdown-modal .settings-section-content input#InstanceSaveButton{background:#575151;color:#fff;border:none;border-radius:4px;padding:0px 12px} diff --git a/src/base/styles/index.scss b/src/base/styles/index.scss index 14358de..aa0818c 100644 --- a/src/base/styles/index.scss +++ b/src/base/styles/index.scss @@ -13,6 +13,7 @@ body { cursor: default; z-index: 5; app-region: no-drag; + display: flex; .linux-titlebar { display: none; } diff --git a/src/process/menu.js b/src/process/menu.js index 2b531b2..b2b528f 100644 --- a/src/process/menu.js +++ b/src/process/menu.js @@ -34,6 +34,12 @@ module.exports = { click: () => { mainWindow.webContents.executeJavaScript(`document.querySelector("tab-group").shadowRoot.querySelector("div > nav > div.tabs > div.tab.visible.active > span.tab-close > button").click()`) } + }, + { type: 'separator' }, + { + label: "Quit", + accelerator: "CmdOrCtrl+Q", + click: () => {app.quit()} } ] }, @@ -81,7 +87,7 @@ module.exports = { accelerator: 'CmdOrCtrl+Shift+R', click: async () => { mainWindow.reload() - setTimeout(() => {Platform.CSS()}, 1000) + setTimeout(() => {Platform.CSS()}, 2000) } }, { role: 'toggleDevTools' }, diff --git a/src/process/platform.js b/src/process/platform.js index d39cd60..39dcf5d 100644 --- a/src/process/platform.js +++ b/src/process/platform.js @@ -8,5 +8,10 @@ module.exports = { mainWindow.webContents.executeJavaScript(`document.querySelector("tab-group").shadowRoot.querySelector("nav").style.left = '80px'`) }, 1500); } + if (process.platform === 'linux') { + setTimeout(() => { + mainWindow.webContents.executeJavaScript(`document.querySelector(".linux-titlebar").style.display = 'block'`) + }, 1500); + } } } \ No newline at end of file