mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🚨
This commit is contained in:
parent
7fdd50737c
commit
8c536058c0
11 changed files with 13 additions and 17 deletions
|
@ -39,11 +39,10 @@ export default [{
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
semi: [2, "always"],
|
semi: [2, "always"],
|
||||||
|
|
||||||
quotes: [2, "double", {
|
quotes: [2, "double", {
|
||||||
avoidEscape: true,
|
avoidEscape: true,
|
||||||
}],
|
}],
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", {caughtErrors: "none"}],
|
||||||
"no-async-promise-executor": "off",
|
"no-async-promise-executor": "off",
|
||||||
"no-prototype-builtins": "off",
|
"no-prototype-builtins": "off",
|
||||||
"no-useless-escape": "off",
|
"no-useless-escape": "off",
|
||||||
|
@ -54,6 +53,5 @@ export default [{
|
||||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
"@typescript-eslint/no-require-imports": "off",
|
"@typescript-eslint/no-require-imports": "off",
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
|
||||||
},
|
},
|
||||||
}];
|
}];
|
||||||
|
|
|
@ -51,7 +51,7 @@ import {openCard, openCardByData} from "../../card/openCard";
|
||||||
import {lockScreen} from "../../dialog/processSystem";
|
import {lockScreen} from "../../dialog/processSystem";
|
||||||
import {isWindow} from "../../util/functions";
|
import {isWindow} from "../../util/functions";
|
||||||
import {reloadProtyle} from "../../protyle/util/reload";
|
import {reloadProtyle} from "../../protyle/util/reload";
|
||||||
import {fullscreen, updateReadonly} from "../../protyle/breadcrumb/action";
|
import {fullscreen} from "../../protyle/breadcrumb/action";
|
||||||
import {openRecentDocs} from "../../business/openRecentDocs";
|
import {openRecentDocs} from "../../business/openRecentDocs";
|
||||||
import {App} from "../../index";
|
import {App} from "../../index";
|
||||||
import {openBacklink, openGraph, openOutline, toggleDockBar} from "../../layout/dock/util";
|
import {openBacklink, openGraph, openOutline, toggleDockBar} from "../../layout/dock/util";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {isMobile} from "../util/functions";
|
import {isMobile} from "../util/functions";
|
||||||
import {Constants} from "../constants";
|
|
||||||
|
|
||||||
export const showTooltip = (message: string, target: Element, tooltipClass?: string) => {
|
export const showTooltip = (message: string, target: Element, tooltipClass?: string) => {
|
||||||
if (isMobile()) {
|
if (isMobile()) {
|
||||||
|
|
|
@ -232,7 +232,7 @@ export class Wnd {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.headersElement.parentElement.addEventListener("dragend", (event) => {
|
this.headersElement.parentElement.addEventListener("dragend", () => {
|
||||||
document.querySelectorAll(".layout-tab-bars--drag").forEach(item => {
|
document.querySelectorAll(".layout-tab-bars--drag").forEach(item => {
|
||||||
item.classList.remove("layout-tab-bars--drag");
|
item.classList.remove("layout-tab-bars--drag");
|
||||||
});
|
});
|
||||||
|
@ -338,7 +338,7 @@ export class Wnd {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// dragElement dragleave 后还会触发 dragenter https://github.com/siyuan-note/siyuan/issues/13753
|
// dragElement dragleave 后还会触发 dragenter https://github.com/siyuan-note/siyuan/issues/13753
|
||||||
this.element.addEventListener("dragleave", (event: DragEvent & { target: HTMLElement }) => {
|
this.element.addEventListener("dragleave", () => {
|
||||||
elementDragCounter--;
|
elementDragCounter--;
|
||||||
if (elementDragCounter === 0) {
|
if (elementDragCounter === 0) {
|
||||||
dragElement.classList.add("fn__none");
|
dragElement.classList.add("fn__none");
|
||||||
|
|
|
@ -27,7 +27,7 @@ const getHotkeyOrMarker = (hotkey: string, marker: string) => {
|
||||||
} else if (marker) {
|
} else if (marker) {
|
||||||
return `<span class="b3-list-item__meta">${marker}</span>`;
|
return `<span class="b3-list-item__meta">${marker}</span>`;
|
||||||
}
|
}
|
||||||
return ""
|
return "";
|
||||||
};
|
};
|
||||||
|
|
||||||
export const hintSlash = (key: string, protyle: IProtyle) => {
|
export const hintSlash = (key: string, protyle: IProtyle) => {
|
||||||
|
|
|
@ -210,7 +210,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
|
||||||
} else {
|
} else {
|
||||||
let currentRowElement: Element;
|
let currentRowElement: Element;
|
||||||
const firstColIndex = cellElements[0].getAttribute("data-col-id");
|
const firstColIndex = cellElements[0].getAttribute("data-col-id");
|
||||||
textJSON.forEach((rowValue, rowIndex) => {
|
textJSON.forEach((rowValue) => {
|
||||||
if (!currentRowElement) {
|
if (!currentRowElement) {
|
||||||
currentRowElement = cellElements[0].parentElement;
|
currentRowElement = cellElements[0].parentElement;
|
||||||
} else {
|
} else {
|
||||||
|
@ -220,7 +220,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
let cellElement: HTMLElement;
|
let cellElement: HTMLElement;
|
||||||
rowValue.forEach((cellValue, cellIndex) => {
|
rowValue.forEach((cellValue) => {
|
||||||
if (!cellElement) {
|
if (!cellElement) {
|
||||||
cellElement = currentRowElement.querySelector(`.av__cell[data-col-id="${firstColIndex}"]`) as HTMLElement;
|
cellElement = currentRowElement.querySelector(`.av__cell[data-col-id="${firstColIndex}"]`) as HTMLElement;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -18,7 +18,6 @@ import {
|
||||||
} from "../util/selection";
|
} from "../util/selection";
|
||||||
import {Constants} from "../../constants";
|
import {Constants} from "../../constants";
|
||||||
import {isMobile} from "../../util/functions";
|
import {isMobile} from "../../util/functions";
|
||||||
import {genEmptyElement} from "../../block/util";
|
|
||||||
import {previewDocImage} from "../preview/image";
|
import {previewDocImage} from "../preview/image";
|
||||||
import {
|
import {
|
||||||
contentMenu,
|
contentMenu,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Constants} from "../constants";
|
import {Constants} from "../constants";
|
||||||
import {fetchPost} from "../util/fetch";
|
import {fetchPost} from "../util/fetch";
|
||||||
import {escapeAriaLabel, escapeHtml} from "../util/escape";
|
import {escapeAriaLabel} from "../util/escape";
|
||||||
import {setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
import {setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
import {getQueryTip} from "./util";
|
import {getQueryTip} from "./util";
|
||||||
|
|
|
@ -624,7 +624,7 @@ const configIsSame = (config: Config.IUILayoutTabSearchConfig, config2: Config.I
|
||||||
export const initCriteriaMenu = (element: HTMLElement, data: Config.IUILayoutTabSearchConfig[], config: Config.IUILayoutTabSearchConfig) => {
|
export const initCriteriaMenu = (element: HTMLElement, data: Config.IUILayoutTabSearchConfig[], config: Config.IUILayoutTabSearchConfig) => {
|
||||||
fetchPost("/api/storage/getCriteria", {}, (response) => {
|
fetchPost("/api/storage/getCriteria", {}, (response) => {
|
||||||
let html = "";
|
let html = "";
|
||||||
response.data.forEach((item: Config.IUILayoutTabSearchConfig, index: number) => {
|
response.data.forEach((item: Config.IUILayoutTabSearchConfig) => {
|
||||||
data.push(item);
|
data.push(item);
|
||||||
let isSame = false;
|
let isSame = false;
|
||||||
if (configIsSame(item, config)) {
|
if (configIsSame(item, config)) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import {onGet} from "../protyle/util/onGet";
|
||||||
import {addLoading} from "../protyle/ui/initUI";
|
import {addLoading} from "../protyle/ui/initUI";
|
||||||
import {getIconByType} from "../editor/getIcon";
|
import {getIconByType} from "../editor/getIcon";
|
||||||
import {unicode2Emoji} from "../emoji";
|
import {unicode2Emoji} from "../emoji";
|
||||||
import {hasClosestBlock, hasClosestByClassName} from "../protyle/util/hasClosest";
|
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||||
import {isIPad, isNotCtrl, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
import {isIPad, isNotCtrl, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||||
import {newFileByName} from "../util/newFile";
|
import {newFileByName} from "../util/newFile";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const processMessage = (response: IWebSocketData) => {
|
||||||
hideMessage(id);
|
hideMessage(id);
|
||||||
});
|
});
|
||||||
}, {once: true});
|
}, {once: true});
|
||||||
document.querySelector("#message #ignoreAddMicrosoftDefenderExclusion")?.addEventListener("click", (event) => {
|
document.querySelector("#message #ignoreAddMicrosoftDefenderExclusion")?.addEventListener("click", () => {
|
||||||
hideMessage(id);
|
hideMessage(id);
|
||||||
fetchPost("/api/system/ignoreAddMicrosoftDefenderExclusion");
|
fetchPost("/api/system/ignoreAddMicrosoftDefenderExclusion");
|
||||||
}, {once: true});
|
}, {once: true});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue