mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
feat(web): redesign multi-models console
Overhauls the Models tab in the Web Console with a vendor-first layout and ships a runtime-accurate dispatcher view for vision and image generation.
This commit is contained in:
@@ -725,6 +725,58 @@
|
||||
background: rgba(74, 190, 110, 0.15);
|
||||
color: #74E9A4;
|
||||
}
|
||||
/* When an item carries a hint (e.g. brand alias next to a technical model
|
||||
id), label/hint are split into two spans so the hint sits on the right in
|
||||
a dim, smaller weight. Without a hint the row stays a plain text node and
|
||||
uses the default ellipsis behaviour, so no layout regressions for old call
|
||||
sites. */
|
||||
.cfg-dropdown-label {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.cfg-dropdown-hint {
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
padding-left: 12px;
|
||||
color: #94a3b8;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.dark .cfg-dropdown-hint {
|
||||
color: #64748b;
|
||||
}
|
||||
.cfg-dropdown-item.active .cfg-dropdown-hint {
|
||||
/* Tint the hint toward the brand colour on the active row so it doesn't
|
||||
fight with the highlighted label tone. */
|
||||
color: rgba(34, 133, 71, 0.65);
|
||||
}
|
||||
.dark .cfg-dropdown-item.active .cfg-dropdown-hint {
|
||||
color: rgba(116, 233, 164, 0.6);
|
||||
}
|
||||
/* The active row gets a trailing brand-green checkmark via a Font Awesome
|
||||
pseudo-element so every dropdown (chat / vision / image / asr / tts / etc.)
|
||||
surfaces "this is what's currently selected" without per-call JS plumbing.
|
||||
When a hint is present, the ✓ sits to its right with a small gap; without
|
||||
a hint, margin-left:auto pushes the ✓ flush against the right edge. */
|
||||
.cfg-dropdown-item.active::after {
|
||||
content: '\f00c'; /* FontAwesome check glyph */
|
||||
font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome';
|
||||
font-weight: 900;
|
||||
margin-left: auto;
|
||||
padding-left: 12px;
|
||||
color: #4abe6e;
|
||||
font-size: 11px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.cfg-dropdown-item.active:has(.cfg-dropdown-hint)::after {
|
||||
/* When hint occupies the auto-margin slot, the ✓ no longer benefits
|
||||
from `margin-left: auto`; replace it with a small fixed gap so the
|
||||
✓ trails the hint cleanly. */
|
||||
margin-left: 0;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* API Key masking via CSS (avoids browser password prompts) */
|
||||
.cfg-key-masked {
|
||||
@@ -732,6 +784,77 @@
|
||||
text-security: disc;
|
||||
}
|
||||
|
||||
/* Provider logo image — vendors flagged as `provider-logo-invert-dark`
|
||||
ship a black wordmark that disappears on the dark canvas; we invert their
|
||||
luminance only in dark mode so the brand stays recognizable without
|
||||
touching multi-color marks like Google/MiniMax. */
|
||||
.provider-logo-img {
|
||||
object-fit: contain;
|
||||
object-position: center;
|
||||
}
|
||||
.dark .provider-logo-invert-dark {
|
||||
filter: invert(1) brightness(1.15);
|
||||
}
|
||||
|
||||
/* Models page — provider dropdown rows.
|
||||
Configured rows look like ordinary picker entries; the .active row's
|
||||
trailing brand-green ✓ already announces "this is what's selected"
|
||||
(handled globally by .cfg-dropdown-item.active::after above).
|
||||
Unconfigured rows are visually subdued and carry a trailing gear icon
|
||||
as a "click to set up" affordance. */
|
||||
.cap-provider-label {
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.cap-provider-gear {
|
||||
margin-left: auto;
|
||||
padding-left: 12px;
|
||||
color: #94a3b8;
|
||||
font-size: 11px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.cap-provider-item.cap-provider-unconfigured {
|
||||
color: #94a3b8;
|
||||
}
|
||||
.dark .cap-provider-item.cap-provider-unconfigured {
|
||||
color: #64748b;
|
||||
}
|
||||
.cap-provider-item.cap-provider-unconfigured:hover {
|
||||
color: #475569;
|
||||
}
|
||||
.dark .cap-provider-item.cap-provider-unconfigured:hover {
|
||||
color: #cbd5e1;
|
||||
}
|
||||
.cap-provider-item.cap-provider-unconfigured:hover .cap-provider-gear {
|
||||
color: #475569;
|
||||
}
|
||||
.dark .cap-provider-item.cap-provider-unconfigured:hover .cap-provider-gear {
|
||||
color: #cbd5e1;
|
||||
}
|
||||
/* If the active row ever lands on an unconfigured vendor (defensive — the
|
||||
click handler normally diverts to the modal), suppress the global ✓ so
|
||||
the gear remains the sole trailing icon and the row keeps reading as
|
||||
"needs setup" rather than "already selected". */
|
||||
.cap-provider-item.cap-provider-unconfigured.active::after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* "Add vendor" modal picker — each configured row carries a static
|
||||
brand-green ✓ via decorateVendorModalPicker so users can see what's set
|
||||
up at a glance. The active row's global ✓ is suppressed here to avoid
|
||||
showing two checks side by side on configured + selected rows. */
|
||||
.vendor-picker-item.active::after {
|
||||
content: none;
|
||||
}
|
||||
.vendor-picker-configured-mark {
|
||||
margin-left: auto;
|
||||
padding-left: 12px;
|
||||
color: #4abe6e;
|
||||
font-size: 11px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Chat Input */
|
||||
#chat-input {
|
||||
resize: none; height: 42px; max-height: 180px;
|
||||
|
||||
Reference in New Issue
Block a user