Skip to content

Commit ab64e94

Browse files
committed
Refactor toolbar layout to group configuration count and actions with improved spacing and alignment
1 parent 7043bd1 commit ab64e94

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

‎packages/ui/src/components/editor/settings/ConfigurationsList/ConfigurationsList.module.scss‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
justify-content: space-between;
1111
}
1212

13+
.toolbar-group {
14+
display: flex;
15+
align-items: center;
16+
gap: 8px;
17+
}
18+
1319
.list {
1420
display: flex;
1521
flex-direction: column;

‎packages/ui/src/components/editor/settings/ConfigurationsList/ConfigurationsList.tsx‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,21 @@ export const ConfigurationsList: React.FC<ConfigurationsList.Props> = (
7575
return (
7676
<div className={styles.container}>
7777
<div className={styles.toolbar}>
78+
<div className={styles['toolbar-group']}>
79+
<span style={{ fontWeight: 500 }}>
80+
{props.configurations.length} configuration
81+
{props.configurations.length === 1 ? '' : 's'}
82+
</span>
83+
{props.on_unset_default && has_default && (
84+
<>
85+
<span>·</span>
86+
<TextButton on_click={props.on_unset_default}>
87+
Unset default
88+
</TextButton>
89+
</>
90+
)}
91+
</div>
7892
<Button on_click={props.on_add}>New Configuration...</Button>
79-
{props.on_unset_default && has_default && (
80-
<TextButton on_click={props.on_unset_default}>
81-
Unset default
82-
</TextButton>
83-
)}
8493
</div>
8594
<div className={styles.list}>
8695
{props.configurations.length > 0 ? (

‎packages/ui/src/components/editor/settings/ModelProviders/ModelProviders.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
display: flex;
88
padding: 12px 12px 8px 12px;
99
align-items: center;
10-
gap: 8px;
10+
justify-content: space-between;
1111
}
1212

1313
.list {

‎packages/ui/src/components/editor/settings/ModelProviders/ModelProviders.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export const ModelProviders: React.FC<ModelProviders.Props> = (props) => {
6969
return (
7070
<div className={styles.container}>
7171
<div className={styles.toolbar}>
72+
<span style={{ fontWeight: 500 }}>
73+
{props.providers.length} model provider
74+
{props.providers.length === 1 ? '' : 's'}
75+
</span>
7276
<Button on_click={props.on_add_provider}>New Provider...</Button>
7377
</div>
7478
<div className={styles.list}>

0 commit comments

Comments
 (0)