Skip to content

Commit

Permalink
🚨
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 12, 2024
1 parent e685629 commit 46282d2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/src/layout/dock/Files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ export class Files extends Model {
// 文件展开时,刷新
liElement.nextElementSibling.remove();
}
const arrowElement = liElement.querySelector(".b3-list-item__arrow")
const arrowElement = liElement.querySelector(".b3-list-item__arrow");
arrowElement.classList.add("b3-list-item__arrow--open");
arrowElement.parentElement.classList.remove("fn__hidden");
liElement.insertAdjacentHTML("afterend", `<ul>${fileHTML}</ul>`);
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/relation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {upDownHint} from "../../../util/upDownHint";
import {fetchPost} from "../../../util/fetch";
import {escapeGreat, escapeHtml} from "../../../util/escape";
import {transaction} from "../../wysiwyg/transaction";
import {genCellValueByElement, updateCellsValue} from "./cell";
import {updateCellsValue} from "./cell";
import {updateAttrViewCellAnimation} from "./action";
import {focusBlock} from "../../util/selection";
import {setPosition} from "../../../util/setPosition";
Expand Down
4 changes: 2 additions & 2 deletions app/src/protyle/render/av/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
if (rowId) {
selectRowIds.push(rowId);
}
})
});
let selectCellId = "";
const selectCellElement = e.querySelector(".av__cell--select") as HTMLElement;
if (selectCellElement) {
Expand Down Expand Up @@ -146,7 +146,7 @@ style="width: ${column.width || "200px"};">
style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use xlink:href="#iconDown"></use></svg>' + window.siyuan.languages.calc}</div>`;
}
if (column.calc && column.calc.operator !== "") {
hasCalc = true
hasCalc = true;
}

if (pinIndex === index) {
Expand Down
20 changes: 10 additions & 10 deletions app/src/protyle/render/av/row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export const insertAttrViewBlockAnimation = (protyle: IProtyle, blockElement: El
colHTML = '<div class="av__colsticky"><div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
}
previousElement.querySelectorAll(".av__cell").forEach((item: HTMLElement, index) => {
let lineNumber = ""
let lineNumber = "";
if (getTypeByCellElement(item) === "lineNumber") {
const lineNumberValue = item.querySelector(".av__celltext")?.getAttribute("data-value")
const lineNumberValue = item.querySelector(".av__celltext")?.getAttribute("data-value");
if (lineNumberValue) {
lineNumber = (parseInt(lineNumberValue) + 1).toString();
}
Expand Down Expand Up @@ -168,48 +168,48 @@ ${getTypeByCellElement(item) === "block" ? ' data-detached="true"' : ""}><span c
});
}
// 当空或非空外,需要根据值进行判断
let isRenderValue = true
let isRenderValue = true;
if (item.operator !== "Is empty" && item.operator !== "Is not empty") {
switch (item.value.type) {
case "select":
case "mSelect":
if (!item.value.mSelect || item.value.mSelect.length === 0) {
isRenderValue = false
isRenderValue = false;
}
break;
case "block":
if (!item.value.block || !item.value.block.content) {
isRenderValue = false
isRenderValue = false;
}
break;
case "number":
if (!item.value.number || !item.value.number.isNotEmpty) {
isRenderValue = false
isRenderValue = false;
}
break;
case "date":
case "created":
case "updated":
if (!item.value[item.value.type] || !item.value[item.value.type].isNotEmpty) {
isRenderValue = false
isRenderValue = false;
}
break;
case "mAsset":
if (!item.value.mAsset || item.value.mAsset.length === 0) {
isRenderValue = false
isRenderValue = false;
}
break;
case "checkbox":
if (!item.value.checkbox) {
isRenderValue = false
isRenderValue = false;
}
break;
case "text":
case "url":
case "phone":
case "email":
if (!item.value[item.value.type] || !item.value[item.value.type].content) {
isRenderValue = false
isRenderValue = false;
}
break;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/protyle/toolbar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ export class Toolbar {
let previousIsCTK = false;
if (currentPreviousSibling) {
if (currentPreviousSibling.nodeType === 1) {
const currentPreviousSiblingTypes = currentPreviousSibling.dataset.type.split(" ")
const currentPreviousSiblingTypes = currentPreviousSibling.dataset.type.split(" ");
if (currentPreviousSiblingTypes.includes("code") || currentPreviousSiblingTypes.includes("tag") || currentPreviousSiblingTypes.includes("kbd")) {
previousIsCTK = true;
}
Expand All @@ -664,7 +664,7 @@ export class Toolbar {
let nextIsCTK = false;
if (currentNextSibling) {
if (currentNextSibling.nodeType === 1) {
const currentNextSiblingTypes = currentNextSibling.dataset.type.split(" ")
const currentNextSiblingTypes = currentNextSibling.dataset.type.split(" ");
if (currentNextSiblingTypes.includes("code") || currentNextSiblingTypes.includes("tag") || currentNextSiblingTypes.includes("kbd")) {
nextIsCTK = true;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/protyle/ui/initUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,5 @@ export const getPadding = (protyle: IProtyle) => {
}
return {
left, right, bottom, top: 16
}
}
};
};
4 changes: 2 additions & 2 deletions app/src/protyle/wysiwyg/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
let listElement: Element;
let topParentElement: Element;
hideElements(["select"], protyle);
let foldPreviousId: string
let foldPreviousId: string;
selectElements.find((item: HTMLElement) => {
const topElement = getTopAloneElement(item);
topParentElement = topElement.parentElement;
Expand Down Expand Up @@ -75,7 +75,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
if (topElement.getAttribute("data-type") === "NodeHeading" && topElement.getAttribute("fold") === "1") {
// https://github.com/siyuan-note/siyuan/issues/2188
setFold(protyle, topElement, undefined, true);
let previousID = topElement.previousElementSibling ? topElement.previousElementSibling.getAttribute("data-node-id") : ""
let previousID = topElement.previousElementSibling ? topElement.previousElementSibling.getAttribute("data-node-id") : "";
if (typeof foldPreviousId !== "undefined") {
previousID = foldPreviousId;
}
Expand Down

0 comments on commit 46282d2

Please sign in to comment.