mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 11:30:42 +08:00
This commit is contained in:
parent
afead500fb
commit
6af0bf0ceb
@ -11,6 +11,7 @@ import {hideTooltip, showTooltip} from "../dialog/tooltip";
|
||||
import {isTouchDevice} from "../util/functions";
|
||||
/// #if !BROWSER
|
||||
import {openNewWindow} from "../window/openNewWindow";
|
||||
import {ipcRenderer} from "electron";
|
||||
/// #endif
|
||||
import {layoutToJSON, saveLayout} from "./util";
|
||||
|
||||
@ -113,6 +114,7 @@ export class Tab {
|
||||
if (document.body.contains(this.panelElement) &&
|
||||
(event.clientX < 0 || event.clientY < 0 || event.clientX > window.innerWidth || event.clientY > window.innerHeight)) {
|
||||
openNewWindow(this);
|
||||
ipcRenderer.send(Constants.SIYUAN_SEND_WINDOWS, {cmd: "resetTabsStyle"});
|
||||
}
|
||||
}, Constants.TIMEOUT_LOAD); // 等待主进程发送关闭消息
|
||||
/// #endif
|
||||
|
@ -14,6 +14,14 @@ export const onWindowsMsg = (ipcData: IWebSocketData) => {
|
||||
case "closetab":
|
||||
closeTab(ipcData);
|
||||
break;
|
||||
case "resetTabsStyle":
|
||||
document.querySelectorAll(".layout-tab-bars--drag").forEach(item => {
|
||||
item.classList.remove("layout-tab-bars--drag");
|
||||
item.querySelectorAll(".layout-tab-bar li[data-clone='true']").forEach(tabItem => {
|
||||
tabItem.remove();
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "lockscreen":
|
||||
exportLayout({
|
||||
errorExit: false,
|
||||
|
Loading…
Reference in New Issue
Block a user