J.A.R.V.I.S-rust/frontend/src/css/styles.scss

107 lines
2.1 KiB
SCSS
Raw Normal View History

2026-01-04 22:50:34 +05:00
// ### BASE STYLES
html,
body {
margin: 0;
padding: 0;
min-height: 100vh;
min-width: 100vw;
background-color: #4c5062;
color: white;
// assistant page background
&.assist-page {
background: radial-gradient(
circle,
rgba(24, 123, 123, 0.49) 0%,
rgba(13, 15, 19, 1) 64%
);
&.assist-active {
background: radial-gradient(
circle,
rgba(24, 81, 123, 0.64) 0%,
rgba(13, 15, 19, 1) 64%
);
}
}
}
:root {
2026-01-04 22:50:34 +05:00
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;
color: #0f0f0f;
background-color: #f6f6f6;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
a {
2026-01-04 22:50:34 +05:00
color: #2a9cd0;
text-decoration: none;
font-weight: bold;
&:hover {
color: #1dabed;
text-decoration: underline;
}
}
2026-01-04 22:50:34 +05:00
// ### LAYOUT OVERRIDES
#wrapper {
2026-01-04 22:50:34 +05:00
padding: 0;
margin: 0;
}
2026-01-04 22:50:34 +05:00
#header,
main {
padding: 0 30px;
fix: TTS hot-swap actually works + GUI max-width + Python builder discoverable ROOT CAUSE ANALYSIS User reported: (a) TTS dropdown doesn't apply, (b) GUI feels stretched, (c) no link to command builder, (d) Python doesn't even start. Issues (a), (b), (c) addressed here. (d) addressed in python repo. === Fix A: TTS hot-swap (was completely broken) === Two distinct bugs: 1. `tts::init_backend()` only read JARVIS_TTS env var, NEVER consulted `Settings.tts_backend` in the DB. So saving "Silero" in the GUI dropdown changed nothing — not even on restart. 2. `BACKEND: OnceCell<...>` couldn't be replaced at runtime, so even if init had picked the right backend, the dropdown was useless mid-session. Fixed: - `tts::BACKEND` is now `Lazy<RwLock<Option<Arc<dyn TtsBackend>>>>`. - `choose_backend_name()` resolves from DB → env → auto-detect. - New `swap_to(name)` replaces the live backend atomically. - IPC: new `IpcAction::SwitchTts { backend }`. jarvis-app reacts to it the same way it reacts to SwitchLlm. - GUI's `set_tts_backend` now persists + hot-swaps GUI's TTS + Svelte page also fires `switchDaemonTts()` over WS so the running daemon installs the new backend. - Removed "Применится при следующем запуске" hint — now applies immediately. RU + EN locale strings updated. === Fix B: GUI max-width === main + #header had no max-width, so on a 1920px monitor the labels sprawled across 1860px of space, which felt stretched. Added max-width: 1280px + margin: 0 auto + box-sizing: border-box. Smaller windows are unaffected. Also added the same cap on .app-container.assist-page so the home screen arc reactor centres properly. === Fix C: Command builder discoverable === The Python fork ships a separate yaml-editing tool at `python/tools/command_builder/` (pywebview GUI). No way to find it from the main Rust GUI. Fixed: - New tauri command `open_command_builder` (crates/jarvis-gui/src/ tauri_commands/builder.rs). Locates the Python fork via $JARVIS_PYTHON_DIR → sibling python/ → C:\Jarvis\python, prefers the project's .venv, spawns `python -m tools.command_builder`. - New blue "Конструктор команд (Python)" button on /settings page near the Save / Back buttons. Tests: 140 rust + 104 python all pass. Release builds of jarvis-app and jarvis-gui both green.
2026-05-24 22:12:04 +03:00
// Cap content width on wide monitors so long labels don't stretch
// across 1900px+ screens. On smaller windows this is a no-op.
max-width: 1280px;
margin: 0 auto;
box-sizing: border-box;
}
// The home page's arc reactor + status bar can keep their own internal
// max-width while the page itself can still go full width — the page
// layout below `main` already handles its own centering via flex.
.app-container.assist-page {
width: 100%;
max-width: 1280px;
margin: 0 auto;
}
2026-01-04 22:50:34 +05:00
// ### FORM OVERRIDES
select,
input {
color: #ccc !important;
}
.form {
2026-01-04 22:50:34 +05:00
label {
font-weight: bold !important;
color: #8ac832 !important;
font-size: 15px !important;
border-bottom: 1px dotted gray;
margin-bottom: 10px !important;
& + div {
line-height: 1.2em;
}
}
2026-01-04 22:50:34 +05:00
.svelteui-Tab-label {
font-size: 18px !important;
}
}