Initialize repo
This commit is contained in:
+1075
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,213 @@
|
||||
<!doctype html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Tłumacz napisów SRT</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='7' fill='%234f46e5'/><rect x='6' y='18' width='20' height='3' rx='1.5' fill='white'/><rect x='9' y='23' width='14' height='3' rx='1.5' fill='white'/></svg>">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<div class="brand"><span class="logo"></span>Tłumacz napisów <b>SRT</b></div>
|
||||
<div class="engine-pill" id="enginePill"><span class="dot"></span><span id="enginePillText">niepołączony</span></div>
|
||||
</header>
|
||||
|
||||
<main class="layout">
|
||||
<!-- ===================== LEFT: configuration ===================== -->
|
||||
<aside class="side">
|
||||
<section class="card" id="engineCard">
|
||||
<h2>1. Silnik</h2>
|
||||
<div class="seg" id="engineSeg">
|
||||
<button data-kind="ollama">Ollama</button>
|
||||
<button data-kind="lmstudio">LM Studio</button>
|
||||
<button data-kind="openai">OpenAI-compat.</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input id="baseUrl" type="text" spellcheck="false" placeholder="http://127.0.0.1:11434">
|
||||
<button id="connectBtn" class="btn">Połącz</button>
|
||||
</div>
|
||||
<div class="only-openai">
|
||||
<label class="field"><span>Klucz API (opcjonalnie)</span><input id="apiKey" type="password" autocomplete="off"></label>
|
||||
<label class="check"><input id="structuredOutput" type="checkbox" checked> Wymuszaj JSON (response_format json_schema)</label>
|
||||
<label class="field"><span>Dodatkowe pola żądania (JSON)</span><textarea id="extraBody" rows="2" spellcheck="false" placeholder='{"chat_template_kwargs": {"enable_thinking": false}}'></textarea></label>
|
||||
</div>
|
||||
<p class="hint" id="engineHint"></p>
|
||||
</section>
|
||||
|
||||
<section class="card" id="modelCard">
|
||||
<h2>2. Model</h2>
|
||||
<div class="row">
|
||||
<select id="modelSelect" disabled><option>— najpierw połącz —</option></select>
|
||||
<button id="refreshModels" class="btn icon" title="Odśwież listę">↻</button>
|
||||
</div>
|
||||
<div id="modelDetails" class="model-details"></div>
|
||||
<label class="field"><span>Profil promptu</span>
|
||||
<select id="profile"></select>
|
||||
</label>
|
||||
<p class="hint" id="profileNote"></p>
|
||||
<details class="pull not-openai" id="pullBox">
|
||||
<summary>Pobierz nowy model</summary>
|
||||
<div class="pull-body">
|
||||
<div class="row">
|
||||
<input id="pullName" type="text" spellcheck="false" autocomplete="off">
|
||||
<button id="pullBtn" class="btn">Pobierz</button>
|
||||
</div>
|
||||
<label class="field only-lmstudio"><span>Kwantyzacja <span class="muted">(tylko dla linków Hugging Face)</span></span><input id="pullQuant" type="text" spellcheck="false" placeholder="np. Q4_K_M"></label>
|
||||
<div class="chips" id="pullChips"></div>
|
||||
<p class="hint" id="pullHint"></p>
|
||||
<div class="pull-list" id="pullList"></div>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<section class="card" id="memCard">
|
||||
<h2>3. Kontekst i pamięć</h2>
|
||||
<label class="field"><span>Długość kontekstu <b id="ctxLabel"></b></span>
|
||||
<div class="row">
|
||||
<input id="ctxRange" type="range" min="0" max="10" step="1">
|
||||
<input id="contextLength" type="number" min="512" step="256" class="num">
|
||||
</div>
|
||||
</label>
|
||||
<div class="grid2">
|
||||
<label class="field"><span>KV-cache K</span><select id="kvCacheK"></select></label>
|
||||
<label class="field"><span>KV-cache V</span><select id="kvCacheV"></select></label>
|
||||
</div>
|
||||
<label class="check"><input id="flashAttention" type="checkbox" checked> Flash Attention <span class="muted only-server">(ustawienie serwera)</span></label>
|
||||
<div class="grid2">
|
||||
<label class="field only-lmstudio"><span>Offload na GPU</span>
|
||||
<select id="gpuRatio"><option value="">auto</option><option value="1">max (100%)</option><option value="0.75">75%</option><option value="0.5">50%</option><option value="0.25">25%</option><option value="0">wyłączony (CPU)</option></select></label>
|
||||
<label class="field only-ollama"><span>Warstwy na GPU (num_gpu)</span><input id="numGpu" type="number" min="-1" placeholder="auto"></label>
|
||||
<label class="field not-openai"><span>Batch ewaluacji</span><input id="evalBatchSize" type="number" min="32" step="32" placeholder="auto"></label>
|
||||
</div>
|
||||
<label class="check only-lmstudio"><input id="unloadOthers" type="checkbox" checked> Przy ładowaniu zwolnij inne modele (więcej wolnej pamięci)</label>
|
||||
<p class="hint only-server" id="kvServerHint"></p>
|
||||
|
||||
<div class="vram" id="vram">
|
||||
<div class="vram-head"><span>Szacowane użycie pamięci</span><b id="vramTotal">—</b></div>
|
||||
<div class="vram-bar"><div class="seg-w"></div><div class="seg-kv"></div><div class="seg-c"></div><div class="limit"></div></div>
|
||||
<div class="vram-legend">
|
||||
<span><i class="sw w"></i>wagi <b id="vW">—</b></span>
|
||||
<span><i class="sw kv"></i>KV-cache <b id="vKV">—</b></span>
|
||||
<span><i class="sw c"></i>bufory <b id="vC">—</b></span>
|
||||
</div>
|
||||
<div class="vram-lines" id="vramLines"></div>
|
||||
</div>
|
||||
|
||||
<div class="row load-row not-openai">
|
||||
<button id="loadBtn" class="btn">Załaduj model</button>
|
||||
<button id="unloadBtn" class="btn ghost">Zwolnij</button>
|
||||
</div>
|
||||
<div id="loadedInfo" class="hint"></div>
|
||||
</section>
|
||||
|
||||
<section class="card" id="genCard">
|
||||
<h2>4. Generowanie</h2>
|
||||
<div class="grid3">
|
||||
<label class="field"><span>Temperatura</span><input id="temperature" type="number" step="0.05" min="0" max="2" value="0.3"></label>
|
||||
<label class="field"><span>top_p</span><input id="topP" type="number" step="0.05" min="0" max="1" placeholder="—"></label>
|
||||
<label class="field"><span>top_k</span><input id="topK" type="number" step="1" min="0" placeholder="—"></label>
|
||||
<label class="field"><span>min_p</span><input id="minP" type="number" step="0.01" min="0" max="1" placeholder="—"></label>
|
||||
<label class="field"><span>Kara za powt.</span><input id="repeatPenalty" type="number" step="0.01" min="0.8" max="2" placeholder="—"></label>
|
||||
<label class="field"><span>Seed</span><input id="seed" type="number" placeholder="—"></label>
|
||||
</div>
|
||||
<label class="check"><input id="disableThinking" type="checkbox" checked> Wyłącz „myślenie” (reasoning) — szybciej, a do tłumaczenia zwykle zbędne</label>
|
||||
<button id="applyRecommended" class="btn ghost small" hidden>Zastosuj parametry zalecane dla modelu</button>
|
||||
</section>
|
||||
|
||||
<section class="card" id="trCard">
|
||||
<h2>5. Tłumaczenie</h2>
|
||||
<div class="grid2">
|
||||
<label class="field"><span>Z języka</span><select id="source"></select></label>
|
||||
<label class="field"><span>Na język</span><select id="target"></select></label>
|
||||
</div>
|
||||
<div class="grid2">
|
||||
<label class="field"><span>Tryb</span>
|
||||
<select id="mode">
|
||||
<option value="auto">auto</option>
|
||||
<option value="json">partie · JSON (zalecany)</option>
|
||||
<option value="lines">partie · numerowane linie</option>
|
||||
<option value="single">po jednej linii</option>
|
||||
</select></label>
|
||||
<label class="field"><span>Linii w partii</span><input id="batchSize" type="number" min="1" max="200" value="25"></label>
|
||||
<label class="field"><span>Kontekst przed</span><input id="contextBefore" type="number" min="0" max="50" value="6"></label>
|
||||
<label class="field"><span>Kontekst po</span><input id="contextAfter" type="number" min="0" max="20" value="3"></label>
|
||||
<label class="field"><span>Maks. znaków w linii</span><input id="maxLineLength" type="number" min="0" max="120" value="42" title="0 = nie zawijaj"></label>
|
||||
<label class="field"><span>Równoległość</span><input id="concurrency" type="number" min="1" max="8" value="1" title="Liczba jednoczesnych zapytań"></label>
|
||||
</div>
|
||||
<label class="field"><span>Piosenki (linie z ♪) <span class="muted" id="songCount"></span></span>
|
||||
<select id="songs">
|
||||
<option value="translate">tłumacz jak resztę</option>
|
||||
<option value="keep">zostaw w oryginale</option>
|
||||
<option value="remove">usuń z napisów</option>
|
||||
</select></label>
|
||||
<label class="field"><span>Uwagi dla tłumacza <span class="muted">(kontekst, imiona, płeć postaci, ton, słowniczek)</span></span>
|
||||
<textarea id="notes" rows="3" placeholder="Np. Serial kryminalny. Morgan — mężczyzna, Sarah — kobieta. Zwracają się do siebie na „ty”. „Precinct” = „komisariat”."></textarea></label>
|
||||
</section>
|
||||
</aside>
|
||||
|
||||
<!-- ===================== RIGHT: file + results ===================== -->
|
||||
<section class="content">
|
||||
<div id="drop" class="drop">
|
||||
<input id="fileInput" type="file" accept=".srt,text/plain" hidden>
|
||||
<div class="drop-inner">
|
||||
<div class="drop-icon"></div>
|
||||
<p><b>Upuść plik .srt</b> albo <button class="linkbtn" id="pickFile">wybierz z dysku</button></p>
|
||||
<p class="muted">Kodowanie wykrywane automatycznie (UTF-8, Windows-1250, …). Znaczniki czasu nie są wysyłane do modelu.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fileBar" class="filebar" hidden>
|
||||
<div class="fileinfo">
|
||||
<b id="fileName"></b>
|
||||
<span id="fileStats" class="muted"></span>
|
||||
<label class="inline">kodowanie
|
||||
<select id="encoding">
|
||||
<option value="auto">auto</option><option value="utf-8">UTF-8</option><option value="windows-1250">Windows-1250</option>
|
||||
<option value="windows-1252">Windows-1252</option><option value="iso-8859-2">ISO-8859-2</option><option value="windows-1251">Windows-1251</option>
|
||||
</select></label>
|
||||
<button class="linkbtn" id="changeFile">zmień plik</button>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button id="startBtn" class="btn primary">Tłumacz</button>
|
||||
<button id="resumeBtn" class="btn" hidden>Dokończ brakujące</button>
|
||||
<button id="stopBtn" class="btn danger" hidden>Zatrzymaj</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="progressBox" class="progress" hidden>
|
||||
<div class="bar"><div id="progressFill"></div></div>
|
||||
<div class="pstats" id="progressStats"></div>
|
||||
</div>
|
||||
|
||||
<div id="tableTools" class="tabletools" hidden>
|
||||
<div class="filters">
|
||||
<label class="check"><input type="checkbox" id="onlyFlagged"> tylko oznaczone <span id="flagCount" class="badge warn"></span></label>
|
||||
<input id="search" type="search" placeholder="Szukaj…">
|
||||
</div>
|
||||
<div class="export">
|
||||
<select id="exportFormat"><option value="translated">tylko tłumaczenie</option><option value="bilingual">dwujęzyczne</option></select>
|
||||
<select id="exportEol"><option value="orig">końce linii jak w oryginale</option><option value="lf">LF</option><option value="crlf">CRLF (Windows)</option></select>
|
||||
<label class="check"><input type="checkbox" id="exportBom"> BOM</label>
|
||||
<button id="downloadBtn" class="btn primary">Pobierz SRT</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tableWrap" class="tablewrap" hidden>
|
||||
<table class="cues">
|
||||
<thead><tr><th class="c-id">#</th><th class="c-time">czas</th><th>oryginał</th><th>tłumaczenie <span class="muted">(kliknij, by edytować)</span></th><th class="c-act"></th></tr></thead>
|
||||
<tbody id="cueBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<details class="logbox" id="logBox" hidden>
|
||||
<summary>Dziennik <span id="logCount" class="muted"></span></summary>
|
||||
<div id="log"></div>
|
||||
</details>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<div id="toast" class="toast" hidden></div>
|
||||
<script type="module" src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,245 @@
|
||||
:root {
|
||||
--bg: #f5f6f8;
|
||||
--panel: #ffffff;
|
||||
--text: #1c1f26;
|
||||
--muted: #6b7280;
|
||||
--line: #e4e7ec;
|
||||
--line-strong: #d0d5dd;
|
||||
--accent: #4f46e5;
|
||||
--accent-soft: #eef0ff;
|
||||
--accent-text: #ffffff;
|
||||
--ok: #12a150;
|
||||
--warn: #c27c0e;
|
||||
--warn-soft: #fff6e5;
|
||||
--err: #d92d20;
|
||||
--err-soft: #fdecea;
|
||||
--w: #6366f1;
|
||||
--kv: #f59e0b;
|
||||
--c: #94a3b8;
|
||||
--row-hover: #fafbfc;
|
||||
--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
|
||||
--radius: 10px;
|
||||
--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
color-scheme: light;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #0f1115;
|
||||
--panel: #171a21;
|
||||
--text: #e6e8ec;
|
||||
--muted: #8b93a1;
|
||||
--line: #262b35;
|
||||
--line-strong: #343a46;
|
||||
--accent: #818cf8;
|
||||
--accent-soft: #1f2240;
|
||||
--accent-text: #0f1115;
|
||||
--ok: #3ccf7f;
|
||||
--warn: #f0b33c;
|
||||
--warn-soft: #2b2312;
|
||||
--err: #ff6b5e;
|
||||
--err-soft: #2e1714;
|
||||
--w: #818cf8;
|
||||
--kv: #fbbf24;
|
||||
--c: #64748b;
|
||||
--row-hover: #1b1f27;
|
||||
--shadow: none;
|
||||
color-scheme: dark;
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html, body { margin: 0; }
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
button, input, select, textarea { font: inherit; color: inherit; }
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
.topbar {
|
||||
position: sticky; top: 0; z-index: 10;
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
|
||||
.logo { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; }
|
||||
.logo::before, .logo::after { content: ""; position: absolute; left: 4px; right: 4px; height: 3px; border-radius: 2px; background: var(--accent-text); }
|
||||
.logo::before { bottom: 8px; } .logo::after { bottom: 4px; left: 6px; right: 6px; }
|
||||
.engine-pill { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
|
||||
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
|
||||
.engine-pill.ok .dot { background: var(--ok); }
|
||||
.engine-pill.err .dot { background: var(--err); }
|
||||
|
||||
.layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; padding: 16px 20px 40px; align-items: start; }
|
||||
.side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
|
||||
.content { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
|
||||
|
||||
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
|
||||
.card h2 { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
|
||||
|
||||
.row { display: flex; gap: 8px; align-items: center; }
|
||||
.row > input[type=text], .row > select { flex: 1; min-width: 0; }
|
||||
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
||||
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
|
||||
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
|
||||
.field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.field b { color: var(--text); font-weight: 600; }
|
||||
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
|
||||
.check input { margin: 2px 0 0; accent-color: var(--accent); }
|
||||
.muted { color: var(--muted); }
|
||||
.hint { margin: 0; font-size: 12px; color: var(--muted); }
|
||||
.hint:empty { display: none; }
|
||||
.hint code, .model-details code { font-family: var(--mono); font-size: 11.5px; background: var(--bg); padding: 1px 4px; border-radius: 4px; word-break: break-all; }
|
||||
|
||||
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
|
||||
width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); outline: none; min-width: 0;
|
||||
}
|
||||
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
|
||||
textarea { resize: vertical; }
|
||||
.num { width: 96px !important; flex: none; }
|
||||
input[type=range] { flex: 1; accent-color: var(--accent); }
|
||||
|
||||
.btn { padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer; white-space: nowrap; font-weight: 500; }
|
||||
.btn:hover:not(:disabled) { border-color: var(--accent); }
|
||||
.btn:disabled { opacity: .5; cursor: default; }
|
||||
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
|
||||
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
|
||||
.btn.danger { color: var(--err); border-color: var(--err); }
|
||||
.btn.ghost { background: transparent; }
|
||||
.btn.small { padding: 4px 10px; font-size: 12px; align-self: flex-start; }
|
||||
.btn.icon { padding: 7px 10px; }
|
||||
.btn.busy { position: relative; color: transparent !important; }
|
||||
.btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.linkbtn { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
|
||||
|
||||
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
|
||||
.seg button { border: none; background: transparent; padding: 7px 4px; cursor: pointer; font-size: 13px; }
|
||||
.seg button + button { border-left: 1px solid var(--line-strong); }
|
||||
.seg button.active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
|
||||
|
||||
body[data-engine=ollama] .only-lmstudio, body[data-engine=ollama] .only-openai,
|
||||
body[data-engine=lmstudio] .only-ollama, body[data-engine=lmstudio] .only-openai, body[data-engine=lmstudio] .only-server,
|
||||
body[data-engine=openai] .only-lmstudio, body[data-engine=openai] .only-ollama, body[data-engine=openai] .not-openai { display: none !important; }
|
||||
|
||||
.model-details { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
|
||||
.model-details:empty { display: none; }
|
||||
.badge { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
|
||||
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
|
||||
.badge.warn { background: var(--warn-soft); color: var(--warn); }
|
||||
.badge.err { background: var(--err-soft); color: var(--err); }
|
||||
.badge:empty { display: none; }
|
||||
|
||||
.vram { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
|
||||
.vram-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
|
||||
.vram-head b { color: var(--text); font-size: 13px; }
|
||||
.vram-bar { position: relative; height: 12px; border-radius: 6px; background: var(--line); display: flex; overflow: visible; }
|
||||
.vram-bar > div[class^=seg] { height: 100%; transition: width .25s; }
|
||||
.vram-bar .seg-w { background: var(--w); border-radius: 6px 0 0 6px; }
|
||||
.vram-bar .seg-kv { background: var(--kv); }
|
||||
.vram-bar .seg-c { background: var(--c); border-radius: 0 6px 6px 0; }
|
||||
.vram-bar .limit { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--err); border-radius: 1px; display: none; }
|
||||
.vram.over .vram-head b { color: var(--err); }
|
||||
.vram-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
|
||||
.vram-legend b { color: var(--text); font-weight: 600; }
|
||||
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
|
||||
.sw.w { background: var(--w); } .sw.kv { background: var(--kv); } .sw.c { background: var(--c); }
|
||||
.vram-lines { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
|
||||
.vram-lines b { color: var(--text); }
|
||||
.vram-lines .over { color: var(--err); font-weight: 600; }
|
||||
|
||||
.drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--panel); padding: 48px 20px; text-align: center; transition: border-color .15s, background .15s; cursor: pointer; }
|
||||
.drop.drag { border-color: var(--accent); background: var(--accent-soft); }
|
||||
.drop p { margin: 6px 0; }
|
||||
.drop-icon { width: 44px; height: 52px; margin: 0 auto 10px; border-radius: 6px; border: 2px solid var(--muted); position: relative; opacity: .7; }
|
||||
.drop-icon::before, .drop-icon::after { content: ""; position: absolute; left: 8px; right: 8px; height: 3px; border-radius: 2px; background: var(--muted); }
|
||||
.drop-icon::before { bottom: 16px; } .drop-icon::after { bottom: 9px; right: 14px; }
|
||||
|
||||
.filebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
|
||||
.fileinfo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
|
||||
.fileinfo b { word-break: break-all; }
|
||||
.inline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
|
||||
.inline select { width: auto; padding: 3px 6px; }
|
||||
.actions { display: flex; gap: 8px; }
|
||||
|
||||
.progress { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
|
||||
.progress .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
|
||||
#progressFill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
|
||||
.progress.done #progressFill { background: var(--ok); }
|
||||
.progress.error #progressFill { background: var(--err); }
|
||||
.pstats { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); }
|
||||
.pstats b { color: var(--text); }
|
||||
|
||||
.tabletools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
|
||||
.filters, .export { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
|
||||
.filters input[type=search] { width: 200px; }
|
||||
.export select { width: auto; }
|
||||
|
||||
.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); max-height: calc(100vh - 250px); }
|
||||
table.cues { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
||||
.cues thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
|
||||
.cues td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: pre-wrap; word-wrap: break-word; }
|
||||
.cues tr:hover td { background: var(--row-hover); }
|
||||
.c-id { width: 52px; } .c-time { width: 104px; } .c-act { width: 40px; }
|
||||
td.id { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
|
||||
td.time { color: var(--muted); font-family: var(--mono); font-size: 11px; line-height: 1.5; }
|
||||
td.tr { outline: none; border-left: 2px solid transparent; }
|
||||
td.tr:focus { background: var(--accent-soft); border-left-color: var(--accent); }
|
||||
td.tr.pending { color: var(--muted); font-style: italic; }
|
||||
td.tr.edited { border-left-color: var(--ok); }
|
||||
tr.active td { background: var(--accent-soft); }
|
||||
tr.flagged td.tr { background: var(--warn-soft); }
|
||||
tr.removed td.src, tr.removed td.tr { text-decoration: line-through; opacity: .5; }
|
||||
.badge.song { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
|
||||
tr.err td.tr { background: var(--err-soft); }
|
||||
.flags { display: block; margin-top: 4px; }
|
||||
.flags .badge { margin-right: 4px; font-weight: 500; }
|
||||
.rowbtn { border: none; background: none; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 5px; font-size: 15px; }
|
||||
.rowbtn:hover { color: var(--accent); background: var(--accent-soft); }
|
||||
.rowbtn.busy { animation: spin 1s linear infinite; }
|
||||
|
||||
.logbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; }
|
||||
.logbox summary { cursor: pointer; font-size: 13px; font-weight: 500; }
|
||||
#log { font-family: var(--mono); font-size: 11.5px; max-height: 240px; overflow: auto; margin-top: 8px; }
|
||||
#log div { padding: 1px 0; }
|
||||
#log .warn { color: var(--warn); }
|
||||
#log .error { color: var(--err); }
|
||||
|
||||
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 100; max-width: min(640px, 90vw); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
|
||||
.toast.err { background: var(--err); color: #fff; }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.layout { grid-template-columns: 1fr; padding: 12px; }
|
||||
.side { position: static; max-height: none; overflow: visible; }
|
||||
.c-time { width: 0; } td.time, th.c-time { display: none; }
|
||||
.tablewrap { max-height: none; }
|
||||
}
|
||||
|
||||
/* model downloads */
|
||||
.pull { border-top: 1px solid var(--line); padding-top: 8px; }
|
||||
.pull summary { cursor: pointer; font-size: 13px; font-weight: 500; }
|
||||
.pull-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
|
||||
.pull-body .row > input { flex: 1; min-width: 0; }
|
||||
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.chip { border: 1px solid var(--line-strong); background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
|
||||
.chip:hover:not(:disabled) { border-color: var(--accent); }
|
||||
.chip:disabled { opacity: .55; cursor: default; }
|
||||
.chip.warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
|
||||
.pull-list { display: flex; flex-direction: column; gap: 8px; }
|
||||
.pull-list:empty { display: none; }
|
||||
.pull-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
|
||||
.pull-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
|
||||
.pull-name { font-size: 12px; word-break: break-all; }
|
||||
.pull-item .bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
|
||||
.pull-item .bar > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
|
||||
.pull-item.done .bar > div { background: var(--ok); }
|
||||
.pull-item.error .bar > div { background: var(--err); width: 100% !important; }
|
||||
.pull-item.cancelled .bar > div { background: var(--muted); }
|
||||
.pull-item.indeterminate .bar > div { width: 30% !important; animation: slide 1.2s ease-in-out infinite; }
|
||||
@keyframes slide { from { margin-left: -30%; } to { margin-left: 100%; } }
|
||||
.pull-stats { font-size: 12px; color: var(--muted); }
|
||||
.pull-actions { display: flex; gap: 6px; justify-content: flex-end; }
|
||||
.pull-actions:empty { display: none; }
|
||||
.pull-item.paused .bar > div { background: var(--warn); }
|
||||
.pull-item.error .pull-stats { color: var(--err); }
|
||||
Reference in New Issue
Block a user