refactor: app conf

This commit is contained in:
lencx
2023-01-27 00:23:05 +08:00
parent f0ff062b21
commit f9f173407e
14 changed files with 388 additions and 396 deletions

View File

@@ -54,7 +54,7 @@ async function init() {
if (__TAURI_METADATA__.__currentWindow.label !== 'tray') {
const _platform = await platform();
const chatConf = await invoke('get_chat_conf') || {};
const chatConf = await invoke('get_app_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;}`;