Skip to content

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

:sparkles: Improve database view switcher placement https://github.com/siyuan-note/siyuan/issues/20550

Daniela0ae7d020d6d
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index da10e98824..784e97cf4f 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -158,6 +158,12 @@ export const genTabHeaderHTML = (data: IAV, showSearch: boolean, editable: boole
<svg><use xlink:href="#iconMore"></use></svg>
</button>
</div>
+ <span data-type="av-switcher" aria-label="${window.siyuan.languages.allViews}" data-position="8south" class="ariaLabel block__icon${visibleViewIDs.length < data.views.length ? " block__icon--show" : " av__views-switcher--all"}${data.views.length > 0 ? "" : " fn__none"}">
+ <svg><use xlink:href="#iconEye"></use></svg>
+ <span class="fn__space"></span>
+ <small>${visibleViewIDs.length}/${data.views.length}</small>
+ </span>
+ <div class="fn__space"></div>
<div class="layout-tab-bar fn__flex">
${tabHTML}
</div>
@@ -192,12 +198,6 @@ export const genTabHeaderHTML = (data: IAV, showSearch: boolean, editable: boole
${data.isMirror ? `<span data-av-id="${data.id}" data-popover-url="/api/av/getMirrorDatabaseBlocks" class="popover__block block__icon block__icon--show ariaLabel" data-position="8south" aria-label="${window.siyuan.languages.mirrorTip}">
<svg><use xlink:href="#iconSplitLR"></use></svg>
</span><div class="fn__space"></div>` : ""}
- <span data-type="av-switcher" aria-label="${window.siyuan.languages.allViews}" data-position="8south" class="ariaLabel block__icon${visibleViewIDs.length < data.views.length ? " block__icon--show" : " av__views-switcher--all"}${data.views.length > 0 ? "" : " fn__none"}">
- <svg><use xlink:href="#iconEye"></use></svg>
- <span class="fn__space"></span>
- <small>${visibleViewIDs.length}/${data.views.length}</small>
- </span>
- <div class="fn__space"></div>
${editingState.newItemHTML}
</div>
<div contenteditable="${editingState.contenteditable}" spellcheck="${window.siyuan.config.editor.spellcheck.toString()}" class="av__title${viewData.hideAttrViewName ? " fn__none" : ""}" data-title="${escapeHtmlTextAndAttr(data.name || "")}" data-tip="${window.siyuan.languages._kernel[267]}">${escapeHtmlTextAndAttr(data.name || "")}</div>