mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +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";
|
import {isTouchDevice} from "../util/functions";
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
import {openNewWindow} from "../window/openNewWindow";
|
import {openNewWindow} from "../window/openNewWindow";
|
||||||
|
import {ipcRenderer} from "electron";
|
||||||
/// #endif
|
/// #endif
|
||||||
import {layoutToJSON, saveLayout} from "./util";
|
import {layoutToJSON, saveLayout} from "./util";
|
||||||
|
|
||||||
@ -113,6 +114,7 @@ export class Tab {
|
|||||||
if (document.body.contains(this.panelElement) &&
|
if (document.body.contains(this.panelElement) &&
|
||||||
(event.clientX < 0 || event.clientY < 0 || event.clientX > window.innerWidth || event.clientY > window.innerHeight)) {
|
(event.clientX < 0 || event.clientY < 0 || event.clientX > window.innerWidth || event.clientY > window.innerHeight)) {
|
||||||
openNewWindow(this);
|
openNewWindow(this);
|
||||||
|
ipcRenderer.send(Constants.SIYUAN_SEND_WINDOWS, {cmd: "resetTabsStyle"});
|
||||||
}
|
}
|
||||||
}, Constants.TIMEOUT_LOAD); // 等待主进程发送关闭消息
|
}, Constants.TIMEOUT_LOAD); // 等待主进程发送关闭消息
|
||||||
/// #endif
|
/// #endif
|
||||||
|
@ -14,6 +14,14 @@ export const onWindowsMsg = (ipcData: IWebSocketData) => {
|
|||||||
case "closetab":
|
case "closetab":
|
||||||
closeTab(ipcData);
|
closeTab(ipcData);
|
||||||
break;
|
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":
|
case "lockscreen":
|
||||||
exportLayout({
|
exportLayout({
|
||||||
errorExit: false,
|
errorExit: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user