add auth support

This commit is contained in:
Mateusz Gruszczyński
2026-05-06 08:38:07 +02:00
parent aea3c92830
commit dc1cac4e6f
20 changed files with 1185 additions and 220 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,3 @@
/* Note: CSS po zmianach jest formatowany jednolicie; nie dodano nowych zduplikowanych klas ani nadpisan selektorow. */
:root {
--app-font-family:
Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
@@ -224,7 +223,6 @@ body {
overflow: auto;
background: rgba(var(--bs-secondary-bg-rgb), 0.9);
}
/* Note: Sidebar filters are wider and use one structured block per class to avoid duplicate overrides. */
.filter {
width: 100%;
display: grid;
@@ -660,7 +658,6 @@ body {
}
}
/* Feature additions without changing the existing visual shell */
.date-compact {
white-space: nowrap;
}
@@ -749,7 +746,6 @@ body {
background: #f59e0b !important;
color: #111 !important;
}
/* Note: Manual mobile mode is defined once here; media queries below only adapt breakpoints. */
body.mobile-mode .table-wrap,
body.mobile-mode .details {
display: none !important;
@@ -782,7 +778,6 @@ body.mobile-mode .main-grid {
}
}
/* Fixes: compact one-line progress cell and readable percent inside the bar. */
.torrent-table td:nth-child(5) {
min-width: 92px;
width: 110px;
@@ -910,7 +905,6 @@ body.mobile-mode .mobile-card {
}
}
/* Requested fixes: stable charts, Smart Queue exceptions, label actions, mobile readability */
.history-grid {
display: grid;
grid-template-columns: 1fr;
@@ -945,12 +939,6 @@ body.mobile-mode .mobile-card {
grid-template-columns: 1fr;
}
}
.smart-actions {
display: flex;
align-items: center;
gap: 0.45rem;
flex-wrap: wrap;
}
.empty-mini {
padding: 0.7rem 0.8rem;
border: 1px dashed var(--bs-border-color);
@@ -993,7 +981,6 @@ body.mobile-mode .mobile-card {
}
}
/* Requested fixes: clean progress, mobile auto list, pagers, rTorrent config, peers refresh */
.torrent-progress {
height: 16px;
min-width: 92px;
@@ -1066,7 +1053,6 @@ body.mobile-mode .mobile-card {
min-width: 96px;
}
/* Mobile list: force visible on narrow screens even without manual toggle. */
@media (max-width: 900px) {
body:not(.modal-open) .table-wrap {
display: none !important;
@@ -1094,7 +1080,6 @@ body.mobile-mode .mobile-card {
font-style: italic;
}
/* Mobile blank-view fix: sidebar disappears at 900px, so the mobile list must also be forced from 900px down. */
@media (max-width: 900px) {
.main-grid {
display: grid !important;
@@ -1227,7 +1212,6 @@ body.mobile-mode .mobile-card {
padding: 0.75rem;
background: var(--bs-tertiary-bg);
}
/* Note: Bulk actions overlay the list area; base .content/.details rules keep the layout pinned. */
#bulkBar {
grid-row: 1;
grid-column: 1;
@@ -1325,7 +1309,6 @@ body.mobile-mode .mobile-card {
min-height: 160px;
}
/* Torrent warning and mobile controls */
.torrent-warning td {
background: rgba(245, 158, 11, 0.075) !important;
}
@@ -1417,7 +1400,6 @@ body.mobile-mode #mobileList {
}
}
/* rTorrent config */
.rt-config-grid {
display: grid;
gap: 0.6rem;
@@ -1501,7 +1483,6 @@ body.mobile-mode #mobileList {
font-size: 0.82rem;
}
/* Tracker management */
.tracker-toolbar,
.tracker-actions {
display: flex;
@@ -1530,7 +1511,6 @@ body.mobile-mode #mobileList {
word-break: break-all;
}
/* Cleanup and app diagnostics */
.tool-note {
color: var(--bs-secondary-color);
font-size: 0.82rem;
@@ -1646,7 +1626,6 @@ body.mobile-mode #mobileList {
white-space: nowrap;
}
/* Operation status, mobile progress and separated preferences */
.torrent-operating td {
background: rgba(13, 202, 240, 0.085) !important;
}
@@ -1698,7 +1677,6 @@ body.mobile-mode #mobileList {
border-left: 0.25rem solid var(--bs-primary);
}
/* Note: Empty first-run state is grouped separately to keep setup styles isolated and avoid duplicated table overrides. */
.empty-state {
display: inline-flex;
flex-direction: column;
@@ -1719,14 +1697,12 @@ body.mobile-mode #mobileList {
display: none !important;
}
/* Footer preferences */
.footer-preferences {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 0.5rem;
}
/* Note: Footer switch cards mirror column cards so Bootstrap form-switch margins cannot push toggles outside the field. */
.footer-pref-card {
display: flex;
align-items: center;
@@ -1776,7 +1752,6 @@ body.mobile-mode #mobileList {
}
/* Torrent statistics */
.torrent-stats-toolbar {
display: flex;
align-items: center;
@@ -1820,7 +1795,6 @@ body.mobile-mode #mobileList {
white-space: nowrap;
}
/* Peer table links */
.peer-ip {
display: inline-flex;
align-items: center;
@@ -1837,3 +1811,193 @@ body.mobile-mode #mobileList {
.peer-ip-link:hover {
color: var(--bs-primary);
}
.auth-page {
display: grid;
min-height: 100vh;
place-items: center;
padding: 1rem;
background: radial-gradient(
circle at 50% 35%,
rgba(var(--bs-secondary-bg-rgb), 0.98),
var(--bs-body-bg) 68%
);
color: var(--bs-body-color);
}
.auth-card {
width: min(92vw, 430px);
}
.auth-lock {
display: inline-grid;
width: 3rem;
height: 3rem;
margin: 1.35rem 0 1rem;
place-items: center;
border: 1px solid var(--bs-border-color);
border-radius: 999px;
background: rgba(var(--bs-tertiary-bg-rgb), 0.72);
color: var(--bs-primary);
font-size: 1.15rem;
}
.auth-alert {
margin: 1rem 0 0;
padding: 0.5rem 0.75rem;
text-align: left;
}
.auth-form {
margin-top: 1.2rem;
text-align: left;
}
.auth-form .form-label {
margin-bottom: 0.35rem;
font-size: 0.82rem;
font-weight: 700;
color: var(--bs-secondary-color);
}
.auth-form .form-control {
margin-bottom: 0.85rem;
}
.auth-form .btn {
margin-top: 0.35rem;
}
.user-form-grid {
display: grid;
grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) 120px 150px 110px auto auto;
gap: 0.55rem;
align-items: center;
}
.smart-panel {
container-type: inline-size;
}
.smart-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--bs-border-color);
}
.smart-header-actions {
display: flex;
align-items: center;
gap: 0.45rem;
flex-wrap: wrap;
justify-content: flex-end;
}
.smart-settings-list {
display: grid;
gap: 0.65rem;
margin-top: 0.85rem;
}
.smart-setting-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
min-height: 52px;
padding: 0.6rem 0.7rem;
border: 1px solid var(--bs-border-color);
border-radius: 0.65rem;
background: rgba(var(--bs-secondary-bg-rgb), 0.28);
}
.smart-toggle-row .form-check {
display: flex;
align-items: center;
min-height: 0;
margin: 0;
padding-left: 2.25rem;
}
.smart-toggle-row .form-check-input {
margin-top: 0;
}
.smart-setting-row .form-check-label,
.smart-input-field span {
font-weight: 700;
}
.smart-input-grid {
display: grid;
grid-template-columns: repeat(4, minmax(120px, 1fr));
gap: 0.65rem;
}
.smart-input-field {
display: grid;
gap: 0.35rem;
min-width: 0;
padding: 0.6rem 0.7rem;
border: 1px solid var(--bs-border-color);
border-radius: 0.65rem;
background: rgba(var(--bs-body-bg-rgb), 0.48);
}
.smart-input-field small {
color: var(--bs-secondary-color);
line-height: 1.2;
}
.smart-input-field .form-control {
width: 100%;
}
.smart-actions {
display: flex;
align-items: center;
gap: 0.45rem;
flex-wrap: wrap;
padding: 0.7rem;
border: 1px solid var(--bs-border-color);
border-radius: 0.65rem;
background: rgba(var(--bs-secondary-bg-rgb), 0.24);
}
@media (max-width: 992px) {
.user-form-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.smart-input-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 576px) {
.user-form-grid,
.smart-input-grid {
grid-template-columns: 1fr;
}
.smart-header,
.smart-setting-row {
align-items: stretch;
flex-direction: column;
}
.smart-header-actions {
justify-content: stretch;
}
.smart-header-actions .btn {
flex: 1 1 auto;
}
.smart-toggle-row .form-check {
padding-left: 0;
}
}