Files
webshare-api/ui/styles.css
Michal Pemcak 4a756c4be3 Show finished queue items as done instead of uploading.
Map qBittorrent-style uploading state to a done badge in the Web UI; keep backend state for *arr compatibility.
2026-08-07 12:06:36 +02:00

415 lines
7.7 KiB
CSS

*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #f0f0f0;
--fg: #000000;
--muted: #666666;
--border: #000000;
--fill: #000000;
--empty: #d8d8d8;
--surface: #e8e8e8;
--hover: #e0e0e0;
--font: "IBM Plex Mono", "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}
html {
height: 100%;
background: var(--bg);
color: var(--fg);
}
body {
height: 100%;
font-family: var(--font);
font-size: 13px;
line-height: 1.45;
max-width: 72rem;
margin: 0 auto;
padding: 0.75rem 1rem;
display: flex;
flex-direction: column;
min-height: 100%;
overflow: hidden;
background: var(--bg);
}
/* ── Tabs (always pinned) ─────────────────────────────── */
.tabs {
display: flex;
gap: 0;
flex-shrink: 0;
margin-bottom: 0.75rem;
border: 1px solid var(--border);
background: var(--bg);
position: sticky;
top: 0;
z-index: 20;
}
.tab {
background: var(--bg);
border: none;
border-right: 1px solid var(--border);
color: var(--fg);
font-family: inherit;
font-size: 13px;
font-weight: 400;
padding: 0.45rem 1rem;
cursor: pointer;
letter-spacing: 0.02em;
text-transform: uppercase;
}
.tab:last-child {
border-right: none;
}
.tab:hover {
background: var(--hover);
}
.tab.active {
background: var(--fg);
color: var(--bg);
font-weight: 700;
}
/* no outer border / frame around panels */
.tab-content {
display: none;
flex: 1;
min-height: 0;
border: none;
padding: 0;
background: var(--bg);
flex-direction: column;
overflow: hidden;
}
.tab-content.active {
display: flex;
}
/* ── Search bar (stays above scrolling list) ──────────── */
.search-bar {
display: flex;
gap: 0;
flex-shrink: 0;
margin-bottom: 0.75rem;
border: 1px solid var(--border);
background: #fafafa;
}
.search-bar input {
flex: 1;
background: #fafafa;
border: none;
border-right: 1px solid var(--border);
color: var(--fg);
font-family: inherit;
font-size: 13px;
padding: 0.55rem 0.75rem;
outline: none;
min-width: 0;
}
.search-bar input::placeholder {
color: var(--muted);
}
.search-bar input:focus {
background: #ffffff;
}
.search-bar button {
background: var(--bg);
color: var(--fg);
border: none;
font-family: inherit;
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
padding: 0 1rem;
cursor: pointer;
white-space: nowrap;
}
.search-bar button:hover {
background: var(--fg);
color: var(--bg);
}
/* ── Scrollable lists ─────────────────────────────────── */
.results {
display: flex;
flex-direction: column;
gap: 0;
flex: 1;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
/* ── Result items ─────────────────────────────────────── */
.result-item {
display: flex;
align-items: center;
gap: 0.75rem;
border: 1px solid var(--border);
border-bottom: none;
padding: 0.55rem 0.75rem;
background: #fafafa;
flex-shrink: 0;
}
.result-item:last-child {
border-bottom: 1px solid var(--border);
}
.result-item:hover {
background: var(--hover);
}
.result-info {
flex: 1;
min-width: 0;
}
.result-name {
font-size: 13px;
font-weight: 400;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.result-meta {
font-size: 11px;
color: var(--muted);
margin-top: 0.15rem;
font-variant-numeric: tabular-nums;
}
.result-item button {
background: var(--bg);
color: var(--fg);
border: 1px solid var(--border);
font-family: inherit;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.03em;
padding: 0.35rem 0.65rem;
cursor: pointer;
white-space: nowrap;
}
.result-item button:hover:not(:disabled):not(.added) {
background: var(--fg);
color: var(--bg);
}
.result-item button.added,
.result-item button:disabled {
color: var(--muted);
border-color: var(--muted);
cursor: default;
background: var(--bg);
}
/* ── Queue items ──────────────────────────────────────── */
.queue-item {
border: 1px solid var(--border);
border-bottom: none;
padding: 0.65rem 0.75rem;
background: #fafafa;
flex-shrink: 0;
}
.queue-item:last-child {
border-bottom: 1px solid var(--border);
}
.queue-name {
font-size: 13px;
margin-bottom: 0.45rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.queue-name .badge {
flex-shrink: 0;
}
.queue-name > span:last-of-type {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.cancel-btn {
flex-shrink: 0;
margin-left: auto;
background: var(--bg);
color: var(--fg);
border: 1px solid var(--border);
font-family: inherit;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.03em;
padding: 0.25rem 0.55rem;
cursor: pointer;
}
.cancel-btn:hover:not(:disabled) {
background: var(--fg);
color: var(--bg);
}
.cancel-btn:disabled {
opacity: 0.45;
cursor: default;
}
.queue-stats {
display: flex;
justify-content: space-between;
font-size: 11px;
color: var(--muted);
margin-bottom: 0.25rem;
font-variant-numeric: tabular-nums;
}
.queue-speed {
font-size: 11px;
color: var(--muted);
margin-bottom: 0.4rem;
font-variant-numeric: tabular-nums;
min-height: 1em;
}
/* ── Progress bar ─────────────────────────────────────── */
.progress-bar {
height: 0.65rem;
background: var(--empty);
border: 1px solid var(--border);
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--fill);
transition: width 0.4s steps(24, end);
}
.progress-fill.done {
background: var(--fg);
}
.progress-fill.error {
background: repeating-linear-gradient(
-45deg,
var(--fg),
var(--fg) 3px,
var(--bg) 3px,
var(--bg) 6px
);
}
.progress-fill.queued {
background: repeating-linear-gradient(
90deg,
var(--fg),
var(--fg) 2px,
var(--bg) 2px,
var(--bg) 5px
);
}
/* ── Status badges ────────────────────────────────────── */
.badge {
display: inline-block;
font-size: 10px;
font-weight: 700;
padding: 0.1rem 0.35rem;
border: 1px solid var(--border);
text-transform: uppercase;
letter-spacing: 0.04em;
background: var(--bg);
color: var(--fg);
}
.badge.downloading {
background: var(--fg);
color: var(--bg);
border-color: var(--fg);
}
/* finished (backend may still say "uploading") */
.badge.done {
background: var(--fg);
color: var(--bg);
border-color: var(--fg);
}
.badge.queued {
border-style: dashed;
color: var(--muted);
border-color: var(--muted);
}
.badge.error {
border-style: double;
border-width: 3px;
}
/* ── Empty / spinner ──────────────────────────────────── */
.empty,
.spinner {
text-align: left;
color: var(--muted);
padding: 1.25rem 0.25rem;
font-size: 13px;
flex-shrink: 0;
}
.spinner::before {
content: "> ";
color: var(--fg);
}
.empty::before {
content: "· ";
color: var(--muted);
}
/* ── Focus rings ──────────────────────────────────────── */
:focus-visible {
outline: 1px solid var(--fg);
outline-offset: 2px;
}
button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
outline: none;
}