An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Improve compact sync checkout panel layout https://github.com/siyuan-note/siyuan/issues/20989
Daniel62a54caf0b39
diff --git a/app/src/assets/scss/component/_sync-checkout.scss b/app/src/assets/scss/component/_sync-checkout.scssindex a63b48c363..3d59d61764 100644--- a/app/src/assets/scss/component/_sync-checkout.scss+++ b/app/src/assets/scss/component/_sync-checkout.scss@@ -61,19 +61,18 @@bottom: 16px;transform: translateX(-50%);display: flex;- flex-wrap: wrap;- align-items: center;+ flex-direction: column;+ align-items: stretch;gap: 12px;- width: max-content;+ width: 680px;}.sync-checkout__notice {- flex: 1 1 200px;margin-bottom: 0;}.sync-checkout__actions {- margin-left: auto;+ width: 100%;}}}diff --git a/app/tests/checkoutProgress.test.js b/app/tests/checkoutProgress.test.jsindex 41c40e61ef..e9efba52cb 100644--- a/app/tests/checkoutProgress.test.js+++ b/app/tests/checkoutProgress.test.js@@ -177,6 +177,14 @@ const run = async () => {assert.ok(root.classList.contains("sync-checkout--compact"));assert.ok(root.querySelector(".sync-checkout__details").classList.contains("fn__none"));assert.equal(getComputedStyle(root.querySelector(".sync-checkout__notice")).color,sharedColor,"collapsed sync notice should use the normal progress text color");+ const compactPanel = root.querySelector(".sync-checkout__panel").getBoundingClientRect();+ const noticeRect = root.querySelector(".sync-checkout__notice").getBoundingClientRect();+ const actionsRect = root.querySelector(".sync-checkout__actions").getBoundingClientRect();+ assert.ok(actionsRect.top >= noticeRect.bottom,"compact actions must be below the notice");+ assert.ok(Math.abs(actionsRect.width-noticeRect.width) <= 1,"compact rows must fill the same available width");+ assert.ok(compactPanel.left >= 0 && compactPanel.right <= innerWidth,"compact panel must fit the viewport");+ const compactCancel = root.querySelector('[data-action="cancel"]').getBoundingClientRect();+ assert.ok(Math.abs(compactCancel.right-actionsRect.right) <= 1,"compact actions must remain right aligned");assert.equal(editor.dispatchEvent(new Event("beforeinput",{bubbles:true,cancelable:true})),false);assert.ok(document.elementFromPoint(12,12).classList.contains("sync-checkout__scrim"));const restoringMessage = "Restoring 20231013134532-9doj565.sy\\n(3192/3192): 407 B / 407 B, 44 B/s, 00:00:00 remaining";