Skip to content

The loading icon no longer covers the entire cloud configuration page#17434

Merged
Vanessa219 merged 1 commit intosiyuan-note:devfrom
TCOTC:fix/loading-icon
Apr 10, 2026
Merged

The loading icon no longer covers the entire cloud configuration page#17434
Vanessa219 merged 1 commit intosiyuan-note:devfrom
TCOTC:fix/loading-icon

Conversation

@TCOTC
Copy link
Copy Markdown
Contributor

@TCOTC TCOTC commented Apr 8, 2026

Description / 描述

目前打开页面之后要完全等待 /api/cloud/getCloudSpace 接口完成才能继续操作,有点久,比较麻烦:

video.webm

改进为加载图标不再覆盖整个云端配置页面:

video.webm

Type of change / 变更类型

  • Bug fix
    缺陷修复
  • Refactoring
    代码重构
  • New feature
    新功能
  • Text updates or new language additions
    修改文案或增加新语言

Checklist / 检查清单

  • I have performed a self-review of my own code
    我对自己的代码进行了自我审查
  • I have full rights to the submitted code and agree to license it under this project's AGPL-3.0 license
    我拥有所提交代码的完整权利,并同意其以本项目的 AGPL-3.0 许可证授权
  • PR is submitted to the dev branch and has no merge conflicts
    PR 提交到 dev 分支,并且没有合并冲突

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, but bindEvent() still attaches the delegated click handler to repos.element.firstElementChild. With multiple top-level siblings, firstElementChild is now just the first row (sync provider), so clicks on later data-action controls (e.g. config/togglePassword/exportData/purgeData) won’t bubble to the handler and those actions will stop working. Reintroduce a root wrapper element in genHTML() or change the event binding target to repos.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">
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
@Vanessa219 Vanessa219 merged commit a93d7ad into siyuan-note:dev Apr 10, 2026
5 checks passed
@Vanessa219 Vanessa219 added this to the 3.6.4 milestone Apr 10, 2026
Vanessa219 added a commit that referenced this pull request Apr 10, 2026
@TCOTC TCOTC deleted the fix/loading-icon branch April 10, 2026 04:05
Vanessa219 added a commit that referenced this pull request Apr 10, 2026
@Vanessa219 Vanessa219 self-assigned this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants