An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: fix https://github.com/siyuan-note/insider/issues/1117
Vanessac3d53966d58b
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.tsindex 60f268b69b..9befc0520f 100644--- a/app/src/protyle/render/av/cell.ts+++ b/app/src/protyle/render/av/cell.ts@@ -86,10 +86,10 @@ export const genCellValue = (colType: TAVCol, value: string | {}};}- } else if (colType === "text") {+ } else if (["text", "block", "url"].includes(colType)) {cellValue = {type: colType,- text: {+ [colType]: {content: value}};diff --git a/app/src/protyle/render/av/filter.ts b/app/src/protyle/render/av/filter.tsindex d7ce4cab3e..224ef8540b 100644--- a/app/src/protyle/render/av/filter.ts+++ b/app/src/protyle/render/av/filter.ts@@ -52,7 +52,10 @@ export const setFilter = (options: {data: IAV,target: HTMLElement,}) => {- const rectTarget = options.target.getBoundingClientRect();+ let rectTarget = options.target.getBoundingClientRect();+ if (rectTarget.height === 0) {+ rectTarget = options.protyle.wysiwyg.element.querySelector(`[data-col-id="${options.target.dataset.colId}"]`).getBoundingClientRect();+ }const menu = new Menu("set-filter-" + options.filter.column, () => {const oldFilters = JSON.parse(JSON.stringify(options.data.view.filters));const operator = (window.siyuan.menus.menu.element.querySelector(".b3-select") as HTMLSelectElement).value as TAVFilterOperator;@@ -212,7 +215,7 @@ export const setFilter = (options: {} else if (["text", "url", "block"].includes(colData.type)) {menu.addItem({iconHTML: "",- label: `<input style="margin: 4px 0" value="${options.filter.value?.text.content || ""}" class="b3-text-field fn__size200">`+ label: `<input style="margin: 4px 0" value="${options.filter.value ? options.filter.value[colData.type as "text"].content : ""}" class="b3-text-field fn__size200">`});} else if (colData.type === "number") {menu.addItem({@@ -385,17 +388,18 @@ export const getFiltersHTML = (data: IAVTable) => {} else if ("<=" === filter.operator) {filterValue = ` ≤ ${filter.value.number.content}`;}- } else if (filter.value?.text?.content) {+ } else if (filter.value?.text?.content || filter.value?.block?.content || filter.value?.url?.content) {+ const content = filter.value?.text?.content || filter.value?.block?.content || filter.value?.url?.content;if (["=", "Contains"].includes(filter.operator)) {- filterValue = `: ${filter.value.text.content}`;+ filterValue = `: ${content}`;} else if (filter.operator === "Does not contains") {- filterValue = ` ${window.siyuan.languages.filterOperatorDoesNotContain} ${filter.value.text.content}`;+ filterValue = ` ${window.siyuan.languages.filterOperatorDoesNotContain} ${content}`;} else if (filter.operator === "!=") {- filterValue = ` ${window.siyuan.languages.filterOperatorIsNot} ${filter.value.text.content}`;+ filterValue = ` ${window.siyuan.languages.filterOperatorIsNot} ${content}`;} else if ("Starts with" === filter.operator) {- filterValue = ` ${window.siyuan.languages.filterOperatorStartsWith} ${filter.value.text.content}`;+ filterValue = ` ${window.siyuan.languages.filterOperatorStartsWith} ${content}`;} else if ("Ends with" === filter.operator) {- filterValue = ` ${window.siyuan.languages.filterOperatorEndsWith} ${filter.value.text.content}`;+ filterValue = ` ${window.siyuan.languages.filterOperatorEndsWith} ${content}`;}}filterHTML += `<span data-type="setFilter" class="b3-chip${filterValue ? " b3-chip--primary" : ""}">diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex fda908a492..e80078cc13 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -930,7 +930,7 @@ interface IAVCellValue {text?: { content: string },number?: { content?: number, isNotEmpty: boolean, format?: string, formattedContent?: string },mSelect?: { content: string, color: string }[]- block?: { content: string, id: string }+ block?: { content: string, id?: string }url?: { content: string }date?: IAVCellDateValue}