The loading icon no longer covers the entire cloud configuration page#17434
The loading icon no longer covers the entire cloud configuration page#17434Vanessa219 merged 1 commit intosiyuan-note:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the cloud configuration (sync repos) UI so the loading indicator no longer blocks the entire page while /api/cloud/getCloudSpace is loading, allowing users to continue interacting with other controls.
Changes:
- Replaces the full-page fixed loading overlay with an in-panel loading section rendered inside
#reposData. - Adds a small helper (
getReposDataLoadingHTML) to render the non-blocking loading UI.
Comments suppressed due to low confidence (1)
app/src/config/repos.ts:463
genHTML()no longer wraps the returned markup in a single root element, butbindEvent()still attaches the delegated click handler torepos.element.firstElementChild. With multiple top-level siblings,firstElementChildis now just the first row (sync provider), so clicks on laterdata-actioncontrols (e.g. config/togglePassword/exportData/purgeData) won’t bubble to the handler and those actions will stop working. Reintroduce a root wrapper element ingenHTML()or change the event binding target torepos.element(the container) so delegation covers the full panel.
genHTML: () => {
return `<div class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.syncProvider}
<div class="b3-label__text">${window.siyuan.languages.syncProviderTip}</div>
</div>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ${window.siyuan.languages.trafficStat} | ||
| </div> | ||
| </div> | ||
| <div style="min-height: 180px; display: flex; justify-content: center;" id="reposLoading"> |
There was a problem hiding this comment.
The new loading container uses display: flex without align-items: center. In a row-direction flex container, the default align-items: stretch can cause the <img> to stretch vertically to the container’s min-height (180px), distorting the spinner and misaligning it. Add align-items: center (and optionally constrain the image size) or reuse an existing centered loading style used elsewhere in the app.
| <div style="min-height: 180px; display: flex; justify-content: center;" id="reposLoading"> | |
| <div style="min-height: 180px; display: flex; justify-content: center; align-items: center;" id="reposLoading"> |
Description / 描述
目前打开页面之后要完全等待
/api/cloud/getCloudSpace接口完成才能继续操作,有点久,比较麻烦:video.webm
改进为加载图标不再覆盖整个云端配置页面:
video.webm
Type of change / 变更类型
缺陷修复
代码重构
新功能
修改文案或增加新语言
Checklist / 检查清单
我对自己的代码进行了自我审查
我拥有所提交代码的完整权利,并同意其以本项目的 AGPL-3.0 许可证授权
devbranch and has no merge conflictsPR 提交到
dev分支,并且没有合并冲突