This commit is contained in:
Vanessa 2022-12-02 11:51:53 +08:00
parent 457e96929c
commit beae15377a
5 changed files with 20 additions and 16 deletions

View file

@ -1,4 +1,7 @@
.fn {
&__hidescrollbar::-webkit-scrollbar {
display: none;
}
&__ellipsis {
@include text-clamp(1);

View file

@ -96,7 +96,7 @@ export class Layout {
resizeTabs();
// https://ld246.com/article/1669858316295
if (this.direction === "tb") {
child.element.style.minHeight = "64px"
child.element.style.minHeight = "64px";
}
child.parent = this;
}

View file

@ -72,10 +72,10 @@ const renderPDF = (id: string) => {
keepFold: false,
}));
const servePath = window.location.protocol + "//" + window.location.host;
const isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight")
const isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight");
let themeStyle = "";
if (!isDefault) {
themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="${servePath}/appearance/themes/${window.siyuan.config.appearance.themeLight}/${window.siyuan.config.appearance.customCSS ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>`
themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="${servePath}/appearance/themes/${window.siyuan.config.appearance.themeLight}/${window.siyuan.config.appearance.customCSS ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>`;
}
const html = `<!DOCTYPE html><html>
<head>
@ -484,10 +484,10 @@ const onExport = (data: IWebSocketData, filePath: string, type: string, removeAs
themeName = window.siyuan.config.appearance.themeDark;
mode = 1;
}
const isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight")
const isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight");
let themeStyle = "";
if (!isDefault) {
themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="appearance/themes/${themeName}/${window.siyuan.config.appearance.customCSS ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>`
themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="appearance/themes/${themeName}/${window.siyuan.config.appearance.customCSS ? "custom" : "theme"}.css?${Constants.SIYUAN_VERSION}"/>`;
}
const html = `<!DOCTYPE html><html>
<head>

View file

@ -203,9 +203,9 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
config.hPath = "";
element.querySelector("#searchPathInput").innerHTML = config.hPath;
inputTimeout = inputEvent(element, config, inputTimeout, edit, false);
const includeElement = element.querySelector("#searchInclude")
includeElement.classList.remove("b3-button--cancel")
includeElement.setAttribute("disabled", "disabled")
const includeElement = element.querySelector("#searchInclude");
includeElement.classList.remove("b3-button--cancel");
includeElement.setAttribute("disabled", "disabled");
event.stopPropagation();
event.preventDefault();
break;
@ -249,12 +249,12 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
}
config.hPath = escapeHtml(hPathList.join(" "));
element.querySelector("#searchPathInput").innerHTML = `${config.hPath}<svg class="search__rmpath"><use xlink:href="#iconClose"></use></svg>`;
const includeElement = element.querySelector("#searchInclude")
includeElement.classList.remove("b3-button--cancel")
const includeElement = element.querySelector("#searchInclude");
includeElement.classList.remove("b3-button--cancel");
if (enableIncludeChild) {
includeElement.removeAttribute("disabled")
includeElement.removeAttribute("disabled");
} else {
includeElement.setAttribute("disabled", "disabled")
includeElement.setAttribute("disabled", "disabled");
}
inputTimeout = inputEvent(element, config, inputTimeout, edit, false);
});
@ -263,7 +263,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
event.preventDefault();
break;
} else if (target.id === "searchInclude") {
target.classList.toggle("b3-button--cancel")
target.classList.toggle("b3-button--cancel");
if (target.classList.contains("b3-button--cancel")) {
config.idPath.forEach((item, index) => {
if (!item.endsWith(".sy") && item.split("/").length > 1) {
@ -686,7 +686,7 @@ const addConfigFilterMenu = (config: ISearchOption, edit: Protyle, element: Elem
<button class="b3-button b3-button--text">${window.siyuan.languages.confirm}</button>
</div>`,
width: "520px",
})
});
const btnsElement = filterDialog.element.querySelectorAll(".b3-button");
btnsElement[0].addEventListener("click", () => {
filterDialog.destroy();
@ -694,7 +694,7 @@ const addConfigFilterMenu = (config: ISearchOption, edit: Protyle, element: Elem
btnsElement[1].addEventListener("click", () => {
filterDialog.element.querySelectorAll(".b3-switch").forEach((item: HTMLInputElement) => {
config.types[item.getAttribute("data-type") as TSearchFilter] = item.checked;
})
});
inputEvent(element, config, undefined, edit);
filterDialog.destroy();
});

View file

@ -96,7 +96,8 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,
return;
}
const dialog = new Dialog({
title: `${title || window.siyuan.languages.move} <span class="ft__smaller ft__on-surface"></span>`,
title: `${title || window.siyuan.languages.move}
<div style="max-height: 14px;overflow: auto;line-height: 14px;-webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0, #000 6px);padding-bottom: 4px;margin-bottom: -4px" class="ft__smaller ft__on-surface fn__hidescrollbar"></div>`,
content: `<div>
<div class="b3-form__icon" style="margin: 8px">
<svg class="b3-form__icon-icon"><use xlink:href="#iconSearch"></use></svg>