Skip to content

Commit 75ffd8a

Browse files
committed
style: unify provider UI sidebar items and add button styles
1 parent 51bc06c commit 75ffd8a

8 files changed

Lines changed: 43 additions & 24 deletions

File tree

apps/web/src/components/add-provider/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
>
1212
<template #trigger>
1313
<Button
14-
class="w-full shadow-none! text-muted-foreground mb-4"
14+
class="w-full shadow-none! text-muted-foreground h-9 px-3 rounded-md border-border bg-background hover:bg-accent"
1515
variant="outline"
1616
>
1717
<Plus
18-
class="mr-1"
18+
class="mr-1 size-4"
1919
/> {{ $t('provider.addBtn') }}
2020
</Button>
2121
</template>

apps/web/src/pages/email/components/add-email-provider.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
>
1212
<template #trigger>
1313
<Button
14-
class="w-full shadow-none! text-muted-foreground mb-4"
14+
class="w-full shadow-none! text-muted-foreground h-9 px-3 rounded-md border-border bg-background hover:bg-accent"
1515
variant="outline"
1616
>
1717
<Plus
18-
class="mr-1"
18+
class="mr-1 size-4"
1919
/> {{ $t('email.add') }}
2020
</Button>
2121
</template>

apps/web/src/pages/email/index.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ const openStatus = reactive({ addOpen: false })
7070
<SidebarMenuItem>
7171
<SidebarMenuButton
7272
as-child
73-
class="justify-start py-5! px-4"
73+
:is-active="curProvider?.id === item.id"
74+
class="justify-start py-0! px-0 h-11 before:hidden"
7475
>
7576
<Toggle
76-
:class="['py-4 border', curProvider?.id === item.id ? 'border-border' : 'border-transparent']"
77+
class="w-full justify-start h-11 px-3 border-0 bg-transparent! transition-colors gap-3"
7778
:model-value="selectProvider(item.name ?? '').value"
7879
@update:model-value="(isSelect) => { if (isSelect) curProvider = item }"
7980
>
80-
{{ item.name }}
81+
<Mail class="size-4 shrink-0" />
82+
<span class="truncate text-xs font-medium">{{ item.name }}</span>
8183
</Toggle>
8284
</SidebarMenuButton>
8385
</SidebarMenuItem>

apps/web/src/pages/memory/components/add-memory-provider.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<DialogTrigger as-child>
44
<Button
55
variant="outline"
6-
class="w-full mb-4 text-muted-foreground"
6+
class="w-full shadow-none! text-muted-foreground h-9 px-3 rounded-md border-border bg-background hover:bg-accent"
77
>
88
<Plus
9-
class="mr-2"
9+
class="mr-1 size-4"
1010
/>
1111
{{ $t('memory.add') }}
1212
</Button>

apps/web/src/pages/memory/index.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,18 @@ const openStatus = reactive({ addOpen: false })
6363
<SidebarMenuItem>
6464
<SidebarMenuButton
6565
as-child
66-
class="justify-start py-5! px-4"
66+
:is-active="selectProvider(item.name).value"
67+
class="justify-start py-0! px-0 h-11 before:hidden"
6768
>
6869
<Toggle
69-
:class="`py-4 border border-transparent ${curProvider?.id === item.id ? 'border-inherit' : ''}`"
70+
class="w-full justify-start h-11 px-3 border-0 bg-transparent! transition-colors gap-3"
7071
:model-value="selectProvider(item.name).value"
7172
@update:model-value="(isSelect) => { if (isSelect) curProvider = item }"
7273
>
7374
<Brain
74-
class="mr-2 size-4 text-primary"
75+
class="size-4 shrink-0"
7576
/>
76-
{{ item.name }}
77+
<span class="truncate text-xs font-medium">{{ item.name }}</span>
7778
</Toggle>
7879
</SidebarMenuButton>
7980
</SidebarMenuItem>

apps/web/src/pages/providers/index.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,11 @@ const openStatus = reactive({
9494
<SidebarMenuItem>
9595
<SidebarMenuButton
9696
as-child
97-
class="justify-start py-5! px-4"
97+
:is-active="selectProvider(providerItem.id ?? '').value"
98+
class="justify-start py-0! px-0 h-11 before:hidden"
9899
>
99100
<Toggle
100-
:class="[
101-
'py-4 border',
102-
curProvider?.id === providerItem.id ? 'border-border' : 'border-transparent',
103-
]"
101+
class="w-full justify-start h-11 px-3 border-0 bg-transparent! transition-colors gap-3"
104102
:model-value="selectProvider(providerItem.id ?? '').value"
105103
@update:model-value="(isSelect) => {
106104
if (isSelect) {
@@ -109,15 +107,15 @@ const openStatus = reactive({
109107
}"
110108
>
111109
<span class="relative shrink-0">
112-
<span class="flex size-7 items-center justify-center rounded-full bg-muted">
110+
<span class="flex size-6 items-center justify-center rounded-full bg-muted">
113111
<ProviderIcon
114112
v-if="providerItem.icon"
115113
:icon="providerItem.icon"
116-
size="1.25em"
114+
size="1em"
117115
/>
118116
<span
119117
v-else
120-
class="text-xs font-medium text-muted-foreground"
118+
class="text-[10px] font-medium text-muted-foreground"
121119
>
122120
{{ getInitials(providerItem.name) }}
123121
</span>
@@ -128,7 +126,7 @@ const openStatus = reactive({
128126
variant="success"
129127
/>
130128
</span>
131-
<span class="truncate">{{ providerItem.name }}</span>
129+
<span class="truncate text-xs font-medium">{{ providerItem.name }}</span>
132130
</Toggle>
133131
</SidebarMenuButton>
134132
</SidebarMenuItem>

apps/web/src/pages/web-search/components/add-search-provider.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
>
1212
<template #trigger>
1313
<Button
14-
class="w-full shadow-none! text-muted-foreground mb-4"
14+
class="w-full shadow-none! text-muted-foreground h-9 px-3 rounded-md border-border bg-background hover:bg-accent"
1515
variant="outline"
1616
>
17-
<Plus class="mr-1" /> {{ $t('webSearch.add') }}
17+
<Plus class="mr-1 size-4" /> {{ $t('webSearch.add') }}
1818
</Button>
1919
</template>
2020
<template #body>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Delivery: Provider UI Unification (2026-05-14)
2+
3+
## Context
4+
Standardizing the interface for managing various providers (Email, Memory, Search) to create a predictable and cohesive user experience.
5+
6+
## Key Changes
7+
- **Unified "Add" Buttons**: Standardized the appearance of the "Add Provider" buttons across Email, Memory, and Web Search components.
8+
- **Sidebar Navigation Alignment**: Aligned the sidebar list item styles for all provider-related pages, ensuring consistent padding, height, and icon placement.
9+
- **Status Indicators**: Refined the visual presentation of provider status within the sidebar lists.
10+
11+
## File Modifications
12+
- `apps/web/src/components/add-provider/index.vue`
13+
- `apps/web/src/pages/email/components/add-email-provider.vue`
14+
- `apps/web/src/pages/memory/components/add-memory-provider.vue`
15+
- `apps/web/src/pages/web-search/components/add-search-provider.vue`
16+
- `apps/web/src/pages/email/index.vue`
17+
- `apps/web/src/pages/memory/index.vue`
18+
- `apps/web/src/pages/providers/index.vue`

0 commit comments

Comments
 (0)