Skip to content

fix(dashboard): theme confirmation dialogs via App.useApp() - #442

Merged
jubaoliang merged 3 commits into
TencentCloud:developfrom
liukewia:fix/dashboard-themed-modal-confirm
Aug 27, 2026
Merged

fix(dashboard): theme confirmation dialogs via App.useApp()#442
jubaoliang merged 3 commits into
TencentCloud:developfrom
liukewia:fix/dashboard-themed-modal-confirm

Conversation

@liukewia

Copy link
Copy Markdown
Contributor

Summary

  • Bind Ant Design modal from <App> (same pattern as antdMessage) so confirmation dialogs inherit ConfigProvider theme instead of using static Modal.confirm.
  • Route hook-based pages through App.useApp() and keep non-hook helpers (confirmModal) on the bound modal proxy.
  • Drop unused onnxDownloadProgress i18n keys in favor of onnxDownloading during local model download.

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (release/* or hotfix/* only)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore
  • Release / hotfix

Test plan

  • Confirm dialogs (delete provider, storage backend, skills, etc.) follow the current dashboard theme (light/dark).

  • Destructive confirms still show danger OK and complete the same API calls as before.

  • make all passes locally

  • Added/updated tests

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)

Made with Cursor

leoxyang and others added 3 commits August 26, 2026 18:15
…dialogs

- Added `modal` utility from `antdModal` to replace direct `Modal` calls across various components, ensuring a unified approach to confirmation dialogs.
- Updated components to utilize the new `modal.confirm` method, enhancing maintainability and consistency in user interactions.
- Removed direct imports of `Modal` from `antd` in favor of the new utility, streamlining the codebase.

This change improves the user experience by standardizing modal behavior and appearance throughout the application.
- Replaced direct imports of `message` and `modal` from utility files with `App.useApp()` in various components, promoting a consistent approach to accessing application-wide functionalities.
- Updated components to utilize the new structure, enhancing maintainability and reducing redundancy in imports.

This change streamlines the codebase and improves the overall architecture of the dashboard components.
@liukewia
liukewia marked this pull request as draft August 26, 2026 12:30
@liukewia
liukewia marked this pull request as ready for review August 27, 2026 02:53
@jubaoliang
jubaoliang merged commit fef9b2b into TencentCloud:develop Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants