mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 21:35:52 +08:00
refactor(ModelList): streamline button layout and improve accessibility
- Removed tooltip wrappers from manage and add model buttons for a cleaner UI. - Introduced a new Flex container for primary and default buttons, enhancing layout consistency. - Updated button rendering to improve accessibility and user experience.
This commit is contained in:
parent
38c1181359
commit
c262fd75e1
@ -112,12 +112,6 @@ const ModelList: React.FC<ModelListProps> = ({ providerId }) => {
|
|||||||
<CollapsibleSearchBar onSearch={setSearchText} />
|
<CollapsibleSearchBar onSearch={setSearchText} />
|
||||||
</HStack>
|
</HStack>
|
||||||
<HStack>
|
<HStack>
|
||||||
<Tooltip title={t('button.manage')} mouseLeaveDelay={0}>
|
|
||||||
<Button type="text" onClick={onManageModel} icon={<ListCheck size={16} />} disabled={isHealthChecking} />
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip title={t('button.add')} mouseLeaveDelay={0}>
|
|
||||||
<Button type="text" onClick={onAddModel} icon={<Plus size={16} />} disabled={isHealthChecking} />
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip title={t('settings.models.check.button_caption')} mouseLeaveDelay={0}>
|
<Tooltip title={t('settings.models.check.button_caption')} mouseLeaveDelay={0}>
|
||||||
<Button
|
<Button
|
||||||
type="text"
|
type="text"
|
||||||
@ -163,6 +157,14 @@ const ModelList: React.FC<ModelListProps> = ({ providerId }) => {
|
|||||||
<div style={{ height: 5 }} />
|
<div style={{ height: 5 }} />
|
||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
<Flex gap={10} style={{ marginTop: 10 }}>
|
||||||
|
<Button type="primary" onClick={onManageModel} icon={<ListCheck size={16} />} disabled={isHealthChecking}>
|
||||||
|
{t('button.manage')}
|
||||||
|
</Button>
|
||||||
|
<Button type="default" onClick={onAddModel} icon={<Plus size={16} />} disabled={isHealthChecking}>
|
||||||
|
{t('button.add')}
|
||||||
|
</Button>
|
||||||
|
</Flex>
|
||||||
{models.map((model) => (
|
{models.map((model) => (
|
||||||
<ModelEditContent
|
<ModelEditContent
|
||||||
provider={provider}
|
provider={provider}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user