mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-18 16:06:47 +00:00
Move shared components and helpers to their actual owners, standardize component directory names, and use concise names for common utilities. Remove redundant wrappers, copied API models, and duplicate state. Separate API key editing from key usage, isolate settings drafts, reuse paged queries, and tie debounced queries and requests to their scopes. Validated with frontend lint, type checking and production build, local import checks, and 15 temporary behavioral regression groups. Co-authored-by: Codex <noreply@openai.com>
42 lines
1.1 KiB
Vue
42 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import type { UsageListRecord } from '@/api'
|
|
|
|
import { CornerDownRight } from '@lucide/vue'
|
|
|
|
import { computed } from 'vue'
|
|
import { usageModelDisplay } from './shared/presenter'
|
|
|
|
const props = defineProps<{
|
|
record: UsageListRecord
|
|
}>()
|
|
|
|
const modelDisplay = computed(() => usageModelDisplay(props.record))
|
|
</script>
|
|
|
|
<template>
|
|
<div class="inline-grid max-w-full gap-1">
|
|
<code
|
|
class="block max-w-full truncate font-mono text-cp-sm leading-none font-heavy text-cp-text"
|
|
:title="`请求模型:${modelDisplay.primary}`"
|
|
>
|
|
{{ modelDisplay.primary }}
|
|
</code>
|
|
<div
|
|
v-for="route in modelDisplay.routes"
|
|
:key="route.kind"
|
|
class="flex min-w-0 max-w-full items-center gap-1.25 text-cp-text-secondary"
|
|
:title="route.description"
|
|
>
|
|
<CornerDownRight
|
|
class="size-3.25 shrink-0"
|
|
:class="route.kind === 'returned' ? 'text-cp-orange-text' : 'text-cp-blue-text'"
|
|
stroke-width="2.4"
|
|
aria-hidden="true"
|
|
/>
|
|
<code class="block truncate font-mono text-cp-xs leading-none font-bold">
|
|
{{ route.model }}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
</template>
|