mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
b66c76d83d
commit
cbbd8e831d
4 changed files with 38 additions and 5636 deletions
5636
app/pnpm-lock.yaml
generated
5636
app/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -18,6 +18,7 @@ import {genCellValueByElement, getTypeByCellElement} from "./cell";
|
|||
import {writeText} from "../../util/compatibility";
|
||||
import {escapeAttr} from "../../../util/escape";
|
||||
import {renameAsset} from "../../../editor/rename";
|
||||
import * as dayjs from "dayjs";
|
||||
|
||||
export const bindAssetEvent = (options: {
|
||||
protyle: IProtyle,
|
||||
|
|
@ -157,6 +158,11 @@ export const updateAssetCell = (options: {
|
|||
updateAttrViewCellAnimation(item, cellValue);
|
||||
}
|
||||
});
|
||||
cellDoOperations.push({
|
||||
action: "doUpdateUpdated",
|
||||
id: options.blockElement.getAttribute("data-node-id"),
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
});
|
||||
transaction(options.protyle, cellDoOperations, cellUndoOperations);
|
||||
const menuElement = document.querySelector(".av__panel > .b3-menu") as HTMLElement;
|
||||
if (menuElement) {
|
||||
|
|
|
|||
|
|
@ -154,6 +154,10 @@ export const updateRelation = (options: {
|
|||
isTwoWay: (options.avElement.querySelector(".b3-switch") as HTMLInputElement).checked,
|
||||
name: inputElement.value,
|
||||
format: colNewName
|
||||
}, {
|
||||
action: "doUpdateUpdated",
|
||||
id: options.blockElement.getAttribute("data-node-id"),
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
}], [{
|
||||
action: "updateAttrViewColRelation",
|
||||
avID: options.avID,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {updateAttrViewCellAnimation} from "./action";
|
|||
import {genAVValueHTML} from "./blockAttr";
|
||||
import {escapeAriaLabel, escapeAttr, escapeHtml} from "../../../util/escape";
|
||||
import {genCellValueByElement, getTypeByCellElement} from "./cell";
|
||||
import * as dayjs from "dayjs";
|
||||
|
||||
let cellValues: IAVCellValue[];
|
||||
|
||||
|
|
@ -119,6 +120,11 @@ export const removeCellOption = (protyle: IProtyle, cellElements: HTMLElement[],
|
|||
updateAttrViewCellAnimation(item, cellValue);
|
||||
}
|
||||
});
|
||||
doOperations.push({
|
||||
action: "doUpdateUpdated",
|
||||
id: blockElement.getAttribute("data-node-id"),
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
});
|
||||
transaction(protyle, doOperations, undoOperations);
|
||||
Array.from(document.querySelectorAll(".av__panel .b3-menu__item")).find((item: HTMLElement) => {
|
||||
if (item.dataset.name === target.dataset.content) {
|
||||
|
|
@ -154,6 +160,10 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|||
newName: inputElement.value,
|
||||
newDesc: descElement.value
|
||||
},
|
||||
}, {
|
||||
action: "doUpdateUpdated",
|
||||
id: blockID,
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
}], [{
|
||||
action: "updateAttrViewColOption",
|
||||
id: colId,
|
||||
|
|
@ -286,6 +296,10 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|||
id: colId,
|
||||
avID: data.id,
|
||||
data: newName,
|
||||
}, {
|
||||
action: "doUpdateUpdated",
|
||||
id: blockID,
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
}], [{
|
||||
action: "updateAttrViewColOptions",
|
||||
id: colId,
|
||||
|
|
@ -359,6 +373,10 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
|||
newColor,
|
||||
newDesc: descElement.value
|
||||
},
|
||||
}, {
|
||||
action: "doUpdateUpdated",
|
||||
id: blockID,
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
}], [{
|
||||
action: "updateAttrViewColOption",
|
||||
id: colId,
|
||||
|
|
@ -579,6 +597,11 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H
|
|||
avID: data.id,
|
||||
data: colData.options
|
||||
});
|
||||
cellDoOperations.push({
|
||||
action: "doUpdateUpdated",
|
||||
id: blockElement.getAttribute("data-node-id"),
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
});
|
||||
transaction(protyle, cellDoOperations, [{
|
||||
action: "removeAttrViewColOption",
|
||||
id: colId,
|
||||
|
|
@ -586,6 +609,11 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H
|
|||
data: currentElement.dataset.name,
|
||||
}]);
|
||||
} else {
|
||||
cellDoOperations.push({
|
||||
action: "doUpdateUpdated",
|
||||
id: blockElement.getAttribute("data-node-id"),
|
||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
||||
});
|
||||
transaction(protyle, cellDoOperations, cellUndoOperations);
|
||||
}
|
||||
if (colData.type === "select") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue