An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve opening database gallery items from covers https://github.com/siyuan-note/siyuan/issues/15175
Daniel2191e73bc570
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.tsindex 3c3236b805..302610c999 100644--- a/app/src/protyle/render/av/action.ts+++ b/app/src/protyle/render/av/action.ts@@ -293,8 +293,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEleevent.preventDefault();event.stopPropagation();return true;- } else if (viewType === "gallery" && target.classList.contains("av__gallery-cover") &&- (hasClosestByClassName(target, "av__gallery-item") as HTMLElement)?.classList.contains("av__gallery-item--primary-hidden")) {+ } else if (viewType === "gallery" && target.classList.contains("av__gallery-cover")) {openDatabaseRow(protyle, target, blockElement);event.preventDefault();event.stopPropagation();diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.tsindex efa1a5a5f1..0f358aa962 100644--- a/app/src/protyle/render/av/row.ts+++ b/app/src/protyle/render/av/row.ts@@ -58,7 +58,7 @@ export const getRowHTML = (options: {const primaryHidden = galleryData.fields.find(field => field.type === "block")?.hidden === true;const hasVisibleFields = galleryData.fields.some(field => !field.hidden);const emptyClass = !hasVisibleFields && galleryData.coverFrom === 0 ? " av__gallery-item--empty" : "";- html += `<div data-id="${galleryRow.id}" data-index="${options.rowIndex}" draggable="true" class="av__gallery-item${primaryHidden ? " av__gallery-item--primary-hidden" : ""}${emptyClass}">`;+ html += `<div data-id="${galleryRow.id}" data-index="${options.rowIndex}" draggable="true" class="av__gallery-item${emptyClass}">`;if (galleryData.coverFrom !== 0) {const coverClass = "av__gallery-cover av__gallery-cover--" + galleryData.cardAspectRatio;if (galleryRow.coverURL) {