Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/11022

Vanessac3e516404457
diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts
index a7f87393b6..e6828a51d7 100644
--- a/app/src/protyle/render/av/col.ts
+++ b/app/src/protyle/render/av/col.ts
@@ -955,6 +955,18 @@ export const showColMenu = (protyle: IProtyle, blockElement: Element, cellElemen
updateAttrViewCellAnimation(blockElement.querySelector(`.av__row--header .av__cell[data-col-id="${colId}"]`), undefined, {pin: !isPin});
}
});
+ menu.addItem({
+ icon: "iconRefresh",
+ label: window.siyuan.languages.syncColWidth,
+ click() {
+ transaction(protyle, [{
+ action: "syncColWidth",
+ keyID: colId,
+ avID,
+ id: blockElement.getAttribute(Constants.CUSTOM_SY_AV_VIEW),
+ }]);
+ }
+ });
if (type !== "block") {
if (type !== "relation") {
menu.addItem({
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index b852dd6377..4be9737e82 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -64,6 +64,7 @@ type TOperation =
| "setAttrViewColDesc"
| "setAttrViewBlockView"
| "setAttrViewGroup"
+ | "syncColWidth"
type TBazaarType = "templates" | "icons" | "widgets" | "themes" | "plugins"
type TCardType = "doc" | "notebook" | "all"
type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |