mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
💚
This commit is contained in:
parent
2e85978e05
commit
5f03df576a
2 changed files with 8 additions and 3 deletions
|
|
@ -17,6 +17,7 @@ import {Constants} from "../constants";
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
import {webFrame} from "electron";
|
import {webFrame} from "electron";
|
||||||
import {getCurrentWindow} from "@electron/remote";
|
import {getCurrentWindow} from "@electron/remote";
|
||||||
|
import {setTabPosition} from "../window/setHeader";
|
||||||
/// #endif
|
/// #endif
|
||||||
import {Search} from "../search";
|
import {Search} from "../search";
|
||||||
import {showMessage} from "../dialog/message";
|
import {showMessage} from "../dialog/message";
|
||||||
|
|
@ -30,7 +31,6 @@ import {newFile} from "../util/newFile";
|
||||||
import {MenuItem} from "../menus/Menu";
|
import {MenuItem} from "../menus/Menu";
|
||||||
import {escapeHtml} from "../util/escape";
|
import {escapeHtml} from "../util/escape";
|
||||||
import {isWindow} from "../util/functions";
|
import {isWindow} from "../util/functions";
|
||||||
import {setTabPosition} from "../window/setHeader";
|
|
||||||
|
|
||||||
export class Wnd {
|
export class Wnd {
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
@ -109,12 +109,14 @@ export class Wnd {
|
||||||
break;
|
break;
|
||||||
} else if (target.tagName === "SPAN" && target.className === "fn__flex-1" &&
|
} else if (target.tagName === "SPAN" && target.className === "fn__flex-1" &&
|
||||||
isWindow() && this.headersElement.getBoundingClientRect().top <= 0) {
|
isWindow() && this.headersElement.getBoundingClientRect().top <= 0) {
|
||||||
|
/// #if !BROWSER
|
||||||
const currentWindow = getCurrentWindow();
|
const currentWindow = getCurrentWindow();
|
||||||
if (currentWindow.isMaximized()) {
|
if (currentWindow.isMaximized()) {
|
||||||
currentWindow.unmaximize();
|
currentWindow.unmaximize();
|
||||||
} else {
|
} else {
|
||||||
currentWindow.maximize();
|
currentWindow.maximize();
|
||||||
}
|
}
|
||||||
|
/// #endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
target = target.parentElement;
|
target = target.parentElement;
|
||||||
|
|
@ -328,7 +330,9 @@ export class Wnd {
|
||||||
switchWnd(newWnd, targetWnd);
|
switchWnd(newWnd, targetWnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// #if !BROWSER
|
||||||
setTabPosition();
|
setTabPosition();
|
||||||
|
/// #endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -504,8 +508,9 @@ export class Wnd {
|
||||||
} else if (this.children.length > window.siyuan.config.fileTree.maxOpenTabCount) {
|
} else if (this.children.length > window.siyuan.config.fileTree.maxOpenTabCount) {
|
||||||
this.removeOverCounter(oldFocusIndex);
|
this.removeOverCounter(oldFocusIndex);
|
||||||
}
|
}
|
||||||
|
/// #if !BROWSER
|
||||||
setTabPosition();
|
setTabPosition();
|
||||||
|
/// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderTabList(event: MouseEvent) {
|
private renderTabList(event: MouseEvent) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import {isWindow} from "../util/functions";
|
import {isWindow} from "../util/functions";
|
||||||
import {Wnd} from "../layout/Wnd";
|
import {Wnd} from "../layout/Wnd";
|
||||||
import {Layout} from "../layout";
|
|
||||||
import {getCurrentWindow} from "@electron/remote";
|
import {getCurrentWindow} from "@electron/remote";
|
||||||
|
import {Layout} from "../layout";
|
||||||
|
|
||||||
const getAllWnds = (layout: Layout, wnds: Wnd[]) => {
|
const getAllWnds = (layout: Layout, wnds: Wnd[]) => {
|
||||||
for (let i = 0; i < layout.children.length; i++) {
|
for (let i = 0; i < layout.children.length; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue