Files
EasyCLIProxyAPI/src/styles/responsive-providers.css
T
lzt404 5a5eab96e2 fix(ui): improve responsive layouts and refine API access page
- Fix overflow, clipped controls, and toolbar overlap in narrow windows
- Improve responsive layouts across usage, OAuth, agents, settings, and dialogs
- Unify API category navigation and compact provider rows and actions
- Preserve inherited provider priorities instead of displaying zero
- Add responsive layout regression tests and dense provider fixtures
- Bump proxy core version from 8.0.6 to 8.0.10
2026-10-04 17:31:52 +08:00

436 lines
8.9 KiB
CSS

/* Keep API navigation above the list at every width. */
.api-access-page .real-provider-workbench {
grid-template-columns: minmax(0, 1fr);
gap: 16px;
}
.api-access-page .provider-category-panel {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 4px;
height: auto;
padding: 8px;
}
.api-access-page .provider-category-panel button {
grid-template-columns: 24px minmax(0, auto) auto;
justify-content: center;
gap: 8px;
height: 50px;
min-height: 50px;
padding: 8px;
border-radius: 8px;
}
.api-access-page .provider-category-panel button.active {
background: var(--ui-accent-soft);
border-color: color-mix(in srgb, var(--ui-accent) 20%, transparent);
color: var(--ui-accent);
}
.api-access-page .provider-category-panel .provider-logo {
width: 24px;
height: 24px;
}
.api-access-page .provider-category-panel span {
white-space: normal;
overflow-wrap: normal;
overflow: hidden;
text-overflow: clip;
}
.api-access-page .provider-category-panel strong {
justify-self: center;
min-width: 22px;
padding: 2px 5px;
border-radius: 6px;
background: var(--bg-secondary);
color: var(--text-quaternary);
font-size: 12px;
line-height: 18px;
text-align: center;
}
.api-access-page .provider-category-panel .active strong {
background: color-mix(in srgb, var(--ui-accent) 10%, var(--bg-primary));
color: var(--ui-accent);
}
.api-access-page .provider-resource-panel {
container: provider-resources / inline-size;
min-width: 0;
min-height: 0;
}
.api-access-page .management-panel-heading {
display: grid;
grid-template-columns: auto minmax(180px, 1fr) auto;
grid-template-areas: 'title search actions';
gap: 14px 24px;
align-items: center;
}
.api-access-page .management-panel-heading > div:first-child {
grid-area: title;
text-align: left;
}
.api-access-page .api-access-search {
grid-area: search;
width: 100%;
max-width: 440px;
justify-self: end;
}
.api-access-page .api-access-heading-tools {
grid-area: actions;
display: flex;
width: auto;
flex: none;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
.api-access-page .api-access-heading-tools > button {
flex: 0 0 auto;
width: auto;
}
.api-access-page .real-provider-list {
margin-top: 18px;
}
.api-access-page .real-provider-row {
grid-template-columns: 24px minmax(0, 1fr) auto;
align-items: center;
gap: 12px;
min-height: 104px;
padding: 16px 0;
}
.api-access-page .real-provider-row:last-child {
border-bottom: 0;
padding-bottom: 0;
}
.api-access-page .provider-drag-handle {
grid-column: 1;
grid-row: 1;
width: 24px;
min-width: 24px;
height: 32px;
padding: 0;
margin: 0;
align-self: start;
border-color: transparent;
background: transparent;
box-shadow: none;
}
.api-access-page .provider-row-main {
grid-column: 2;
grid-row: 1;
gap: 7px;
}
.api-access-page .provider-row-title {
align-items: baseline;
flex-wrap: wrap;
gap: 2px 10px;
}
.api-access-page .provider-row-title strong {
max-width: 100%;
font-size: 15px;
line-height: 22px;
text-overflow: ellipsis;
white-space: nowrap;
}
.api-access-page .provider-row-title > span:not(.state-pill) {
min-width: 0;
max-width: 100%;
overflow: hidden;
color: var(--text-quaternary);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.api-access-page .provider-row-title .state-pill {
min-height: 22px;
padding: 1px 7px;
font-size: 11px;
line-height: 18px;
}
.api-access-page .provider-row-main > .provider-row-url {
overflow: hidden;
font-size: 13px;
line-height: 20px;
text-overflow: ellipsis;
white-space: nowrap;
}
.api-access-page .provider-row-meta {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: center;
gap: 6px 12px;
padding: 0;
line-height: 20px;
}
.api-access-page .provider-row-meta code {
min-width: 0;
max-width: 100%;
overflow-wrap: anywhere;
color: var(--text-quaternary);
font-size: 12px;
}
.api-access-page .provider-row-meta span {
flex: none;
color: var(--text-quaternary);
font-size: 12px;
}
.api-access-page .provider-row-actions {
grid-column: 3;
grid-row: 1;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
max-width: 340px;
}
.api-access-page .provider-enabled-control {
min-width: 0;
}
.api-access-page .provider-row-actions .icon-button {
width: 32px;
height: 32px;
min-width: 32px;
}
/* Compact tabs keep every category visible instead of wrapping a lone tab. */
@container workspace (max-width: 820px) {
.api-access-page .provider-category-panel button {
grid-template-columns: 24px auto;
grid-template-rows: 24px auto;
gap: 4px 8px;
height: auto;
min-height: 68px;
}
.api-access-page .provider-category-panel span {
grid-column: 1 / -1;
grid-row: 2;
font-size: 12px;
text-align: center;
white-space: normal;
overflow-wrap: normal;
}
.api-access-page .provider-category-panel strong {
grid-column: 2;
grid-row: 1;
}
}
@container provider-resources (max-width: 720px) {
.api-access-page .management-panel-heading {
grid-template-columns: minmax(0, 1fr) auto;
grid-template-areas: 'title actions' 'search search';
column-gap: 12px;
}
.api-access-page .api-access-search {
max-width: none;
}
}
@container provider-resources (max-width: 580px) {
.api-access-page .real-provider-row {
grid-template-columns: 24px minmax(0, 1fr);
gap: 10px;
}
.api-access-page .provider-row-actions {
grid-column: 2;
grid-row: 2;
max-width: none;
justify-content: flex-start;
}
}
/* Keep controls compact while allowing complete groups to move to the next line. */
.auth-files-page .management-heading-actions {
min-width: 0;
max-width: 100%;
flex-wrap: wrap;
}
.auth-files-page .management-heading-actions button {
flex: 0 0 auto;
width: auto;
}
.auth-files-page .real-auth-files-panel {
container: credential-files / inline-size;
min-width: 0;
}
.auth-files-page .auth-files-toolbar select {
min-width: 0;
}
@container credential-files (max-width: 680px) {
.auth-files-page .auth-files-toolbar {
grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr);
gap: 0 9px;
}
.auth-files-page .auth-files-toolbar input {
grid-column: 2 / -1;
}
.auth-files-page .auth-files-toolbar select:first-of-type {
grid-column: 1 / 3;
}
.auth-files-page .auth-files-toolbar select:last-of-type {
grid-column: 3;
}
.auth-files-page .auth-files-toolbar select {
border-top: 1px solid var(--theme-e3e1db);
border-left: 0;
}
}
.oauth-login-page > .oauth-grid {
grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}
.oauth-browser-picker {
min-width: 0;
max-width: 100%;
flex-wrap: wrap;
}
.oauth-browser-picker select {
min-width: 0;
max-width: 100%;
flex: 0 1 240px;
}
.oauth-card .oauth-auth-url-actions,
.oauth-card .management-card-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.oauth-card .management-card-actions > button {
flex: 1 1 auto;
}
.oauth-card .oauth-callback-row {
grid-template-columns: minmax(0, 1fr) auto;
}
.oauth-card .oauth-callback-row > button {
width: auto;
white-space: nowrap;
}
.quota-group-heading {
flex-wrap: wrap;
}
.quota-group-heading .quota-group-actions {
flex: 1 1 280px;
}
.quota-group-actions .muted-summary {
width: auto;
}
.real-quota-row > div:first-child {
flex-wrap: wrap;
}
.real-quota-row small,
.quota-reset-credit-summary span {
min-width: 0;
white-space: normal;
overflow-wrap: anywhere;
}
/* Optional key selectors must not shift fixed dialog grid tracks onto the model list. */
.model-discovery-dialog.provider-health-dialog {
display: flex;
flex-direction: column;
height: min(660px, calc(100dvh - 48px));
min-height: 0;
overflow: auto;
}
.provider-health-dialog > :not(.provider-health-model-list) {
flex-shrink: 0;
}
.provider-health-dialog .provider-health-model-list {
flex: 1 1 180px;
min-height: 100px;
height: auto;
}
.provider-health-dialog .model-discovery-header > div {
flex-wrap: wrap;
}
.provider-health-dialog .model-discovery-header span {
white-space: normal;
overflow-wrap: anywhere;
}
.provider-health-dialog .provider-health-key-selector {
min-width: 0;
padding: 0;
}
.model-discovery-dialog .model-discovery-toolbar,
.model-discovery-dialog .model-discovery-actions,
.model-discovery-dialog .model-transfer-summary {
flex-wrap: wrap;
}
.model-discovery-dialog .model-discovery-toolbar > span {
white-space: normal;
}
.api-provider-dialog .provider-group-heading,
.api-provider-dialog .model-config-heading,
.api-provider-dialog .thinking-level-heading {
flex-wrap: wrap;
}
@container workspace (max-width: 760px) {
.oauth-browser-picker {
justify-content: flex-start;
}
.auth-files-page .management-heading-actions,
.quota-group-heading .quota-group-actions {
justify-content: flex-start;
}
}