- Add max redirect depth (10) to Vidmoly _fetch to prevent stack overflow - Drain undici response body on redirect to prevent connection leaks - Fix installUpdate unhandled promise rejection in main.js - Fix context menu submenu viewport overflow with flip-left CSS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
502 lines
14 KiB
CSS
502 lines
14 KiB
CSS
:root {
|
|
--bg-primary: #0f0f1a;
|
|
--bg-secondary: #1a1a2e;
|
|
--bg-card: #1e1e2e;
|
|
--bg-card-hover: #2a2a3e;
|
|
--bg-input: #2a2a3e;
|
|
--border: rgba(255, 255, 255, 0.1);
|
|
--border-hover: rgba(255, 255, 255, 0.2);
|
|
--text: #fff;
|
|
--text-muted: #888;
|
|
--text-dim: #666;
|
|
--accent: #667eea;
|
|
--accent-end: #764ba2;
|
|
--success: #00b894;
|
|
--success-end: #00cec9;
|
|
--danger: #e74c3c;
|
|
--warning: #fdcb6e;
|
|
--link-color: #00cec9;
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, #16213e 100%);
|
|
min-height: 100vh;
|
|
color: var(--text);
|
|
user-select: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Tab Bar */
|
|
.tab-bar {
|
|
display: flex;
|
|
gap: 2px;
|
|
padding: 8px 16px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
background: rgba(0, 0, 0, 0.2);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tab {
|
|
padding: 8px 20px;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
border-bottom: 2px solid transparent;
|
|
transition: all 0.2s;
|
|
}
|
|
.tab:hover { color: var(--text); }
|
|
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
|
|
|
|
.version-label {
|
|
margin-left: auto;
|
|
font-size: 0.7rem;
|
|
color: var(--text-dim);
|
|
padding: 4px 8px;
|
|
align-self: center;
|
|
}
|
|
|
|
/* Update Banner */
|
|
.update-banner {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 6px 16px;
|
|
background: linear-gradient(135deg, #667eea22, #764ba222);
|
|
border-bottom: 1px solid rgba(102, 126, 234, 0.3);
|
|
font-size: 0.8rem;
|
|
color: #e0e0e0;
|
|
flex-shrink: 0;
|
|
}
|
|
.update-banner span { flex: 1; }
|
|
|
|
/* Views */
|
|
.view { display: none; flex: 1; overflow: hidden; flex-direction: column; }
|
|
.view.active { display: flex; }
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
transition: all 0.2s;
|
|
}
|
|
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 4px; }
|
|
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 5px; }
|
|
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-end)); color: #fff; }
|
|
.btn-primary:hover { filter: brightness(1.1); }
|
|
.btn-primary:disabled { opacity: 0.5; cursor: default; filter: none; }
|
|
.btn-secondary { background: var(--bg-input); color: var(--text-muted); border: 1px solid var(--border); }
|
|
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text); }
|
|
.btn-success { background: linear-gradient(135deg, var(--success), var(--success-end)); color: #fff; }
|
|
.btn-success:hover { filter: brightness(1.1); }
|
|
.btn-success:disabled { opacity: 0.5; cursor: default; filter: none; }
|
|
.btn-danger { background: var(--danger); color: #fff; }
|
|
.btn-danger:hover { filter: brightness(1.1); }
|
|
|
|
/* Upload Toolbar */
|
|
.upload-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: rgba(0, 0, 0, 0.15);
|
|
flex-shrink: 0;
|
|
flex-wrap: wrap;
|
|
}
|
|
.toolbar-left { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 200px; }
|
|
.toolbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
|
|
|
|
/* Hoster Chips */
|
|
.hoster-select { display: flex; gap: 4px; flex-wrap: wrap; }
|
|
.hoster-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 3px 8px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
transition: all 0.2s;
|
|
}
|
|
.hoster-chip input { display: none; }
|
|
.hoster-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); }
|
|
.hoster-chip.selected { border-color: var(--accent); background: rgba(102, 126, 234, 0.15); }
|
|
.hoster-chip.selected .hoster-dot { background: var(--accent); }
|
|
.hoster-chip.no-key { opacity: 0.4; cursor: default; }
|
|
|
|
/* Health check */
|
|
.health-check-inline { display: flex; align-items: center; gap: 4px; }
|
|
.auto-check-label { display: flex; align-items: center; gap: 3px; font-size: 10px; color: var(--text-muted); cursor: pointer; }
|
|
.auto-check-label input { width: 12px; height: 12px; }
|
|
|
|
.health-check-results { display: flex; gap: 4px; padding: 0 16px; flex-wrap: wrap; flex-shrink: 0; }
|
|
.health-badge {
|
|
display: inline-flex; gap: 4px; padding: 2px 8px;
|
|
font-size: 10px; border-radius: 3px; align-items: center;
|
|
}
|
|
.health-badge.ok { background: rgba(0, 184, 148, 0.2); color: var(--success); }
|
|
.health-badge.warn { background: rgba(253, 203, 110, 0.2); color: var(--warning); }
|
|
.health-badge.error { background: rgba(231, 76, 60, 0.2); color: var(--danger); }
|
|
.health-badge.skipped { background: rgba(255,255,255,0.05); color: var(--text-dim); }
|
|
.health-tag { font-weight: 600; }
|
|
|
|
/* Drop Zone */
|
|
.drop-zone {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex: 1;
|
|
margin: 16px;
|
|
border: 2px dashed var(--border);
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
color: var(--text-muted);
|
|
min-height: 200px;
|
|
}
|
|
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--accent); background: rgba(102, 126, 234, 0.05); }
|
|
.drop-icon { font-size: 40px; margin-bottom: 8px; }
|
|
|
|
/* Queue Container */
|
|
.queue-container {
|
|
flex: 1;
|
|
overflow: auto;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Queue Table */
|
|
.queue-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 11px;
|
|
table-layout: fixed;
|
|
}
|
|
.queue-table thead {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 5;
|
|
}
|
|
.queue-table th {
|
|
padding: 5px 8px;
|
|
text-align: left;
|
|
background: #12121f;
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
font-size: 10px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
border-bottom: 1px solid var(--border);
|
|
white-space: nowrap;
|
|
cursor: default;
|
|
}
|
|
.queue-table th.sortable { cursor: pointer; }
|
|
.queue-table th.sortable:hover { color: var(--text); }
|
|
|
|
.col-filename { width: 30%; }
|
|
.col-size { width: 12%; }
|
|
.col-host { width: 12%; }
|
|
.col-status { width: 10%; }
|
|
.col-elapsed { width: 7%; }
|
|
.col-remaining { width: 7%; }
|
|
.col-speed { width: 8%; }
|
|
.col-progress { width: 14%; }
|
|
|
|
.queue-table td {
|
|
padding: 4px 8px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Queue Row States */
|
|
.queue-row { transition: background 0.15s; cursor: pointer; }
|
|
.queue-row:hover { background: rgba(255, 255, 255, 0.03); }
|
|
.queue-row.selected { background: rgba(102, 126, 234, 0.12) !important; }
|
|
|
|
.queue-row.status-uploading { background: rgba(102, 126, 234, 0.08); }
|
|
.queue-row.status-getting-server { background: rgba(102, 126, 234, 0.05); }
|
|
.queue-row.status-retrying { background: rgba(253, 203, 110, 0.08); }
|
|
.queue-row.status-done { background: rgba(0, 184, 148, 0.06); }
|
|
.queue-row.status-error { background: rgba(231, 76, 60, 0.1); }
|
|
.queue-row.status-skipped { background: rgba(255, 255, 255, 0.02); opacity: 0.6; }
|
|
|
|
/* Status Badge */
|
|
.status-badge {
|
|
display: inline-block;
|
|
padding: 1px 6px;
|
|
border-radius: 3px;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
}
|
|
.status-badge.status-preview { color: var(--text-muted); }
|
|
.status-badge.status-queued { color: var(--text-muted); background: rgba(255,255,255,0.05); }
|
|
.status-badge.status-getting-server { color: var(--accent); }
|
|
.status-badge.status-uploading { color: #5dabf7; background: rgba(93, 171, 247, 0.15); }
|
|
.status-badge.status-retrying { color: var(--warning); background: rgba(253, 203, 110, 0.15); }
|
|
.status-badge.status-done { color: var(--success); background: rgba(0, 184, 148, 0.15); }
|
|
.status-badge.status-error { color: var(--danger); background: rgba(231, 76, 60, 0.15); }
|
|
.status-badge.status-skipped { color: var(--text-dim); }
|
|
|
|
/* Progress in table cell */
|
|
.progress-cell { display: flex; align-items: center; gap: 4px; }
|
|
.progress-bar-bg {
|
|
flex: 1;
|
|
height: 14px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 2px;
|
|
overflow: hidden;
|
|
}
|
|
.progress-bar-fill {
|
|
height: 100%;
|
|
transition: width 0.3s ease;
|
|
border-radius: 2px;
|
|
}
|
|
.progress-bar-fill.status-uploading { background: linear-gradient(90deg, #4a90d9, #5dabf7); }
|
|
.progress-bar-fill.status-getting-server { background: var(--accent); }
|
|
.progress-bar-fill.status-retrying { background: var(--warning); }
|
|
.progress-bar-fill.status-done { background: linear-gradient(90deg, var(--success), var(--success-end)); }
|
|
.progress-bar-fill.status-error { background: var(--danger); }
|
|
.progress-pct { font-size: 10px; color: var(--text-muted); min-width: 28px; text-align: right; }
|
|
|
|
/* Queue Actions */
|
|
.queue-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
padding: 6px 16px;
|
|
border-top: 1px solid var(--border);
|
|
background: rgba(0, 0, 0, 0.1);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Context Menu */
|
|
.context-menu {
|
|
position: fixed;
|
|
z-index: 1000;
|
|
background: #1e1e30;
|
|
border: 1px solid var(--border-hover);
|
|
border-radius: 6px;
|
|
padding: 4px 0;
|
|
min-width: 200px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
|
|
}
|
|
.ctx-item {
|
|
padding: 6px 16px;
|
|
font-size: 12px;
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
position: relative;
|
|
}
|
|
.ctx-item:hover { background: rgba(102, 126, 234, 0.2); }
|
|
.ctx-separator { height: 1px; margin: 4px 8px; background: var(--border); }
|
|
.ctx-submenu { position: relative; }
|
|
.ctx-submenu-items {
|
|
display: none;
|
|
position: absolute;
|
|
left: 100%;
|
|
top: -4px;
|
|
background: #1e1e30;
|
|
border: 1px solid var(--border-hover);
|
|
border-radius: 6px;
|
|
padding: 4px 0;
|
|
min-width: 160px;
|
|
max-width: calc(100vw - 16px);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
|
|
}
|
|
/* Flip submenu to the left when it would overflow the viewport */
|
|
.ctx-submenu-items.flip-left { left: auto; right: 100%; }
|
|
.ctx-submenu:hover .ctx-submenu-items { display: block; }
|
|
|
|
/* Settings View */
|
|
.settings-container { padding: 16px; overflow: auto; flex: 1; }
|
|
.settings-container h2 { margin-bottom: 4px; font-size: 18px; }
|
|
.settings-hint { color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
|
|
|
|
.hoster-settings-panel {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
margin-bottom: 8px;
|
|
overflow: hidden;
|
|
}
|
|
.hoster-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 14px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
.hoster-panel-header:hover { background: var(--bg-card-hover); }
|
|
.panel-arrow { font-size: 10px; color: var(--text-muted); width: 12px; }
|
|
.panel-title { font-weight: 600; font-size: 13px; flex: 1; }
|
|
.panel-status { font-size: 10px; padding: 2px 8px; border-radius: 3px; }
|
|
.panel-status.active { background: rgba(0, 184, 148, 0.2); color: var(--success); }
|
|
.panel-status.inactive { background: rgba(255, 255, 255, 0.05); color: var(--text-dim); }
|
|
|
|
.hoster-panel-body { padding: 0 14px 14px; }
|
|
.settings-divider { height: 1px; background: var(--border); margin: 12px 0; }
|
|
.hoster-panel-body h4 { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
|
|
|
|
.settings-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.settings-row label {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
min-width: 130px;
|
|
flex-shrink: 0;
|
|
}
|
|
.key-input, .hs-input {
|
|
flex: 1;
|
|
padding: 6px 10px;
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
color: var(--text);
|
|
font-size: 12px;
|
|
max-width: 300px;
|
|
}
|
|
.key-input:focus, .hs-input:focus { border-color: var(--accent); outline: none; }
|
|
.hs-input { max-width: 100px; }
|
|
.hint { font-size: 10px; color: var(--text-dim); }
|
|
|
|
.toggle-vis {
|
|
background: transparent;
|
|
border: 1px solid var(--border);
|
|
color: var(--text-muted);
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
.toggle-vis:hover { border-color: var(--border-hover); }
|
|
|
|
.save-feedback { font-size: 12px; color: var(--success); margin-left: 8px; }
|
|
|
|
.settings-grid-mini {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 4px 16px;
|
|
}
|
|
|
|
/* History View */
|
|
.history-container { padding: 16px; overflow: auto; flex: 1; }
|
|
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
|
|
.history-header h2 { font-size: 18px; }
|
|
|
|
.results-table, .history-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 12px;
|
|
}
|
|
.results-table th, .history-table th {
|
|
padding: 6px 8px;
|
|
text-align: left;
|
|
background: var(--bg-card);
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
font-size: 11px;
|
|
border-bottom: 1px solid var(--border);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
}
|
|
.results-table th.active, .history-table th.active { color: var(--text); }
|
|
.sort-indicator { margin-left: 4px; font-size: 10px; }
|
|
|
|
.history-row {
|
|
cursor: pointer;
|
|
transition: background 0.15s;
|
|
}
|
|
.history-row:hover { background: rgba(255, 255, 255, 0.03); }
|
|
.history-row.selected { background: rgba(102, 126, 234, 0.12); }
|
|
.history-row.error { color: var(--danger); opacity: 0.6; }
|
|
.history-row td {
|
|
padding: 5px 8px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.empty-state { color: var(--text-dim); text-align: center; padding: 40px; font-size: 14px; }
|
|
|
|
/* Statusbar */
|
|
.statusbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 4px 16px;
|
|
background: #0a0a14;
|
|
border-top: 1px solid var(--border);
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
flex-shrink: 0;
|
|
}
|
|
.sb-separator { color: var(--text-dim); }
|
|
.sb-speed { color: var(--link-color); font-weight: 500; }
|
|
.sb-total { color: var(--text); }
|
|
.sb-elapsed { color: var(--text-muted); }
|
|
.sb-state { flex: 1; }
|
|
|
|
/* Copy toast */
|
|
.copy-toast {
|
|
position: fixed;
|
|
bottom: 40px;
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(20px);
|
|
background: rgba(0, 184, 148, 0.9);
|
|
color: #fff;
|
|
padding: 6px 16px;
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: all 0.3s;
|
|
z-index: 2000;
|
|
}
|
|
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
|
|
/* Shutdown overlay */
|
|
.shutdown-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 3000;
|
|
}
|
|
.shutdown-box {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-hover);
|
|
border-radius: 12px;
|
|
padding: 24px 32px;
|
|
text-align: center;
|
|
}
|
|
.shutdown-box p { margin-bottom: 16px; font-size: 16px; }
|
|
|
|
/* Scrollbars */
|
|
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
|
|
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
|