mirror of
https://github.com/openclaw/openclaw.git
synced 2026-11-18 15:36:31 +00:00
Share guarded window and RPC operations, native browser/widget placement, and identical presentation declarations while preserving public contracts and visual output. Remove 592 net production lines after a largest-first deep pass. Also preserve early Quick Chat visibility intent across renderer initialization, with regressions that fail the original startup race. Validate Cargo build/test/clippy on macOS and Linux, six native Linux scenarios, browser and style parity, focused and full subsystem tests, changed-file checks, cycles, and independent review.
321 lines
6.6 KiB
CSS
321 lines
6.6 KiB
CSS
/* Tauri embeds these faces from the Control UI's canonical font assets (SIL OFL). */
|
|
@font-face {
|
|
font-family: "Instrument Sans";
|
|
font-style: normal;
|
|
font-weight: 400 700;
|
|
font-display: swap;
|
|
src: url("instrument-sans-latin-ext.woff2") format("woff2");
|
|
unicode-range:
|
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
U+A720-A7FF;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "Instrument Sans";
|
|
font-style: normal;
|
|
font-weight: 400 700;
|
|
font-display: swap;
|
|
src: url("instrument-sans-latin.woff2") format("woff2");
|
|
unicode-range:
|
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
}
|
|
|
|
/* Shared local desktop palette, matching the web login gate without a Gateway dependency. */
|
|
:root {
|
|
color-scheme: light dark;
|
|
--bg: #0e1015;
|
|
--card: #161920;
|
|
--bg-elevated: #191c24;
|
|
--bg-hover: #1f2330;
|
|
--text: #bcbcc0;
|
|
--text-strong: #f4f4f5;
|
|
--muted: #8b8b94;
|
|
--border: #1e2028;
|
|
--border-strong: #2e3040;
|
|
--accent: #ff5c5c;
|
|
--primary: #d13c3c;
|
|
--primary-hover: #c22e2e;
|
|
--primary-foreground: #fff;
|
|
--danger: #ff6b6b;
|
|
--shadow-sm: 0 1px 2px rgb(0 0 0 / 25%);
|
|
--shadow-dialog: 0 8px 32px rgb(0 0 0 / 30%);
|
|
--input-shadow: inset 0 1px rgb(255 255 255 / 4%);
|
|
--dialog-backdrop: rgb(0 0 0 / 60%);
|
|
--font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
color: var(--text);
|
|
background: var(--bg);
|
|
font: 400 14px/1.55 var(--font-body);
|
|
font-synthesis: none;
|
|
text-rendering: optimizeLegibility;
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
:root {
|
|
--bg: #faf9f7;
|
|
--card: #ffffff;
|
|
--bg-elevated: #ffffff;
|
|
--bg-hover: #efebe4;
|
|
--text: #403c35;
|
|
--text-strong: #211e1a;
|
|
--muted: #6e6960;
|
|
--border: #e8e4dc;
|
|
--border-strong: #d6d0c5;
|
|
--accent: #bd4531;
|
|
--primary: #bd4531;
|
|
--primary-hover: #a83c29;
|
|
--danger: #b91c1c;
|
|
--shadow-sm: 0 1px 2px rgb(60 42 24 / 5%);
|
|
--shadow-dialog: 0 8px 32px rgb(60 42 24 / 16%);
|
|
--input-shadow: none;
|
|
--dialog-backdrop: rgb(33 30 26 / 30%);
|
|
}
|
|
}
|
|
|
|
/* Shared local companion controls; Quick Chat keeps its compact control layout. */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
[hidden] {
|
|
display: none !important;
|
|
}
|
|
|
|
body:where(.companion-page) {
|
|
min-width: 320px;
|
|
margin: 0;
|
|
}
|
|
|
|
.shell {
|
|
display: flex;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
padding: 24px;
|
|
}
|
|
|
|
.panel,
|
|
.gateways-panel {
|
|
width: min(560px, 100%);
|
|
margin-block: auto;
|
|
padding: 24px 32px 28px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
background: var(--card);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: var(--text-strong);
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
letter-spacing: -0.01em;
|
|
line-height: 1;
|
|
}
|
|
|
|
:where(.companion-page) h1 {
|
|
color: var(--text-strong);
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
letter-spacing: -0.02em;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
fill: none;
|
|
stroke: currentColor;
|
|
stroke-width: 1.5;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
:where(.companion-page) svg {
|
|
flex: none;
|
|
}
|
|
|
|
.remote-field input,
|
|
:where(.companion-page) select,
|
|
.field input,
|
|
.field select {
|
|
width: 100%;
|
|
min-width: 0;
|
|
height: var(--gateway-control-height, var(--control-height));
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border-strong);
|
|
border-radius: 10px;
|
|
color: var(--text-strong);
|
|
background: var(--card);
|
|
box-shadow: var(--input-shadow);
|
|
}
|
|
|
|
.remote-field label,
|
|
.controls > label,
|
|
.field label {
|
|
color: var(--muted);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.select-field,
|
|
.field-select,
|
|
.remote-credential,
|
|
.gateway-credential {
|
|
position: relative;
|
|
}
|
|
|
|
.select-field select,
|
|
.field-select select {
|
|
appearance: none;
|
|
padding-right: 34px;
|
|
}
|
|
|
|
.select-field::after,
|
|
.field-select::after {
|
|
position: absolute;
|
|
right: 15px;
|
|
bottom: calc(var(--gateway-control-height, var(--control-height)) / 2 - 3px);
|
|
width: 6px;
|
|
height: 6px;
|
|
border-right: 1.5px solid var(--muted);
|
|
border-bottom: 1.5px solid var(--muted);
|
|
content: "";
|
|
transform: rotate(45deg);
|
|
pointer-events: none;
|
|
}
|
|
|
|
input::placeholder {
|
|
color: var(--muted);
|
|
}
|
|
|
|
.remote-field input:focus-visible,
|
|
:where(.companion-page) select:focus-visible,
|
|
.field input:focus-visible,
|
|
.field select:focus-visible {
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
|
|
}
|
|
|
|
:where(.companion-page) button:focus-visible,
|
|
:where(.companion-page) summary:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 3px;
|
|
}
|
|
|
|
.remote-auth,
|
|
.gateway-auth {
|
|
display: grid;
|
|
grid-template-columns: 124px minmax(0, 1fr);
|
|
align-items: end;
|
|
gap: 12px;
|
|
}
|
|
|
|
.remote-credential input,
|
|
.gateway-credential input {
|
|
padding-right: 42px;
|
|
}
|
|
|
|
button.secret-toggle {
|
|
position: absolute;
|
|
right: 3px;
|
|
bottom: 3px;
|
|
width: 32px;
|
|
height: 32px;
|
|
min-height: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 7px;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.secret-toggle[aria-pressed="true"] .secret-hidden {
|
|
display: none;
|
|
}
|
|
|
|
button {
|
|
font: inherit;
|
|
cursor: default;
|
|
}
|
|
|
|
:where(.companion-page) button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
min-height: 36px;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border-strong);
|
|
border-radius: 10px;
|
|
color: var(--text);
|
|
background: var(--bg-elevated);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
:where(.companion-page) button:disabled,
|
|
:where(.companion-page) input:disabled,
|
|
:where(.companion-page) select:disabled {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
:where(.companion-page) button.primary {
|
|
padding: 10px 16px;
|
|
border-color: var(--accent);
|
|
color: var(--primary-foreground);
|
|
background: var(--primary);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.welcome-notice,
|
|
.hint,
|
|
.gateway-hint,
|
|
.gateway-status,
|
|
.gateway-footer,
|
|
.update-copy span,
|
|
.remote-feedback {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.gateway-copy {
|
|
display: grid;
|
|
gap: 3px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.gateway-endpoint,
|
|
.discovery-empty {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.panel,
|
|
.gateways-panel {
|
|
padding: 20px 20px 24px;
|
|
}
|
|
button.secret-toggle {
|
|
width: 38px;
|
|
height: 38px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 560px) {
|
|
.shell,
|
|
.gateways-shell {
|
|
padding: 16px;
|
|
}
|
|
.remote-auth,
|
|
.gateway-auth {
|
|
grid-template-columns: 110px minmax(0, 1fr);
|
|
gap: 8px;
|
|
}
|
|
}
|