mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🚨
This commit is contained in:
parent
91f3ff61c8
commit
0476c8d48d
9 changed files with 11 additions and 15 deletions
|
|
@ -317,8 +317,7 @@ export const about = {
|
|||
});
|
||||
about.element.querySelector("#purgeRepo").addEventListener("click", () => {
|
||||
confirmDialog("♻️ " + window.siyuan.languages.dataRepoPurge, window.siyuan.languages.dataRepoPurgeConfirm, () => {
|
||||
fetchPost("/api/repo/purgeRepo", {}, () => {
|
||||
});
|
||||
fetchPost("/api/repo/purgeRepo");
|
||||
});
|
||||
});
|
||||
const networkServeElement = about.element.querySelector("#networkServe") as HTMLInputElement;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string
|
|||
if (item.typesCount) {
|
||||
item.typesCount.forEach(subItem => {
|
||||
statHTML += `<span class="fn__space"></span>${subItem.type} ${subItem.count}`;
|
||||
})
|
||||
});
|
||||
}
|
||||
statHTML+="</div>";
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string
|
|||
<span class="fn__space"></span>
|
||||
${window.siyuan.languages.fileSize} ${item.hSize}
|
||||
</span>
|
||||
</div>${statHTML}`
|
||||
</div>${statHTML}`;
|
||||
/// #if MOBILE
|
||||
repoHTML += `<li class="b3-list-item" data-type="repoitem" data-id="${item.id}" data-tag="${item.tag}">
|
||||
<div class="fn__flex-1">
|
||||
|
|
@ -204,7 +204,7 @@ ${actionHTML}
|
|||
};
|
||||
|
||||
const renderRepo = (element: Element, currentPage: number) => {
|
||||
const selectValue = (element.querySelector(".b3-select") as HTMLSelectElement).value
|
||||
const selectValue = (element.querySelector(".b3-select") as HTMLSelectElement).value;
|
||||
element.lastElementChild.innerHTML = '<li style="position: relative;height: 100%;"><div class="fn__loading"><img width="64px" src="/stage/loading-pure.svg"></div></li>';
|
||||
const previousElement = element.querySelector('[data-type="previous"]');
|
||||
const nextElement = element.querySelector('[data-type="next"]');
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import {replaceFileName} from "../../editor/rename";
|
|||
import {escapeHtml} from "../../util/escape";
|
||||
import {unicode2Emoji} from "../../emoji";
|
||||
import {Constants} from "../../constants";
|
||||
import {isMobile} from "../../util/functions";
|
||||
|
||||
export class Inbox extends Model {
|
||||
private element: Element;
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ const updateSearchResult = (config: ISearchOption, element: Element) => {
|
|||
});
|
||||
} else {
|
||||
if (!config.page) {
|
||||
config.page = 1
|
||||
config.page = 1;
|
||||
}
|
||||
if (config.page > 1) {
|
||||
previousElement.removeAttribute("disabled");
|
||||
|
|
|
|||
|
|
@ -253,8 +253,7 @@ export const initAbout = () => {
|
|||
break;
|
||||
} else if (target.id === "purgeRepo") {
|
||||
confirmDialog("♻️ " + window.siyuan.languages.dataRepoPurge, window.siyuan.languages.dataRepoPurgeConfirm, () => {
|
||||
fetchPost("/api/repo/purgeRepo", {}, () => {
|
||||
});
|
||||
fetchPost("/api/repo/purgeRepo");
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const popSide = (render = true) => {
|
|||
};
|
||||
|
||||
export const handleTouchEnd = (event: TouchEvent) => {
|
||||
const editor = getCurrentEditor()
|
||||
const editor = getCurrentEditor();
|
||||
if (editor) {
|
||||
document.querySelectorAll(".protyle-breadcrumb__bar--hide").forEach(item => {
|
||||
item.classList.remove("protyle-breadcrumb__bar--hide");
|
||||
|
|
@ -36,7 +36,7 @@ export const handleTouchEnd = (event: TouchEvent) => {
|
|||
target.tagName === "SPAN" && window.webkit?.messageHandlers &&
|
||||
!hasClosestByAttribute(target, "data-type", "NodeBlockQueryEmbed")) {
|
||||
// ios 长按行内元素弹出菜单
|
||||
const types = (target.getAttribute("data-type") || "").split(" ")
|
||||
const types = (target.getAttribute("data-type") || "").split(" ");
|
||||
if (types.includes("inline-memo")) {
|
||||
editor.protyle.toolbar.showRender(editor.protyle, target);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
|
|||
tempElement.innerHTML = value.replace(/<mark>/g, "").replace(/<\/mark>/g, "");
|
||||
tempElement = tempElement.firstElementChild as HTMLDivElement;
|
||||
if (refIsS) {
|
||||
const staticText = range.toString().replace(this.splitChar, "")
|
||||
const staticText = range.toString().replace(this.splitChar, "");
|
||||
if (staticText) {
|
||||
tempElement.setAttribute("data-subtype", "s");
|
||||
tempElement.innerText = staticText;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ import {BlockPanel} from "../../block/Panel";
|
|||
import * as dayjs from "dayjs";
|
||||
import {highlightRender} from "../markdown/highlightRender";
|
||||
import {countBlockWord} from "../../layout/status";
|
||||
import {openMobileFileById} from "../../mobile/editor";
|
||||
import {moveToDown, moveToUp} from "./move";
|
||||
import {pasteAsPlainText} from "../util/paste";
|
||||
import {preventScroll} from "../scroll/preventScroll";
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
|
|||
let target = event.target as HTMLElement;
|
||||
const searchPathInputElement = element.querySelector("#searchPathInput");
|
||||
while (target && !target.isSameNode(element)) {
|
||||
const type = target.getAttribute("data-type")
|
||||
const type = target.getAttribute("data-type");
|
||||
if (type === "next") {
|
||||
if (!target.getAttribute("disabled")) {
|
||||
config.page++;
|
||||
|
|
@ -1074,7 +1074,7 @@ const inputEvent = (element: Element, config: ISearchOption, inputTimeout: numbe
|
|||
page: config.page || 1,
|
||||
}, (response) => {
|
||||
if (!config.page) {
|
||||
config.page = 1
|
||||
config.page = 1;
|
||||
}
|
||||
if (config.page < response.data.pageCount) {
|
||||
nextElement.removeAttribute("disabled");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue