Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
669bff78
Commit
669bff78
authored
Mar 31, 2026
by
erio
Browse files
fix(ui): 模型映射改用平台色字体,删除多余的边框色函数
parent
c90d1f25
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/admin/channel/types.ts
View file @
669bff78
...
...
@@ -84,15 +84,3 @@ export function getPlatformTagClass(platform: string): string {
default
:
return
'
bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-400
'
}
}
/** 平台对应的输入框边框色 */
export
function
getPlatformBorderClass
(
platform
:
string
):
string
{
switch
(
platform
)
{
case
'
anthropic
'
:
return
'
border-orange-300 dark:border-orange-700
'
case
'
openai
'
:
return
'
border-emerald-300 dark:border-emerald-700
'
case
'
gemini
'
:
return
'
border-blue-300 dark:border-blue-700
'
case
'
antigravity
'
:
return
'
border-purple-300 dark:border-purple-700
'
case
'
sora
'
:
return
'
border-rose-300 dark:border-rose-700
'
default
:
return
'
border-gray-300 dark:border-dark-600
'
}
}
frontend/src/views/admin/ChannelsView.vue
View file @
669bff78
...
...
@@ -322,7 +322,7 @@
:value=
"srcModel"
type=
"text"
class=
"input flex-1 text-xs"
:class=
"getPlatform
InputBorde
r(section.platform)"
:class=
"getPlatform
TextColo
r(section.platform)"
:placeholder=
"t('admin.channels.form.mappingSource', 'Source model')"
@
change=
"renameMappingKey(sIdx, srcModel, ($event.target as HTMLInputElement).value)"
/>
...
...
@@ -331,7 +331,7 @@
:value=
"section.model_mapping[srcModel]"
type=
"text"
class=
"input flex-1 text-xs"
:class=
"getPlatform
InputBorde
r(section.platform)"
:class=
"getPlatform
TextColo
r(section.platform)"
:placeholder=
"t('admin.channels.form.mappingTarget', 'Target model')"
@
input=
"section.model_mapping[srcModel] = ($event.target as HTMLInputElement).value"
/>
...
...
@@ -535,17 +535,6 @@ function getRateBadgeClass(platform: string): string {
}
}
function
getPlatformInputBorder
(
platform
:
string
):
string
{
switch
(
platform
)
{
case
'
anthropic
'
:
return
'
text-orange-600 dark:text-orange-400
'
case
'
openai
'
:
return
'
text-emerald-600 dark:text-emerald-400
'
case
'
gemini
'
:
return
'
text-blue-600 dark:text-blue-400
'
case
'
antigravity
'
:
return
'
text-purple-600 dark:text-purple-400
'
case
'
sora
'
:
return
'
text-rose-600 dark:text-rose-400
'
default
:
return
''
}
}
// ── Helpers ──
function
formatDate
(
value
:
string
):
string
{
if
(
!
value
)
return
'
-
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment