Vanessa 2023-02-22 14:49:27 +08:00
parent fe6e9c68fc
commit 645d7a089f
4 changed files with 22 additions and 17 deletions

View File

@ -30,6 +30,9 @@
border-left: 0; border-left: 0;
overflow: hidden; overflow: hidden;
box-shadow: 8px 0 24px rgb(140 149 159 / 20%); box-shadow: 8px 0 24px rgb(140 149 159 / 20%);
top: 112px;
bottom: 82px;
left: 0;
} }
&.layout--floatr { &.layout--floatr {
@ -38,16 +41,25 @@
border-right: 0; border-right: 0;
border-radius: 8px 0 0 8px; border-radius: 8px 0 0 8px;
overflow: hidden; overflow: hidden;
top: 112px;
bottom: 82px;
right: 0;
} }
&.layout--floatt { &.layout--floatt {
border-bottom: 1px solid var(--b3-border-color); border-bottom: 1px solid var(--b3-border-color);
box-shadow: var(--b3-dialog-shadow); box-shadow: var(--b3-dialog-shadow);
left: 0;
top: 0;
right: 0;
} }
&.layout--floatb { &.layout--floatb {
border-top: 1px solid var(--b3-border-color); border-top: 1px solid var(--b3-border-color);
box-shadow: 0 -8px 24px rgb(140 149 159 / 20%); box-shadow: 0 -8px 24px rgb(140 149 159 / 20%);
left: 0;
right: 0;
bottom: 0;
} }
} }

View File

@ -331,13 +331,13 @@ export abstract class Constants {
data: [ data: [
[{ [{
type: "file", type: "file",
size: {width: 220, height: 0}, size: {width: 224, height: 0},
show: true, show: true,
icon: "iconFiles", icon: "iconFiles",
hotkeyLangId: "fileTree", hotkeyLangId: "fileTree",
}, { }, {
type: "outline", type: "outline",
size: {width: 220, height: 0}, size: {width: 224, height: 0},
show: false, show: false,
icon: "iconAlignCenter", icon: "iconAlignCenter",
hotkeyLangId: "outline", hotkeyLangId: "outline",
@ -349,13 +349,13 @@ export abstract class Constants {
hotkeyLangId: "inbox", hotkeyLangId: "inbox",
}], [{ }], [{
type: "bookmark", type: "bookmark",
size: {width: 220, height: 0}, size: {width: 224, height: 0},
show: false, show: false,
icon: "iconBookmark", icon: "iconBookmark",
hotkeyLangId: "bookmark", hotkeyLangId: "bookmark",
}, { }, {
type: "tag", type: "tag",
size: {width: 220, height: 0}, size: {width: 224, height: 0},
show: false, show: false,
icon: "iconTags", icon: "iconTags",
hotkeyLangId: "tag", hotkeyLangId: "tag",

View File

@ -152,18 +152,11 @@ export class Dock {
public resetDockPosition(show: boolean) { public resetDockPosition(show: boolean) {
if (this.position === "Left") { if (this.position === "Left") {
this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px; this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;opacity:${show ? 1 : 0};`);
opacity:${show ? 1 : 0};
top: 112px;bottom: 82px;left:0`);
} else if (this.position === "Right") { } else if (this.position === "Right") {
this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px; this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;opacity:${show ? 1 : 0};`);
opacity:${show ? 1 : 0};
right:0;top: 112px;bottom: 82px;`);
} else { } else {
this.layout.element.setAttribute("style", `height:${this.layout.element.clientHeight}px; this.layout.element.setAttribute("style", `height:${this.layout.element.clientHeight}px;opacity:${show ? 1 : 0};`);
opacity:${show ? 1 : 0};
left:0;right:0;
${this.position === "Top" ? "top" : "bottom"}:0`);
} }
} }
@ -522,9 +515,9 @@ ${this.position === "Top" ? "top" : "bottom"}:0`);
this.element.querySelectorAll(".dock__item--active").forEach((item) => { this.element.querySelectorAll(".dock__item--active").forEach((item) => {
let size; let size;
if (this.position === "Left" || this.position === "Right") { if (this.position === "Left" || this.position === "Right") {
size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 220); size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 224);
} else { } else {
size = parseInt(item.getAttribute("data-height")) || 220; size = parseInt(item.getAttribute("data-height")) || 224;
} }
if (size > max) { if (size > max) {
max = size; max = size;

View File

@ -609,7 +609,7 @@ export const addResize = (obj: Layout | Wnd) => {
} }
const getMinSize = (element: HTMLElement) => { const getMinSize = (element: HTMLElement) => {
let minSize = 220; let minSize = 224;
Array.from(element.querySelectorAll(".file-tree")).find((item) => { Array.from(element.querySelectorAll(".file-tree")).find((item) => {
if (item.classList.contains("sy__backlink") || item.classList.contains("sy__graph") if (item.classList.contains("sy__backlink") || item.classList.contains("sy__graph")
|| item.classList.contains("sy__globalGraph") || item.classList.contains("sy__inbox")) { || item.classList.contains("sy__globalGraph") || item.classList.contains("sy__inbox")) {