Settings: clamp logo SVGs to 18px chip + endpoint dropdown gets logo

Provider SVGs in providers.js declare only viewBox (no width/height),
so when injected into the 18×18 logo chips they fell back to the
browser default of 300×150 and blew out the row.

- CSS: SVGs inside settings logo chips (`span[id$="-logo"]`,
  the 18px wrappers in fallback rows) now stretch to 100%/100% of
  their container.
- Added matching `-logo` chip next to the Endpoint dropdowns in
  Default Chat Model and Utility Model cards.
- New `_syncEndpointLogo` helper mirrors the selected endpoint
  option's text label through providerLogo() (the select value is
  a UUID and wouldn't match anything otherwise), and
  `_fillEndpointSelect` calls it on each render.
This commit is contained in:
pewdiepie-archdaemon
2026-06-13 23:00:16 +09:00
parent 8053d6a50a
commit bb66914b1e
3 changed files with 33 additions and 0 deletions
+11
View File
@@ -14379,6 +14379,17 @@ body:has(.doc-version-panel:not(.hidden)) .hamburger-btn {
flex-shrink: 0; color: var(--fg); opacity: 0.85;
}
.adm-provider-logo svg { width: 14px; height: 14px; }
/* Constrain logo SVGs in settings dropdown chips. Many provider
icons in providers.js declare only viewBox (no width/height),
so without this rule the browser falls back to 300x150 and
blows up the row. */
.settings-fallback-row > span[style*="width:18px"] svg:not([width]),
.settings-row > span[style*="width:18px"] svg:not([width]),
span[id$="-logo"] svg:not([width]) {
width: 100%;
height: 100%;
display: block;
}
.adm-provider-logo:empty {
background: color-mix(in srgb, var(--fg) 12%, transparent);
border-radius: 50%;