mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🔥 移除桌面端左上角窗口标题栏应用图标 Fix https://github.com/siyuan-note/siyuan/issues/7184
This commit is contained in:
parent
a8b6ac32e6
commit
dd6590160b
3 changed files with 4 additions and 26 deletions
|
|
@ -55,7 +55,7 @@ body {
|
|||
-webkit-font-smoothing: auto;
|
||||
|
||||
.toolbar {
|
||||
padding: 0;
|
||||
padding: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.fullscreen {
|
||||
|
|
|
|||
|
|
@ -198,18 +198,6 @@ progressLoading: 400
|
|||
}
|
||||
}
|
||||
|
||||
#windowAppIcon {
|
||||
-webkit-app-region: drag;
|
||||
width: 42px;
|
||||
margin-left: 1px;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
color: var(--b3-theme-on-background);
|
||||
}
|
||||
}
|
||||
|
||||
#windowControls {
|
||||
top: 0;
|
||||
z-index: 502;
|
||||
|
|
|
|||
|
|
@ -183,8 +183,8 @@ export const onGetConfig = (isStart: boolean) => {
|
|||
};
|
||||
|
||||
export const initBar = () => {
|
||||
const toolbar = document.getElementById("toolbar");
|
||||
toolbar.innerHTML = `
|
||||
const toolbarElement = document.getElementById("toolbar");
|
||||
toolbarElement.innerHTML = `
|
||||
<div id="barWorkspace" class="toolbar__item">
|
||||
<span class="toolbar__text">${getWorkspaceName()}</span>
|
||||
<svg class="toolbar__svg"><use xlink:href="#iconDown"></use></svg>
|
||||
|
|
@ -211,7 +211,7 @@ export const initBar = () => {
|
|||
</div>
|
||||
<div class="fn__flex" id="windowControls"></div>`;
|
||||
processSync();
|
||||
toolbar.addEventListener("click", (event: MouseEvent) => {
|
||||
toolbarElement.addEventListener("click", (event: MouseEvent) => {
|
||||
let target = event.target as HTMLElement;
|
||||
while (!target.classList.contains("toolbar")) {
|
||||
if (target.id === "barBack") {
|
||||
|
|
@ -493,16 +493,6 @@ export const initWindow = () => {
|
|||
}
|
||||
document.body.classList.add("body--win32");
|
||||
|
||||
// 添加应用图标
|
||||
if (!isWindow()) {
|
||||
const toolbarElement = document.getElementById("toolbar");
|
||||
toolbarElement.insertAdjacentHTML("afterbegin", `<div class="toolbar__item" id="windowAppIcon">
|
||||
<svg>
|
||||
<use xlink:href="#iconSiYuan"></use>
|
||||
</svg>
|
||||
</div>`);
|
||||
}
|
||||
|
||||
// 添加窗口控件
|
||||
const controlsHTML = `<div class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.min}" id="minWindow">
|
||||
<svg>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue