mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
ca8bd59df5
* perf(ui): lazy-load settings workspace styles Amp-Thread-ID: https://ampcode.com/threads/T-01a01277-59ee-703a-b04d-927a3ba733a1 * fix(ui): keep picker styles route scoped Amp-Thread-ID: https://ampcode.com/threads/T-01a01277-59ee-703a-b04d-927a3ba733a1 --------- Co-authored-by: Amp <amp@ampcode.com>
211 lines
5.0 KiB
CSS
211 lines
5.0 KiB
CSS
:root {
|
|
--settings-control-height: 32px;
|
|
}
|
|
|
|
/* Settings controls also appear outside the settings workspace: the login
|
|
gate, chat board controls, and the chat MCP form all use these primitives. */
|
|
|
|
/* Segmented keeps its 2px track inset; the buttons fill the inner height.
|
|
min-height (not height) so many-option enums can still wrap to two lines. */
|
|
.settings-segmented {
|
|
min-height: var(--settings-control-height);
|
|
box-sizing: border-box;
|
|
align-items: stretch;
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
gap: 2px;
|
|
max-width: 100%;
|
|
background: color-mix(in srgb, var(--bg) 80%, var(--bg-elevated) 20%);
|
|
border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
|
|
border-radius: var(--radius-md);
|
|
padding: 2px;
|
|
}
|
|
|
|
.settings-segmented > .settings-segmented__btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding-block: 0;
|
|
}
|
|
|
|
.settings-control__sr-label {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border: 0;
|
|
}
|
|
|
|
wa-radio-group.settings-segmented::part(form-control-label) {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
}
|
|
|
|
wa-radio-group.settings-segmented::part(radios) {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 2px;
|
|
}
|
|
|
|
.settings-segmented__btn {
|
|
font-size: var(--control-ui-text-sm);
|
|
font-weight: 550;
|
|
padding: 4px 12px;
|
|
border: none;
|
|
border-radius: calc(var(--radius-md) - 3px);
|
|
background: transparent;
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
cursor: var(--cursor-action);
|
|
transition:
|
|
color var(--duration-normal) var(--ease-out),
|
|
background var(--duration-normal) var(--ease-out),
|
|
box-shadow var(--duration-normal) var(--ease-out);
|
|
}
|
|
|
|
.settings-segmented__btn:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.settings-segmented__btn:focus-visible {
|
|
outline: none;
|
|
color: var(--text);
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
|
|
}
|
|
|
|
.settings-segmented__btn--active {
|
|
background: var(--bg-elevated);
|
|
color: var(--text-strong);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.settings-segmented__btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
input.settings-input,
|
|
select.settings-select:not([multiple]) {
|
|
height: var(--settings-control-height);
|
|
padding-block: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.settings-input,
|
|
.settings-select {
|
|
--control-ui-touch-input-size: var(--control-ui-input-text-size);
|
|
|
|
width: 100%;
|
|
min-width: 0;
|
|
font: inherit;
|
|
font-size: var(--control-ui-input-text-size);
|
|
}
|
|
|
|
/* Native controls own their box. Web Awesome selects are styled by their
|
|
component-owned stylesheet. */
|
|
.settings-input,
|
|
select.settings-select {
|
|
border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
|
|
border-radius: var(--radius-md);
|
|
background-color: color-mix(in srgb, var(--bg) 80%, var(--bg-elevated) 20%);
|
|
color: var(--text);
|
|
padding: 7px 10px;
|
|
transition: border-color var(--duration-fast) var(--ease-out);
|
|
}
|
|
|
|
select.settings-select:not([multiple]) {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
padding-right: 36px;
|
|
background-image: var(--select-chevron);
|
|
background-repeat: no-repeat;
|
|
background-position: right 10px center;
|
|
}
|
|
|
|
.settings-input::placeholder {
|
|
color: var(--muted);
|
|
}
|
|
|
|
.settings-input:focus-visible,
|
|
select.settings-select:focus-visible {
|
|
outline: none;
|
|
border-color: color-mix(in srgb, var(--accent) 55%, var(--border) 45%);
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
|
|
}
|
|
|
|
/* Secret inputs also appear in the startup login gate. Keep these selectors
|
|
unscoped so the gate's mobile sizing rules retain higher specificity. */
|
|
.settings-secret {
|
|
position: relative;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-width: 0;
|
|
}
|
|
|
|
.settings-secret > input,
|
|
.settings-secret > textarea {
|
|
width: 100%;
|
|
min-width: 0;
|
|
padding-right: 36px;
|
|
}
|
|
|
|
.settings-secret__toggle {
|
|
position: absolute;
|
|
right: 5px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 24px;
|
|
height: 24px;
|
|
padding: 0;
|
|
border: none;
|
|
border-radius: var(--radius-sm);
|
|
background: transparent;
|
|
color: var(--muted);
|
|
cursor: var(--cursor-action);
|
|
transition: color var(--duration-fast) var(--ease-out);
|
|
}
|
|
|
|
.settings-secret__toggle:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.settings-secret__toggle:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.settings-secret__toggle:focus-visible {
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
|
|
}
|
|
|
|
.settings-secret__toggle svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
fill: none;
|
|
stroke: currentColor;
|
|
stroke-width: 2px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
/* Quiet count badge used by settings pages and the Skill Workshop. */
|
|
.settings-count {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 1px 7px;
|
|
border-radius: var(--radius-full);
|
|
background: color-mix(in srgb, var(--bg-elevated) 80%, var(--border) 20%);
|
|
color: var(--muted);
|
|
font-size: var(--control-ui-text-xs);
|
|
font-weight: 600;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|