mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-30 07:39:06 +08:00
* feat(toast): add toast utility functions to global interface Expose error, success, warning, and info toast functions globally for consistent notification handling * refactor(toast): use ToastPropsColored type to enforce color consistency Create ToastPropsColored type to explicitly omit color property from ToastProps * refactor(toast): simplify toast functions using factory pattern Create a factory function to generate toast functions instead of repeating similar code. This improves maintainability and reduces code duplication. * fix: replace window.message with window.toast for copy notifications * refactor(toast): update type definition to use Parameters utility Use Parameters utility type to derive ToastPropsColored from addToast parameters for better type safety * feat(types): add RequireSome utility type for making specific properties required * feat(toast): add loading toast functionality Add loading toast type to support promises in toast notifications. This enables showing loading states for async operations. * chore: add claude script to package.json * build(eslint): add packages dist folder to ignore patterns * refactor: migrate message to toast * refactor: update toast import path from @heroui/react to @heroui/toast * docs(toast): add JSDoc comments for toast functions * fix(toast): set default timeout for loading toasts Make loading toasts disappear immediately by default when timeout is not specified * fix(translate): replace window.message with window.toast for consistency Use window.toast consistently across the translation page for displaying notifications to maintain a uniform user experience and simplify the codebase. * refactor: remove deprecated message interface from window The MessageInstance interface from antd was marked as deprecated and is no longer needed in the window object. * refactor(toast): consolidate toast utilities into single export Move all toast-related functions into a single utility export to reduce code duplication and improve maintainability. Update all imports to use the new utility function. * docs(useOcr): remove redundant comment in ocr function * docs: update comments from Chinese to English Update error log messages in CodeToolsPage to use English instead of Chinese for better consistency and maintainability * feat(toast): add no-drag style and adjust toast placement add custom CSS class to disable drag on toast elements move toast placement to top-center and adjust timeout settings |
||
|---|---|---|
| .. | ||
| src | ||
| index.html | ||
| miniWindow.html | ||
| selectionAction.html | ||
| selectionToolbar.html | ||
| traceWindow.html | ||