fix(ui): 模型映射改用平台色字体,删除多余的边框色函数
This commit is contained in:
@@ -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'
|
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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -322,7 +322,7 @@
|
|||||||
:value="srcModel"
|
:value="srcModel"
|
||||||
type="text"
|
type="text"
|
||||||
class="input flex-1 text-xs"
|
class="input flex-1 text-xs"
|
||||||
:class="getPlatformInputBorder(section.platform)"
|
:class="getPlatformTextColor(section.platform)"
|
||||||
:placeholder="t('admin.channels.form.mappingSource', 'Source model')"
|
:placeholder="t('admin.channels.form.mappingSource', 'Source model')"
|
||||||
@change="renameMappingKey(sIdx, srcModel, ($event.target as HTMLInputElement).value)"
|
@change="renameMappingKey(sIdx, srcModel, ($event.target as HTMLInputElement).value)"
|
||||||
/>
|
/>
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
:value="section.model_mapping[srcModel]"
|
:value="section.model_mapping[srcModel]"
|
||||||
type="text"
|
type="text"
|
||||||
class="input flex-1 text-xs"
|
class="input flex-1 text-xs"
|
||||||
:class="getPlatformInputBorder(section.platform)"
|
:class="getPlatformTextColor(section.platform)"
|
||||||
:placeholder="t('admin.channels.form.mappingTarget', 'Target model')"
|
:placeholder="t('admin.channels.form.mappingTarget', 'Target model')"
|
||||||
@input="section.model_mapping[srcModel] = ($event.target as HTMLInputElement).value"
|
@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 ──
|
// ── Helpers ──
|
||||||
function formatDate(value: string): string {
|
function formatDate(value: string): string {
|
||||||
if (!value) return '-'
|
if (!value) return '-'
|
||||||
|
|||||||
Reference in New Issue
Block a user