mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
* refactor(eslint): reorganize eslint config for better maintainability Move ignores section and oxlint configs to be grouped with other configurations * fix(eslint): update antd import restriction to include Switch Add Switch to restricted imports from antd to enforce using custom components * feat(ui): add Switch component wrapper and update imports Add a wrapper for the Switch component from @heroui/react and export it through @cherrystudio/ui. Update eslint rules to prevent direct imports from @heroui/react and update imports in TranslateSettings to use the new wrapper * refactor(ui): replace antd Switch with custom Switch component Migrate all instances of antd Switch component to the custom Switch component from @cherrystudio/ui. This includes updating props from `checked` to `isSelected` and `onChange` to `onValueChange` to match the new component's API. Also updates size prop from `small` to `sm` where applicable. The change ensures consistency across the UI and reduces dependency on antd components. All affected files have been updated to use the new Switch component with proper prop mappings. * feat(ui): enhance Switch component with loading state Add loading state support to Switch component by showing a spinner when isLoading is true and disabling interaction during loading. Update all Switch component usages to use the new isLoading prop instead of loading. * fix(Switch): prevent thumbIcon override when isLoading is true Implement type constraints to disallow thumbIcon when isLoading is true Add ref forwarding support and export enhanced props type * fix(settings): update Switch component props to use consistent naming Change deprecated 'defaultChecked' and 'disabled' props to 'defaultSelected' and 'isDisabled' respectively to match component library updates * refactor(Switch): simplify type definition by removing redundant ref prop * refactor(Switch): simplify props type definition for loading state Remove complex union type in favor of simpler interface extending SwitchProps * docs(ui): add jsdoc for CustomizedSwitch component Add documentation for the CustomizedSwitch component to clarify its purpose and the isLoading prop usage * fix(eslint): comment out heroui import restriction rule Temporarily disable the heroui import restriction to allow direct imports while wrapped components are being updated * style: fix formatting and spacing in settings components |
||
|---|---|---|
| .. | ||
| aiCore | ||
| extension-table-plus | ||
| mcp-trace | ||
| shared | ||
| ui | ||