Skip to content

Commit 7b8b2c7

Browse files
committed
feat: improve providers section
1 parent f0c9805 commit 7b8b2c7

7 files changed

Lines changed: 28 additions & 34 deletions

File tree

ui/src/components/KeysSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ en-US:
200200
loadFailed: Failed to load
201201
description1: Purchase and configure API through
202202
description2: ''
203-
loggedIn: Logged In
203+
loggedIn: Configured
204204
loggedOut: Logged Out
205205
configure: Configure {0}
206206
</i18n>

ui/src/components/ProviderCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ zh-CN:
127127
confirm: 确认
128128
userName: 用户名
129129
en-US:
130-
loggedIn: Logged in
131-
realname: Real Name
130+
loggedIn: Configured
131+
realname: Legal Name
132132
verified: Verified
133133
unverified: Unverified
134134
phone: Phone

ui/src/components/ProviderRealNameDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async function checkAuthStatus() {
119119
</DialogHeader>
120120

121121
<div v-if="status" class="space-y-4">
122-
<Card>
122+
<Card class="gap-y-2">
123123
<CardHeader class="pb-3">
124124
<CardTitle class="text-sm flex items-center gap-2 text-green-700">
125125
<div class="h-2 w-2 bg-green-500 rounded-full" />
@@ -264,7 +264,7 @@ en-US:
264264
description: As required by SiliconFlow, please complete real name authentication before recharging
265265
authStatusDescription: Your real name authentication status
266266
verified: Verified
267-
realName: Real Name
267+
realName: Legal Name
268268
realNamePlaceholder: Please enter your real name
269269
cardType: ID Type
270270
idCard: ID Card

ui/src/components/ProvidersListCard.vue

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@ const showProviderDialog = shallowRef<Provider | null>(null)
2020
<template>
2121
<Dialog>
2222
<DialogTrigger>
23-
<Card class="relative gap-2 hover:bg-secondary text-left">
23+
<Card class="relative gap-2 hover:bg-secondary text-left h-full">
2424
<CardHeader>
2525
<CardTitle>
26-
{{ t('title') }}
26+
<div class="flex gap-2 items-center text-lg">
27+
<ListPlusIcon class="w-6 mb-1" />
28+
{{ t('title') }}
29+
</div>
2730
</CardTitle>
2831
</CardHeader>
2932
<CardContent>
30-
123
33+
<div class="text-sm text-muted-foreground">
34+
{{ t('description') }}
35+
</div>
3136
</CardContent>
3237
</Card>
3338
</DialogTrigger>
@@ -67,16 +72,10 @@ const showProviderDialog = shallowRef<Provider | null>(null)
6772
<i18n lang="yaml">
6873
zh-CN:
6974
title: 其他提供商
70-
description: 请输入您的 API 配置信息
71-
manual: 手动配置
75+
description: 选择或自定义您的模型提供商
76+
manual: 自定义提供商
7277
en-US:
73-
title: Manual API Configuration
74-
description: Please enter your API configuration information
75-
providerName: Provider Name
76-
providerNamePlaceholder: e.g., OpenAI, Claude, etc.
77-
baseUrl: Base URL
78-
baseUrlPlaceholder: e.g., https://api.openai.com/v1
79-
apiKey: API Key
80-
apiKeyPlaceholder: Enter your API Key
81-
save: Save Configuration
78+
title: Other Providers
79+
description: Select a provider or customize your own
80+
manual: Custom Provider
8281
</i18n>

ui/src/components/ProvidersSection.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ const showProviderDialog = shallowRef<Provider | null>(null)
1515
</script>
1616

1717
<template>
18-
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3">
18+
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4">
1919
<Card v-for="provider in providers" :key="provider.id" class="relative gap-2 hover:bg-secondary" @click="showProviderDialog = provider">
2020
<CardHeader>
2121
<div class="flex items-center justify-between flex-wrap gap-2">
22-
<CardTitle class="flex text-lg min-w-0">
22+
<CardTitle class="flex text-lg min-w-34">
2323
<ProviderName :provider="provider" />
2424
</CardTitle>
25-
<div v-if="provider.user !== undefined" class="flex items-center gap-2 self-end">
25+
<div v-if="provider.user !== undefined" class="flex items-center gap-2">
2626
<span
27-
class="inline-flex items-center rounded-full px-2 py-1 text-xs font-medium text-accent-foreground"
27+
class="inline-flex items-center rounded-full px-2 py-1 text-xs font-medium text-accent-foreground select-none"
2828
:class="{
2929
'bg-emerald-200 dark:bg-green-500/60': !!provider.user,
3030
'bg-accent': !provider.user,
@@ -73,6 +73,6 @@ en-US:
7373
loadFailed: Failed to load
7474
description1: Purchase and configure API through
7575
description2: ''
76-
loggedIn: Logged In
77-
loggedOut: Logged Out
76+
loggedIn: Configured
77+
loggedOut: Configure
7878
</i18n>

ui/src/views/Models.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ zh-CN:
2323
title: 模型管理
2424
2525
en-US:
26-
title: Models
26+
title: Model Providers
2727
</i18n>

ui/src/views/Usage.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,8 @@ onMounted(() => {
148148
<div class="space-y-6">
149149
<div class="flex flex-wrap items-center justify-between gap-3">
150150
<div>
151-
<p class="text-xs uppercase tracking-wide text-muted-foreground">
152-
{{ t('title') }}
153-
</p>
154151
<h2 class="text-2xl font-bold">
155-
{{ t('overview') }}
152+
{{ t('title') }}
156153
</h2>
157154
</div>
158155
<div class="flex items-center gap-2">
@@ -388,8 +385,7 @@ onMounted(() => {
388385

389386
<i18n lang="yaml">
390387
zh-CN:
391-
title: Token 用量统计
392-
overview: 用量总览
388+
title: 用量统计
393389
last7Days: 最近7天
394390
last30Days: 最近30天
395391
last90Days: 最近90天
@@ -414,8 +410,7 @@ zh-CN:
414410
statusSuccess: 成功
415411
statusFailed: 失败
416412
en-US:
417-
title: Token Usage Statistics
418-
overview: Overview
413+
title: Usage Statistics
419414
last7Days: Last 7 Days
420415
last30Days: Last 30 Days
421416
last90Days: Last 90 Days

0 commit comments

Comments
 (0)