feat: add menu item

This commit is contained in:
lencx
2022-12-11 18:16:36 +08:00
parent 087160861c
commit 050b7010fc
9 changed files with 150 additions and 45 deletions

View File

@@ -54,7 +54,8 @@ async function init() {
}
const _platform = await platform();
if (/darwin/.test(_platform)) {
const chatConf = await invoke('get_chat_conf') || {};
if (/darwin/.test(_platform) && !chatConf.titlebar) {
const topStyleDom = document.createElement("style");
topStyleDom.innerHTML = `#chatgpt-app-window-top{position:fixed;top:0;z-index:999999999;width:100%;height:24px;background:transparent;cursor:grab;cursor:-webkit-grab;user-select:none;-webkit-user-select:none;}#chatgpt-app-window-top:active {cursor:grabbing;cursor:-webkit-grabbing;}`;
document.head.appendChild(topStyleDom);