An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:rotating_light:
Vanessa2629e10b8ed0
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.tsindex de7f8fd78c..65d071cad0 100644--- a/app/src/protyle/render/av/action.ts+++ b/app/src/protyle/render/av/action.ts@@ -306,16 +306,16 @@ export const addAttrViewColAnimation = (options: {id: string}) => {if (!options.blockElement) {- return+ return;}options.blockElement.querySelectorAll(".av__row").forEach((item, index) => {- let previousElement+ let previousElement;if (options.previousId) {- previousElement = item.querySelector(`[data-col-id="${options.previousId}"]`)+ previousElement = item.querySelector(`[data-col-id="${options.previousId}"]`);} else {previousElement = item.lastElementChild.previousElementSibling;}- let html = ""+ let html = "";if (index === 0) {html = `<div class="av__cell" data-col-id="${options.id}" data-dtype="${options.type}" style="width: 200px;white-space: nowrap;"><div draggable="true" class="av__cellheader">@@ -323,40 +323,40 @@ export const addAttrViewColAnimation = (options: {<span class="av__celltext">${options.name}</span></div><div class="av__widthdrag"></div>-</div>`+</div>`;} else {- html = '<div class="av__cell" style="width: 200px"></div>'+ html = '<div class="av__cell" style="width: 200px"></div>';}- previousElement.insertAdjacentHTML("afterend", html)- })+ previousElement.insertAdjacentHTML("afterend", html);+ });window.siyuan.menus.menu.remove();showColMenu(options.protyle, options.blockElement, options.blockElement.querySelector(`.av__row--header .av__cell[data-col-id="${options.id}"]`));};export const updateAttrViewCellAnimation = (cellElement: HTMLElement) => {- cellElement.style.opacity = "0.38"+ cellElement.style.opacity = "0.38";cellElement.style.backgroundColor = "var(--b3-theme-surface-light)";-}+};export const removeAttrViewColAnimation = (blockElement: Element, id: string) => {blockElement.querySelectorAll(`.av__cell[data-col-id="${id}"]`).forEach(item => {item.remove();- })-}+ });+};export const insertAttrViewBlockAnimation = (blockElement: Element, size: number, previousId: string) => {- const previousElement = blockElement.querySelector(`.av__row[data-id="${previousId}"]`) || blockElement.querySelector(`.av__row--header`);- let colHTML = ""+ const previousElement = blockElement.querySelector(`.av__row[data-id="${previousId}"]`) || blockElement.querySelector(".av__row--header");+ let colHTML = "";previousElement.querySelectorAll(".av__cell").forEach((item: HTMLElement) => {- colHTML += `<div class="av__cell" style="width: ${item.style.width}"></div>`- })+ colHTML += `<div class="av__cell" style="width: ${item.style.width}"></div>`;+ });- let html = ""+ let html = "";new Array(size).fill(1).forEach(() => {html += `<div class="av__row"><div class="av__firstcol"><img src="/stage/loading-pure.svg"></div>${colHTML}-</div>`- })- previousElement.insertAdjacentHTML("afterend", html)-}+</div>`;+ });+ previousElement.insertAdjacentHTML("afterend", html);+};diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.tsindex 5e7d11df2d..39657f6215 100644--- a/app/src/protyle/render/av/col.ts+++ b/app/src/protyle/render/av/col.ts@@ -467,7 +467,7 @@ export const showColMenu = (protyle: IProtyle, blockElement: Element, cellElementype: type,id: colId}]);- removeAttrViewColAnimation(blockElement, colId)+ removeAttrViewColAnimation(blockElement, colId);}});menu.addSeparator();diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.tsindex 593b7a73f4..bfe9a139dc 100644--- a/app/src/protyle/render/av/render.ts+++ b/app/src/protyle/render/av/render.ts@@ -1,5 +1,5 @@import {fetchPost} from "../../../util/fetch";-import {getColIconByType, showColMenu} from "./col";+import {getColIconByType} from "./col";import {Constants} from "../../../constants";import {getCalcValue} from "./cell";import * as dayjs from "dayjs";