mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
d15c7c5e4c
commit
eef9a46870
4 changed files with 25 additions and 10 deletions
|
|
@ -279,13 +279,14 @@
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
|
||||||
&:hover {
|
&:hover,
|
||||||
color: var(--b3-theme-on-background);
|
&--active {
|
||||||
background-color: var(--b3-theme-background-light);
|
background-color: var(--b3-theme-background-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
&--active {
|
&--activefocus {
|
||||||
color: var(--b3-theme-on-background);
|
color: var(--b3-theme-on-primary) !important;
|
||||||
|
background-color: var(--b3-theme-primary) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ progressLoading: 400
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar {
|
.toolbar {
|
||||||
background-color: var(--b3-theme-surface);
|
background-color: #292a2d;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
|
|
@ -170,16 +170,20 @@ progressLoading: 400
|
||||||
}
|
}
|
||||||
|
|
||||||
#windowControls {
|
#windowControls {
|
||||||
top: -1px;
|
top: 0;
|
||||||
z-index: 502;
|
z-index: 502;
|
||||||
right: -1px;
|
right: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
.toolbar__item svg {
|
||||||
|
width: 13px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#drag {
|
#drag {
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--b3-theme-on-surface);
|
color: #9aa0a6;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
@ -189,7 +193,7 @@ progressLoading: 400
|
||||||
&__item {
|
&__item {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--b3-theme-on-surface);
|
color: #9aa0a6;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
transition: var(--b3-transition);
|
transition: var(--b3-transition);
|
||||||
|
|
@ -239,6 +243,7 @@ progressLoading: 400
|
||||||
|
|
||||||
.toolbar__item {
|
.toolbar__item {
|
||||||
padding: 9px;
|
padding: 9px;
|
||||||
|
color: var(--b3-theme-on-surface);
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
height: 14px;
|
height: 14px;
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,20 @@ export const setPanelFocus = (element: Element) => {
|
||||||
document.querySelectorAll(".block__icons--active").forEach(item => {
|
document.querySelectorAll(".block__icons--active").forEach(item => {
|
||||||
item.classList.remove("block__icons--active");
|
item.classList.remove("block__icons--active");
|
||||||
});
|
});
|
||||||
|
document.querySelectorAll(".dock__item--activefocus").forEach(item => {
|
||||||
|
item.classList.remove("dock__item--activefocus");
|
||||||
|
});
|
||||||
document.querySelectorAll(".layout__wnd--active").forEach(item => {
|
document.querySelectorAll(".layout__wnd--active").forEach(item => {
|
||||||
item.classList.remove("layout__wnd--active");
|
item.classList.remove("layout__wnd--active");
|
||||||
});
|
});
|
||||||
if (element.classList.contains("block__icons")) {
|
if (element.classList.contains("block__icons")) {
|
||||||
element.classList.add("block__icons--active");
|
element.classList.add("block__icons--active");
|
||||||
|
["file", "inbox", "backlink", "tag", "bookmark", "graph", "globalGraph", "outline"].find(item => {
|
||||||
|
if (element.parentElement.classList.contains("sy__" + item)) {
|
||||||
|
document.querySelector(`.dock__item[data-type="${item}"]`).classList.add("dock__item--activefocus");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
const blockElement = hasClosestBlock(document.activeElement);
|
const blockElement = hasClosestBlock(document.activeElement);
|
||||||
if (blockElement) {
|
if (blockElement) {
|
||||||
const editElement = getContenteditableElement(blockElement) as HTMLElement;
|
const editElement = getContenteditableElement(blockElement) as HTMLElement;
|
||||||
|
|
|
||||||
|
|
@ -474,7 +474,7 @@ const initWindow = () => {
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div aria-label="${window.siyuan.languages.max}" class="b3-tooltips b3-tooltips__sw toolbar__item" id="maxWindow">
|
<div aria-label="${window.siyuan.languages.max}" class="b3-tooltips b3-tooltips__sw toolbar__item" id="maxWindow">
|
||||||
<svg style="height: 11px">
|
<svg>
|
||||||
<use xlink:href="#iconMax"></use>
|
<use xlink:href="#iconMax"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue