Spaces:
Paused

assistant / ui /web /src /components /PyTorchInstallDialog.css
localailb's picture
Deploy Full LocalAiLab Application (FastAPI + Svelte + Agents)
bc9f3e6 verified
Raw History Blame Contribute Delete
4.73 kB
/* ==========================================================================
PyTorchInstallDialog — the "Detect & Install GPU PyTorch" popup. The
Settings tab's fix-env button opens this instead of silently installing
the recommended path: it shows the hardware detection report and every
build that can run on this PC (CPU / NVIDIA CUDA / Intel XPU / AMD ROCm)
with its reason, so the USER decides which PyTorch to install. Same
centered-card over a dimmed backdrop language as the app's other themed
dialogs (.firstrun-*, .lal-confirm-*, .llcpp-*, .llsrv-*, .wsrv-*) — rides
the app tokens, so it themes with light/dark automatically.
========================================================================== */
.ptch-overlay {
position: fixed;
inset: 0;
z-index: 10010;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
}
.ptch-box {
background: var(--bg-elev, #ffffff);
border: 1px solid var(--card-border, #e7e0d3);
border-left: 5px solid var(--primary-600, #d97757);
border-radius: var(--radius, 14px);
padding: 22px 24px;
max-width: 520px;
width: 100%;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
animation: ptch-pop 0.22s ease-out;
}
@keyframes ptch-pop {
from {
opacity: 0;
transform: scale(0.94);
}
to {
opacity: 1;
transform: scale(1);
}
}
.ptch-title {
font-family: var(--font-display, Georgia, "Times New Roman", serif);
font-size: 1.15rem;
font-weight: 700;
color: var(--text-strong, #000000);
margin-bottom: 12px;
}
/* The hardware detection report — what the app actually found on this PC
(GPU name, CPU name, driver CUDA version, compute capability, and the
torch device currently active). */
.ptch-detect {
color: var(--text-strong, #000000);
font-size: 0.85rem;
line-height: 1.6;
padding: 10px 12px;
background: var(--amber-bg, #fbf0dc);
border: 1px solid var(--amber-line, #eed9b0);
border-radius: var(--radius-sm, 8px);
margin-bottom: 12px;
}
.ptch-pick {
color: var(--text-strong, #000000);
font-size: 0.9rem;
font-weight: 600;
margin-bottom: 10px;
}
.ptch-opts {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 18px;
max-height: 260px;
overflow-y: auto;
}
.ptch-loading,
.ptch-err {
color: var(--text-dim, #4a4a4a);
padding: 8px 0 16px;
}
.ptch-err {
color: var(--danger, #b4453a);
}
.ptch-opt {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 9px 11px;
border: 1px solid var(--card-border, #e7e0d3);
border-radius: var(--radius-sm, 8px);
cursor: pointer;
transition: border-color 0.15s ease, background 0.15s ease;
}
.ptch-opt:hover {
border-color: var(--primary-600, #d97757);
}
.ptch-opt.sel {
border-color: var(--primary-600, #d97757);
background: color-mix(in srgb, var(--primary-600, #d97757) 8%, transparent);
}
.ptch-opt.unavail {
opacity: 0.55;
cursor: not-allowed;
}
.ptch-opt input[type="radio"] {
margin-top: 3px;
accent-color: var(--primary-600, #d97757);
}
.ptch-opt-main {
display: flex;
flex-direction: column;
gap: 3px;
}
.ptch-opt-label {
font-size: 0.9rem;
font-weight: 600;
color: var(--text-strong, #000000);
}
.ptch-rec {
margin-left: 6px;
font-size: 0.75rem;
font-weight: 700;
color: var(--primary-700, #b05a36);
}
.ptch-na {
margin-left: 6px;
font-size: 0.75rem;
font-weight: 600;
color: var(--text-dim, #4a4a4a);
}
.ptch-opt-reason {
font-size: 0.8rem;
line-height: 1.45;
color: var(--text-dim, #4a4a4a);
}
.ptch-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
}
.ptch-cancel {
border: 1px solid var(--card-border, #e7e0d3);
background: transparent;
color: var(--text-strong, #000000);
border-radius: 10px;
padding: 9px 18px;
font: inherit;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: filter 0.15s ease;
}
.ptch-cancel:hover {
filter: brightness(1.05);
}
.ptch-ok {
border: 1px solid var(--primary-600, #d97757);
background: var(--primary-600, #d97757);
color: #ffffff;
border-radius: 10px;
padding: 9px 18px;
font: inherit;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: filter 0.15s ease;
}
.ptch-ok:hover {
filter: brightness(1.05);
}
/* Draggable title bar */
.ptch-drag-handle {
cursor: grab;
user-select: none;
}
.ptch-drag-handle:active {
cursor: grabbing;
}
.ptch-box.dragging .ptch-drag-handle {
cursor: grabbing;
}