mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 08:06:19 +00:00
fix(frontend): refine semantic theme states
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -238,7 +238,7 @@ onBeforeUnmount(() => {
|
||||
<p
|
||||
v-if="description"
|
||||
:id="descriptionId"
|
||||
class="mt-2 mb-0 text-cp leading-[1.45] font-semibold text-cp-text-secondary"
|
||||
class="mt-1 mb-0 text-cp leading-[1.45] font-semibold text-cp-text-secondary"
|
||||
>
|
||||
{{ description }}
|
||||
</p>
|
||||
|
||||
@@ -342,14 +342,14 @@ onBeforeUnmount(() => {
|
||||
class="inline-flex h-4.5 min-w-0 cursor-pointer items-center gap-1 rounded-cp-sm border-0 px-1.5 font-mono text-[10px] leading-none font-bold transition-colors outline-none focus-visible:ring-2 focus-visible:ring-cp-control-outline focus-visible:ring-offset-2 focus-visible:ring-offset-cp-bg-container"
|
||||
:class="[
|
||||
hasUpdate
|
||||
? 'bg-cp-info-bg text-cp-info-text hover:bg-cp-info-bg-hover'
|
||||
? 'bg-cp-success-bg text-cp-success-text hover:bg-cp-success-bg-hover'
|
||||
: 'bg-cp-fill-quaternary text-cp-text-quaternary hover:bg-cp-fill-tertiary hover:text-cp-text-secondary',
|
||||
]"
|
||||
:title="updateButtonLabel"
|
||||
@click="openSystemUpdate"
|
||||
>
|
||||
<span>{{ versionLabel }}</span>
|
||||
<ArrowUpCircle v-if="hasUpdate" class="size-3 shrink-0 text-cp-info" />
|
||||
<ArrowUpCircle v-if="hasUpdate" class="size-3 shrink-0 text-cp-success" />
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
@@ -408,7 +408,7 @@ onBeforeUnmount(() => {
|
||||
<div class="flex items-center" :class="isCollapsed ? 'grid gap-1' : 'gap-1'">
|
||||
<BaseIconButton
|
||||
v-if="isCollapsed && hasUpdate"
|
||||
variant="primary"
|
||||
variant="success"
|
||||
size="md"
|
||||
:label="updateButtonLabel"
|
||||
@click="openSystemUpdate"
|
||||
|
||||
@@ -197,6 +197,10 @@ watch(
|
||||
size="lg"
|
||||
:dismissible="!updating && !restarting"
|
||||
>
|
||||
<template #icon>
|
||||
<ArrowUpCircle class="size-4.5 text-cp-success" />
|
||||
</template>
|
||||
|
||||
<div class="grid gap-3.5">
|
||||
<section class="grid gap-4 rounded-cp-card bg-cp-fill-quaternary px-4 py-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
|
||||
@@ -26,7 +26,7 @@ const toneClasses: Record<MetricTone, string> = {
|
||||
secondary: 'text-cp-text-secondary',
|
||||
success: 'text-cp-success-text',
|
||||
warning: 'text-cp-warning',
|
||||
active: 'text-cp-primary-text',
|
||||
active: 'text-cp-success',
|
||||
}
|
||||
|
||||
const metrics = computed<MetricItem[]>(() => {
|
||||
|
||||
@@ -147,7 +147,7 @@ export function modelSuccessRateTextClass(successRate: number | null) {
|
||||
if (successRate >= 99.5)
|
||||
return 'text-cp-success-text'
|
||||
if (successRate >= 98)
|
||||
return 'text-cp-info-text'
|
||||
return 'text-cp-cyan-text'
|
||||
if (successRate >= 95)
|
||||
return 'text-cp-warning-text'
|
||||
return 'text-cp-error-text'
|
||||
|
||||
@@ -113,7 +113,7 @@ const metricItems = outcomeMeta
|
||||
<div
|
||||
v-for="item in metricItems"
|
||||
:key="item.label"
|
||||
class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 rounded-cp bg-cp-fill-quaternary px-2.5 py-2.5"
|
||||
class="grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 rounded-cp bg-cp-fill-tertiary px-2.5 py-2.5"
|
||||
>
|
||||
<span class="size-1.5 rounded-full" :class="item.dotClass" />
|
||||
<span class="truncate text-[10px] leading-none font-emphasis text-cp-text-secondary">
|
||||
|
||||
@@ -108,7 +108,7 @@ const releaseStatus = computed(() => {
|
||||
return {
|
||||
label: '待检查',
|
||||
title: '尚未检查官方发布渠道',
|
||||
tone: 'bg-cp-info-bg text-cp-info-text',
|
||||
tone: 'bg-cp-cyan-bg text-cp-cyan-text-on-bg',
|
||||
icon: RefreshCw,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -45,7 +45,7 @@ const items = computed(() => [
|
||||
icon: Timer,
|
||||
value: averageLatencyDisplay(props.summary.averageLatencyMs),
|
||||
detail: '成功请求平均值',
|
||||
tone: 'bg-cp-primary-bg text-cp-primary-text',
|
||||
tone: 'bg-cp-cyan-bg text-cp-cyan-text-on-bg',
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user