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: Refine data snapshot comparison filter layout https://github.com/siyuan-note/siyuan/issues/10925
Daniel55307954cf79
diff --git a/app/src/assets/scss/business/_history.scss b/app/src/assets/scss/business/_history.scssindex ddeaaf56b2..d2f389f25e 100644--- a/app/src/assets/scss/business/_history.scss+++ b/app/src/assets/scss/business/_history.scss@@ -61,12 +61,10 @@border: 0;font-family: inherit;}- }- &-filter-label {- margin: 4px 4px 4px 8px;- color: var(--b3-theme-on-surface);- font-size: 12px;+ &--kind {+ padding-left: 8px;+ }}&-list {diff --git a/app/src/history/diff.ts b/app/src/history/diff.tsindex 54bc0356e7..96dd69cdfb 100644--- a/app/src/history/diff.ts+++ b/app/src/history/diff.ts@@ -196,9 +196,8 @@ const genSnapshotFilters = (state: SnapshotDiffFilterState) => {aggregateCounts.other, state.aggregate === "other"));}- const availableKinds = snapshotFileKinds.filter((kind) => {- return (kindCounts.get(kind) || 0) > 0 &&- (state.aggregate === "all" || getSnapshotAggregate(kind) === state.aggregate);+ const availableKinds = state.aggregate === "all" ? [] : snapshotFileKinds.filter((kind) => {+ return (kindCounts.get(kind) || 0) > 0 && getSnapshotAggregate(kind) === state.aggregate;});const kindFilters = availableKinds.map((kind) => {return genSnapshotFilter("snapshotKind", kind, getSnapshotKindLabel(kind), kindCounts.get(kind),@@ -206,7 +205,7 @@ const genSnapshotFilters = (state: SnapshotDiffFilterState) => {}).join("");return `<div class="history__diff-filters"><div class="history__diff-filter-row">${aggregateFilters.join("")}</div>- ${availableKinds.length > 1 ? `<div class="history__diff-filter-row"><span class="history__diff-filter-label">${window.siyuan.languages.type}</span>${kindFilters}</div>` : ""}+ ${availableKinds.length > 1 ? `<div class="history__diff-filter-row history__diff-filter-row--kind">${kindFilters}</div>` : ""}</div>`;};