Karan Adhikari commited on
UI: redesign templates
Browse files- Backend/fastapi/routes/template_routes.py +14 -14
- Backend/fastapi/templates/access_manage.html +1 -3
- Backend/fastapi/templates/admin_dashboard.html +5 -7
- Backend/fastapi/templates/base.html +148 -16
- Backend/fastapi/templates/custom_catalogs.html +1 -2
- Backend/fastapi/templates/dashboard.html +39 -39
- Backend/fastapi/templates/login.html +2 -2
- Backend/fastapi/templates/media_edit.html +47 -49
- Backend/fastapi/templates/media_management.html +16 -16
- Backend/fastapi/templates/settings.html +1 -2
- Backend/fastapi/templates/subscriptions_manage.html +3 -7
- Backend/fastapi/templates/tools.html +1 -2
- Backend/fastapi/themes.py +106 -92
Backend/fastapi/routes/template_routes.py
CHANGED
|
@@ -2,7 +2,7 @@ from fastapi import Request, Form, HTTPException, Depends
|
|
| 2 |
from fastapi.responses import RedirectResponse
|
| 3 |
from fastapi.templating import Jinja2Templates
|
| 4 |
from Backend.fastapi.security.credentials import verify_credentials, require_auth, is_authenticated, get_current_user
|
| 5 |
-
from Backend.fastapi.themes import get_theme, get_all_themes
|
| 6 |
from Backend import db
|
| 7 |
from Backend.config import Telegram
|
| 8 |
from Backend.pyrofork.bot import work_loads, multi_clients, StreamBot
|
|
@@ -15,7 +15,7 @@ from Backend.helper.custom_dl import ACTIVE_STREAMS, RECENT_STREAMS
|
|
| 15 |
templates = Jinja2Templates(directory="Backend/fastapi/templates")
|
| 16 |
|
| 17 |
async def admin_dashboard_page(request: Request, _: bool = Depends(require_auth)):
|
| 18 |
-
theme_name = request.session.get("theme",
|
| 19 |
theme = get_theme(theme_name)
|
| 20 |
current_user = get_current_user(request)
|
| 21 |
|
|
@@ -31,7 +31,7 @@ async def login_page(request: Request):
|
|
| 31 |
if is_authenticated(request):
|
| 32 |
return RedirectResponse(url="/", status_code=302)
|
| 33 |
|
| 34 |
-
theme_name = request.session.get("theme",
|
| 35 |
theme = get_theme(theme_name)
|
| 36 |
|
| 37 |
return templates.TemplateResponse("login.html", {
|
|
@@ -47,7 +47,7 @@ async def login_post(request: Request, username: str = Form(...), password: str
|
|
| 47 |
request.session["username"] = username
|
| 48 |
return RedirectResponse(url="/", status_code=302)
|
| 49 |
else:
|
| 50 |
-
theme_name = request.session.get("theme",
|
| 51 |
theme = get_theme(theme_name)
|
| 52 |
return templates.TemplateResponse("login.html", {
|
| 53 |
"request": request,
|
|
@@ -67,7 +67,7 @@ async def set_theme(request: Request, theme: str = Form(...)):
|
|
| 67 |
return RedirectResponse(url=request.headers.get("referer", "/"), status_code=302)
|
| 68 |
|
| 69 |
async def dashboard_page(request: Request, _: bool = Depends(require_auth)):
|
| 70 |
-
theme_name = request.session.get("theme",
|
| 71 |
theme = get_theme(theme_name)
|
| 72 |
current_user = get_current_user(request)
|
| 73 |
|
|
@@ -161,7 +161,7 @@ async def dashboard_page(request: Request, _: bool = Depends(require_auth)):
|
|
| 161 |
|
| 162 |
|
| 163 |
async def media_management_page(request: Request, media_type: str = "movie", _: bool = Depends(require_auth)):
|
| 164 |
-
theme_name = request.session.get("theme",
|
| 165 |
theme = get_theme(theme_name)
|
| 166 |
current_user = get_current_user(request)
|
| 167 |
|
|
@@ -175,7 +175,7 @@ async def media_management_page(request: Request, media_type: str = "movie", _:
|
|
| 175 |
})
|
| 176 |
|
| 177 |
async def edit_media_page(request: Request, tmdb_id: int, db_index: int, media_type: str, _: bool = Depends(require_auth)):
|
| 178 |
-
theme_name = request.session.get("theme",
|
| 179 |
theme = get_theme(theme_name)
|
| 180 |
current_user = get_current_user(request)
|
| 181 |
|
|
@@ -203,7 +203,7 @@ async def edit_media_page(request: Request, tmdb_id: int, db_index: int, media_t
|
|
| 203 |
})
|
| 204 |
|
| 205 |
async def public_status_page(request: Request):
|
| 206 |
-
theme_name = request.session.get("theme",
|
| 207 |
theme = get_theme(theme_name)
|
| 208 |
|
| 209 |
try:
|
|
@@ -235,7 +235,7 @@ async def public_status_page(request: Request):
|
|
| 235 |
})
|
| 236 |
|
| 237 |
async def stremio_guide_page(request: Request):
|
| 238 |
-
theme_name = request.session.get("theme",
|
| 239 |
theme = get_theme(theme_name)
|
| 240 |
|
| 241 |
return templates.TemplateResponse("stremio_guide.html", {
|
|
@@ -247,7 +247,7 @@ async def stremio_guide_page(request: Request):
|
|
| 247 |
})
|
| 248 |
|
| 249 |
async def admin_subscriptions_page(request: Request, _: bool = Depends(require_auth)):
|
| 250 |
-
theme_name = request.session.get("theme",
|
| 251 |
theme = get_theme(theme_name)
|
| 252 |
current_user = get_current_user(request)
|
| 253 |
|
|
@@ -261,7 +261,7 @@ async def admin_subscriptions_page(request: Request, _: bool = Depends(require_a
|
|
| 261 |
|
| 262 |
|
| 263 |
async def admin_access_page(request: Request, _: bool = Depends(require_auth)):
|
| 264 |
-
theme_name = request.session.get("theme",
|
| 265 |
theme = get_theme(theme_name)
|
| 266 |
current_user = get_current_user(request)
|
| 267 |
|
|
@@ -276,7 +276,7 @@ async def admin_access_page(request: Request, _: bool = Depends(require_auth)):
|
|
| 276 |
|
| 277 |
|
| 278 |
async def custom_catalogs_page(request: Request, _: bool = Depends(require_auth)):
|
| 279 |
-
theme_name = request.session.get("theme",
|
| 280 |
theme = get_theme(theme_name)
|
| 281 |
current_user = get_current_user(request)
|
| 282 |
|
|
@@ -291,7 +291,7 @@ async def custom_catalogs_page(request: Request, _: bool = Depends(require_auth)
|
|
| 291 |
|
| 292 |
|
| 293 |
async def tools_page(request: Request, _: bool = Depends(require_auth)):
|
| 294 |
-
theme_name = request.session.get("theme",
|
| 295 |
theme = get_theme(theme_name)
|
| 296 |
current_user = get_current_user(request)
|
| 297 |
|
|
@@ -308,7 +308,7 @@ async def tools_page(request: Request, _: bool = Depends(require_auth)):
|
|
| 308 |
|
| 309 |
|
| 310 |
async def settings_page(request: Request, _: bool = Depends(require_auth)):
|
| 311 |
-
theme_name = request.session.get("theme",
|
| 312 |
theme = get_theme(theme_name)
|
| 313 |
current_user = get_current_user(request)
|
| 314 |
|
|
|
|
| 2 |
from fastapi.responses import RedirectResponse
|
| 3 |
from fastapi.templating import Jinja2Templates
|
| 4 |
from Backend.fastapi.security.credentials import verify_credentials, require_auth, is_authenticated, get_current_user
|
| 5 |
+
from Backend.fastapi.themes import get_theme, get_all_themes, DEFAULT_THEME
|
| 6 |
from Backend import db
|
| 7 |
from Backend.config import Telegram
|
| 8 |
from Backend.pyrofork.bot import work_loads, multi_clients, StreamBot
|
|
|
|
| 15 |
templates = Jinja2Templates(directory="Backend/fastapi/templates")
|
| 16 |
|
| 17 |
async def admin_dashboard_page(request: Request, _: bool = Depends(require_auth)):
|
| 18 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 19 |
theme = get_theme(theme_name)
|
| 20 |
current_user = get_current_user(request)
|
| 21 |
|
|
|
|
| 31 |
if is_authenticated(request):
|
| 32 |
return RedirectResponse(url="/", status_code=302)
|
| 33 |
|
| 34 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 35 |
theme = get_theme(theme_name)
|
| 36 |
|
| 37 |
return templates.TemplateResponse("login.html", {
|
|
|
|
| 47 |
request.session["username"] = username
|
| 48 |
return RedirectResponse(url="/", status_code=302)
|
| 49 |
else:
|
| 50 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 51 |
theme = get_theme(theme_name)
|
| 52 |
return templates.TemplateResponse("login.html", {
|
| 53 |
"request": request,
|
|
|
|
| 67 |
return RedirectResponse(url=request.headers.get("referer", "/"), status_code=302)
|
| 68 |
|
| 69 |
async def dashboard_page(request: Request, _: bool = Depends(require_auth)):
|
| 70 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 71 |
theme = get_theme(theme_name)
|
| 72 |
current_user = get_current_user(request)
|
| 73 |
|
|
|
|
| 161 |
|
| 162 |
|
| 163 |
async def media_management_page(request: Request, media_type: str = "movie", _: bool = Depends(require_auth)):
|
| 164 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 165 |
theme = get_theme(theme_name)
|
| 166 |
current_user = get_current_user(request)
|
| 167 |
|
|
|
|
| 175 |
})
|
| 176 |
|
| 177 |
async def edit_media_page(request: Request, tmdb_id: int, db_index: int, media_type: str, _: bool = Depends(require_auth)):
|
| 178 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 179 |
theme = get_theme(theme_name)
|
| 180 |
current_user = get_current_user(request)
|
| 181 |
|
|
|
|
| 203 |
})
|
| 204 |
|
| 205 |
async def public_status_page(request: Request):
|
| 206 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 207 |
theme = get_theme(theme_name)
|
| 208 |
|
| 209 |
try:
|
|
|
|
| 235 |
})
|
| 236 |
|
| 237 |
async def stremio_guide_page(request: Request):
|
| 238 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 239 |
theme = get_theme(theme_name)
|
| 240 |
|
| 241 |
return templates.TemplateResponse("stremio_guide.html", {
|
|
|
|
| 247 |
})
|
| 248 |
|
| 249 |
async def admin_subscriptions_page(request: Request, _: bool = Depends(require_auth)):
|
| 250 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 251 |
theme = get_theme(theme_name)
|
| 252 |
current_user = get_current_user(request)
|
| 253 |
|
|
|
|
| 261 |
|
| 262 |
|
| 263 |
async def admin_access_page(request: Request, _: bool = Depends(require_auth)):
|
| 264 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 265 |
theme = get_theme(theme_name)
|
| 266 |
current_user = get_current_user(request)
|
| 267 |
|
|
|
|
| 276 |
|
| 277 |
|
| 278 |
async def custom_catalogs_page(request: Request, _: bool = Depends(require_auth)):
|
| 279 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 280 |
theme = get_theme(theme_name)
|
| 281 |
current_user = get_current_user(request)
|
| 282 |
|
|
|
|
| 291 |
|
| 292 |
|
| 293 |
async def tools_page(request: Request, _: bool = Depends(require_auth)):
|
| 294 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 295 |
theme = get_theme(theme_name)
|
| 296 |
current_user = get_current_user(request)
|
| 297 |
|
|
|
|
| 308 |
|
| 309 |
|
| 310 |
async def settings_page(request: Request, _: bool = Depends(require_auth)):
|
| 311 |
+
theme_name = request.session.get("theme", DEFAULT_THEME)
|
| 312 |
theme = get_theme(theme_name)
|
| 313 |
current_user = get_current_user(request)
|
| 314 |
|
Backend/fastapi/templates/access_manage.html
CHANGED
|
@@ -69,10 +69,8 @@
|
|
| 69 |
|
| 70 |
.glass-btn {
|
| 71 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
| 72 |
-
background: color-mix(in srgb, var(--card)
|
| 73 |
color: var(--text);
|
| 74 |
-
backdrop-filter: blur(14px);
|
| 75 |
-
-webkit-backdrop-filter: blur(14px);
|
| 76 |
transition: all 0.25s ease;
|
| 77 |
box-shadow: 0 8px 24px rgba(0,0,0,0.14);
|
| 78 |
}
|
|
|
|
| 69 |
|
| 70 |
.glass-btn {
|
| 71 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
| 72 |
+
background: color-mix(in srgb, var(--card) 92%, var(--bg));
|
| 73 |
color: var(--text);
|
|
|
|
|
|
|
| 74 |
transition: all 0.25s ease;
|
| 75 |
box-shadow: 0 8px 24px rgba(0,0,0,0.14);
|
| 76 |
}
|
Backend/fastapi/templates/admin_dashboard.html
CHANGED
|
@@ -5,16 +5,14 @@
|
|
| 5 |
{% block content %}
|
| 6 |
<style>
|
| 7 |
.glass-card {
|
| 8 |
-
background: color-mix(in srgb, var(--card)
|
| 9 |
border: 1px solid color-mix(in srgb, var(--border) 95%, transparent);
|
| 10 |
-
backdrop-filter: blur(22px);
|
| 11 |
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
|
| 12 |
}
|
| 13 |
|
| 14 |
.glass-card-soft {
|
| 15 |
-
background: color-mix(in srgb, var(--card)
|
| 16 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
| 17 |
-
backdrop-filter: blur(18px);
|
| 18 |
}
|
| 19 |
|
| 20 |
.section-title {
|
|
@@ -314,7 +312,7 @@
|
|
| 314 |
</div>
|
| 315 |
|
| 316 |
<div class="glass-card rounded-3xl overflow-hidden mb-6 sm:mb-8">
|
| 317 |
-
<div class="px-5 sm:px-6 lg:px-8 py-4 sm:py-5 border-b border-
|
| 318 |
<div>
|
| 319 |
<h2 class="section-title text-xl sm:text-2xl">Bot Health & Load</h2>
|
| 320 |
<p class="muted text-sm mt-1">Track stream load, average speed, and failure trends per bot.</p>
|
|
@@ -328,7 +326,7 @@
|
|
| 328 |
</div>
|
| 329 |
|
| 330 |
<div class="glass-card rounded-3xl overflow-hidden mb-6 sm:mb-8">
|
| 331 |
-
<div class="px-5 sm:px-6 lg:px-8 py-4 sm:py-5 border-b border-
|
| 332 |
<div>
|
| 333 |
<h2 class="section-title text-xl sm:text-2xl">Recent Stream Analytics</h2>
|
| 334 |
<p class="muted text-sm mt-1">Data transferred, speed, duration, and status for recent streams.</p>
|
|
@@ -372,7 +370,7 @@
|
|
| 372 |
</div>
|
| 373 |
|
| 374 |
<div class="glass-card rounded-3xl overflow-hidden">
|
| 375 |
-
<div class="px-5 sm:px-6 lg:px-8 py-4 sm:py-5 border-b border-
|
| 376 |
<div>
|
| 377 |
<h2 class="section-title text-xl sm:text-2xl">Flagged Dead Links</h2>
|
| 378 |
<p class="muted text-sm mt-1">Purge broken qualities so users no longer see dead content.</p>
|
|
|
|
| 5 |
{% block content %}
|
| 6 |
<style>
|
| 7 |
.glass-card {
|
| 8 |
+
background: color-mix(in srgb, var(--card) 94%, var(--bg));
|
| 9 |
border: 1px solid color-mix(in srgb, var(--border) 95%, transparent);
|
|
|
|
| 10 |
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
|
| 11 |
}
|
| 12 |
|
| 13 |
.glass-card-soft {
|
| 14 |
+
background: color-mix(in srgb, var(--card) 86%, var(--bg));
|
| 15 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
.section-title {
|
|
|
|
| 312 |
</div>
|
| 313 |
|
| 314 |
<div class="glass-card rounded-3xl overflow-hidden mb-6 sm:mb-8">
|
| 315 |
+
<div class="px-5 sm:px-6 lg:px-8 py-4 sm:py-5 border-b border-hairline bg-surface flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
|
| 316 |
<div>
|
| 317 |
<h2 class="section-title text-xl sm:text-2xl">Bot Health & Load</h2>
|
| 318 |
<p class="muted text-sm mt-1">Track stream load, average speed, and failure trends per bot.</p>
|
|
|
|
| 326 |
</div>
|
| 327 |
|
| 328 |
<div class="glass-card rounded-3xl overflow-hidden mb-6 sm:mb-8">
|
| 329 |
+
<div class="px-5 sm:px-6 lg:px-8 py-4 sm:py-5 border-b border-hairline bg-surface flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
|
| 330 |
<div>
|
| 331 |
<h2 class="section-title text-xl sm:text-2xl">Recent Stream Analytics</h2>
|
| 332 |
<p class="muted text-sm mt-1">Data transferred, speed, duration, and status for recent streams.</p>
|
|
|
|
| 370 |
</div>
|
| 371 |
|
| 372 |
<div class="glass-card rounded-3xl overflow-hidden">
|
| 373 |
+
<div class="px-5 sm:px-6 lg:px-8 py-4 sm:py-5 border-b border-hairline bg-surface flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
|
| 374 |
<div>
|
| 375 |
<h2 class="section-title text-xl sm:text-2xl">Flagged Dead Links</h2>
|
| 376 |
<p class="muted text-sm mt-1">Purge broken qualities so users no longer see dead content.</p>
|
Backend/fastapi/templates/base.html
CHANGED
|
@@ -8,6 +8,10 @@
|
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
<style>
|
| 12 |
:root {
|
| 13 |
color-scheme: {{ 'dark' if theme.is_dark else 'light' }};
|
|
@@ -19,30 +23,132 @@
|
|
| 19 |
--border: {{ theme.colors.border }};
|
| 20 |
--text: {{ theme.colors.text }};
|
| 21 |
--text-sec: {{ theme.colors.text_secondary }};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
body {
|
|
|
|
|
|
|
| 25 |
background-color: var(--bg);
|
| 26 |
color: var(--text);
|
| 27 |
-
background-image:
|
| 28 |
-
radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 40%),
|
| 29 |
-
radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 40%),
|
| 30 |
-
radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--card) 40%, transparent), transparent 60%);
|
| 31 |
-
background-attachment: fixed;
|
| 32 |
min-height: 100vh;
|
| 33 |
display: flex;
|
| 34 |
flex-direction: column;
|
| 35 |
}
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
.glass-panel {
|
| 38 |
-
background: color-mix(in srgb, var(--card)
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
}
|
| 43 |
|
| 44 |
.glass-pill { border-radius: 9999px; }
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
.nav-link {
|
| 47 |
color: var(--text-sec);
|
| 48 |
border-radius: 9999px;
|
|
@@ -210,6 +316,10 @@ tailwind.config = {
|
|
| 210 |
darkMode: 'class',
|
| 211 |
theme: {
|
| 212 |
extend: {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
colors: {
|
| 214 |
primary: 'var(--primary)',
|
| 215 |
secondary: 'var(--secondary)',
|
|
@@ -218,7 +328,17 @@ tailwind.config = {
|
|
| 218 |
card: 'var(--card)',
|
| 219 |
border: 'var(--border)',
|
| 220 |
text: 'var(--text)',
|
| 221 |
-
'text-secondary': 'var(--text-sec)'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
}
|
| 223 |
}
|
| 224 |
}
|
|
@@ -230,7 +350,7 @@ tailwind.config = {
|
|
| 230 |
|
| 231 |
<div id="overlay" class="fixed inset-0 z-40 opacity-0 pointer-events-none"></div>
|
| 232 |
|
| 233 |
-
<nav id="navbar" class="fixed top-6 left-1/2 -translate-x-1/2 w-[95%] max-w-6xl z-50 glass-panel glass-pill px-5 py-3 flex justify-between items-center transition-all duration-300">
|
| 234 |
|
| 235 |
<a href="/" class="flex items-center gap-3 shrink-0">
|
| 236 |
<div class="w-8 h-8 rounded-full bg-primary flex items-center justify-center shadow-[0_0_15px_var(--primary)]">
|
|
@@ -242,7 +362,7 @@ tailwind.config = {
|
|
| 242 |
</a>
|
| 243 |
|
| 244 |
{% if current_user %}
|
| 245 |
-
<div id="nav-container" class="hidden md:flex absolute left-1/2 -translate-x-1/2 items-center gap-1 p-1 bg-black/10 rounded-full border border-
|
| 246 |
<div id="active-pill" class="pointer-events-none"></div>
|
| 247 |
<a href="/" class="nav-link">Home</a>
|
| 248 |
<a href="/media/manage" class="nav-link">Media</a>
|
|
@@ -257,7 +377,7 @@ tailwind.config = {
|
|
| 257 |
|
| 258 |
<div class="flex items-center gap-3">
|
| 259 |
{% if current_user %}
|
| 260 |
-
<button id="menu-btn" class="md:hidden w-10 h-10 flex items-center justify-center text-xl hover:bg-
|
| 261 |
<i id="menu-icon" class="fa-solid fa-bars"></i>
|
| 262 |
</button>
|
| 263 |
|
|
@@ -267,7 +387,7 @@ tailwind.config = {
|
|
| 267 |
</button>
|
| 268 |
|
| 269 |
<div id="user-dropdown" class="absolute right-0 top-14 w-72 glass-panel rounded-2xl p-4 opacity-0 scale-95 pointer-events-none transition-all duration-200 origin-top-right z-50">
|
| 270 |
-
<div class="mb-3 border-b border-
|
| 271 |
<p class="text-sm font-bold text-text">{{ current_user }}</p>
|
| 272 |
<p class="text-[10px] text-green-400 font-bold uppercase tracking-wider flex items-center gap-1">
|
| 273 |
<span class="w-1.5 h-1.5 rounded-full bg-green-400 animate-pulse"></span> Online
|
|
@@ -454,11 +574,23 @@ if(btn) btn.onclick = toggleMenu;
|
|
| 454 |
if(userBtn) userBtn.onclick = toggleUser;
|
| 455 |
overlay.onclick = () => { closeMenu(); closeUser(); };
|
| 456 |
|
|
|
|
|
|
|
| 457 |
window.addEventListener("scroll", () => {
|
| 458 |
if (isMenuOpen) closeMenu();
|
| 459 |
if (isUserOpen) closeUser();
|
| 460 |
-
|
| 461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 462 |
|
| 463 |
document.addEventListener("keydown", e => {
|
| 464 |
if (e.key === "Escape") { closeMenu(); closeUser(); }
|
|
|
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
|
| 10 |
|
| 11 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 12 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 13 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
| 14 |
+
|
| 15 |
<style>
|
| 16 |
:root {
|
| 17 |
color-scheme: {{ 'dark' if theme.is_dark else 'light' }};
|
|
|
|
| 23 |
--border: {{ theme.colors.border }};
|
| 24 |
--text: {{ theme.colors.text }};
|
| 25 |
--text-sec: {{ theme.colors.text_secondary }};
|
| 26 |
+
|
| 27 |
+
--surface: color-mix(in srgb, var(--text) 5%, transparent);
|
| 28 |
+
--surface-2: color-mix(in srgb, var(--text) 9%, transparent);
|
| 29 |
+
--surface-3: color-mix(in srgb, var(--text) 14%, transparent);
|
| 30 |
+
--hairline: color-mix(in srgb, var(--text) 12%, transparent);
|
| 31 |
+
--hairline-strong: color-mix(in srgb, var(--text) 20%, transparent);
|
| 32 |
+
--muted: color-mix(in srgb, var(--text) 42%, transparent);
|
| 33 |
+
--ring: color-mix(in srgb, var(--primary) 35%, transparent);
|
| 34 |
+
--shadow-color: {{ '0,0,0' if theme.is_dark else '15,23,42' }};
|
| 35 |
+
--shadow-soft: 0 10px 30px rgba(var(--shadow-color), {{ '0.35' if theme.is_dark else '0.10' }});
|
| 36 |
+
--shadow-strong: 0 24px 60px rgba(var(--shadow-color), {{ '0.45' if theme.is_dark else '0.16' }});
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
html { scroll-behavior: smooth; }
|
| 40 |
+
|
| 41 |
+
@media (prefers-reduced-motion: reduce) {
|
| 42 |
+
html { scroll-behavior: auto; }
|
| 43 |
+
*, *::before, *::after {
|
| 44 |
+
animation-duration: .001ms !important;
|
| 45 |
+
animation-iteration-count: 1 !important;
|
| 46 |
+
transition-duration: .001ms !important;
|
| 47 |
+
}
|
| 48 |
}
|
| 49 |
|
| 50 |
body {
|
| 51 |
+
font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
| 52 |
+
-webkit-font-smoothing: antialiased;
|
| 53 |
background-color: var(--bg);
|
| 54 |
color: var(--text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
min-height: 100vh;
|
| 56 |
display: flex;
|
| 57 |
flex-direction: column;
|
| 58 |
}
|
| 59 |
|
| 60 |
+
body::before {
|
| 61 |
+
content: "";
|
| 62 |
+
position: fixed;
|
| 63 |
+
inset: 0;
|
| 64 |
+
z-index: -1;
|
| 65 |
+
pointer-events: none;
|
| 66 |
+
background-image:
|
| 67 |
+
radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 40%),
|
| 68 |
+
radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 40%),
|
| 69 |
+
radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--card) 40%, transparent), transparent 60%);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
.glass-panel {
|
| 73 |
+
background: color-mix(in srgb, var(--card) 90%, var(--bg));
|
| 74 |
+
border: 1px solid var(--hairline);
|
| 75 |
+
box-shadow: var(--shadow-soft);
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.glass-nav {
|
| 79 |
+
background: color-mix(in srgb, var(--card) 78%, transparent);
|
| 80 |
+
backdrop-filter: blur(12px);
|
| 81 |
+
-webkit-backdrop-filter: blur(12px);
|
| 82 |
}
|
| 83 |
|
| 84 |
.glass-pill { border-radius: 9999px; }
|
| 85 |
|
| 86 |
+
.surface-card {
|
| 87 |
+
background: color-mix(in srgb, var(--card) 92%, var(--bg));
|
| 88 |
+
border: 1px solid var(--hairline);
|
| 89 |
+
border-radius: 1.5rem;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.btn-primary {
|
| 93 |
+
background: var(--primary);
|
| 94 |
+
color: var(--bg);
|
| 95 |
+
font-weight: 700;
|
| 96 |
+
border-radius: 1rem;
|
| 97 |
+
transition: filter .2s ease, transform .12s ease, box-shadow .2s ease;
|
| 98 |
+
box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 30%, transparent);
|
| 99 |
+
}
|
| 100 |
+
.btn-primary:hover { filter: brightness(1.08); }
|
| 101 |
+
.btn-primary:active { transform: scale(.97); }
|
| 102 |
+
|
| 103 |
+
.btn-ghost {
|
| 104 |
+
background: var(--surface);
|
| 105 |
+
color: var(--text);
|
| 106 |
+
border: 1px solid var(--hairline);
|
| 107 |
+
border-radius: 1rem;
|
| 108 |
+
font-weight: 700;
|
| 109 |
+
transition: background .2s ease, border-color .2s ease;
|
| 110 |
+
}
|
| 111 |
+
.btn-ghost:hover { background: var(--surface-2); border-color: var(--hairline-strong); }
|
| 112 |
+
|
| 113 |
+
.badge {
|
| 114 |
+
display: inline-flex;
|
| 115 |
+
align-items: center;
|
| 116 |
+
gap: .35rem;
|
| 117 |
+
font-size: .65rem;
|
| 118 |
+
font-weight: 700;
|
| 119 |
+
text-transform: uppercase;
|
| 120 |
+
letter-spacing: .12em;
|
| 121 |
+
padding: .25rem .6rem;
|
| 122 |
+
border-radius: 9999px;
|
| 123 |
+
background: color-mix(in srgb, var(--primary) 14%, transparent);
|
| 124 |
+
color: var(--primary);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.field {
|
| 128 |
+
width: 100%;
|
| 129 |
+
background: color-mix(in srgb, var(--card) 88%, var(--bg));
|
| 130 |
+
color: var(--text);
|
| 131 |
+
border: 1px solid var(--hairline);
|
| 132 |
+
border-radius: 1rem;
|
| 133 |
+
transition: border-color .2s ease, box-shadow .2s ease;
|
| 134 |
+
}
|
| 135 |
+
.field:focus {
|
| 136 |
+
outline: none;
|
| 137 |
+
border-color: var(--primary);
|
| 138 |
+
box-shadow: 0 0 0 3px var(--ring);
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
|
| 142 |
+
|
| 143 |
+
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--text); }
|
| 144 |
+
|
| 145 |
+
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
|
| 146 |
+
|
| 147 |
+
* { scrollbar-width: thin; scrollbar-color: var(--hairline-strong) transparent; }
|
| 148 |
+
*::-webkit-scrollbar { width: 10px; height: 10px; }
|
| 149 |
+
*::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 9999px; border: 2px solid transparent; background-clip: padding-box; }
|
| 150 |
+
*::-webkit-scrollbar-thumb:hover { background: var(--muted); }
|
| 151 |
+
|
| 152 |
.nav-link {
|
| 153 |
color: var(--text-sec);
|
| 154 |
border-radius: 9999px;
|
|
|
|
| 316 |
darkMode: 'class',
|
| 317 |
theme: {
|
| 318 |
extend: {
|
| 319 |
+
fontFamily: {
|
| 320 |
+
sans: ['Inter', 'system-ui', 'sans-serif'],
|
| 321 |
+
mono: ['"JetBrains Mono"', 'ui-monospace', 'monospace']
|
| 322 |
+
},
|
| 323 |
colors: {
|
| 324 |
primary: 'var(--primary)',
|
| 325 |
secondary: 'var(--secondary)',
|
|
|
|
| 328 |
card: 'var(--card)',
|
| 329 |
border: 'var(--border)',
|
| 330 |
text: 'var(--text)',
|
| 331 |
+
'text-secondary': 'var(--text-sec)',
|
| 332 |
+
surface: 'var(--surface)',
|
| 333 |
+
'surface-2': 'var(--surface-2)',
|
| 334 |
+
'surface-3': 'var(--surface-3)',
|
| 335 |
+
hairline: 'var(--hairline)',
|
| 336 |
+
'hairline-strong': 'var(--hairline-strong)',
|
| 337 |
+
muted: 'var(--muted)'
|
| 338 |
+
},
|
| 339 |
+
boxShadow: {
|
| 340 |
+
soft: 'var(--shadow-soft)',
|
| 341 |
+
strong: 'var(--shadow-strong)'
|
| 342 |
}
|
| 343 |
}
|
| 344 |
}
|
|
|
|
| 350 |
|
| 351 |
<div id="overlay" class="fixed inset-0 z-40 opacity-0 pointer-events-none"></div>
|
| 352 |
|
| 353 |
+
<nav id="navbar" class="fixed top-6 left-1/2 -translate-x-1/2 w-[95%] max-w-6xl z-50 glass-panel glass-nav glass-pill px-5 py-3 flex justify-between items-center transition-all duration-300">
|
| 354 |
|
| 355 |
<a href="/" class="flex items-center gap-3 shrink-0">
|
| 356 |
<div class="w-8 h-8 rounded-full bg-primary flex items-center justify-center shadow-[0_0_15px_var(--primary)]">
|
|
|
|
| 362 |
</a>
|
| 363 |
|
| 364 |
{% if current_user %}
|
| 365 |
+
<div id="nav-container" class="hidden md:flex absolute left-1/2 -translate-x-1/2 items-center gap-1 p-1 bg-black/10 rounded-full border border-hairline">
|
| 366 |
<div id="active-pill" class="pointer-events-none"></div>
|
| 367 |
<a href="/" class="nav-link">Home</a>
|
| 368 |
<a href="/media/manage" class="nav-link">Media</a>
|
|
|
|
| 377 |
|
| 378 |
<div class="flex items-center gap-3">
|
| 379 |
{% if current_user %}
|
| 380 |
+
<button id="menu-btn" class="md:hidden w-10 h-10 flex items-center justify-center text-xl hover:bg-surface-2 rounded-full transition">
|
| 381 |
<i id="menu-icon" class="fa-solid fa-bars"></i>
|
| 382 |
</button>
|
| 383 |
|
|
|
|
| 387 |
</button>
|
| 388 |
|
| 389 |
<div id="user-dropdown" class="absolute right-0 top-14 w-72 glass-panel rounded-2xl p-4 opacity-0 scale-95 pointer-events-none transition-all duration-200 origin-top-right z-50">
|
| 390 |
+
<div class="mb-3 border-b border-hairline pb-3">
|
| 391 |
<p class="text-sm font-bold text-text">{{ current_user }}</p>
|
| 392 |
<p class="text-[10px] text-green-400 font-bold uppercase tracking-wider flex items-center gap-1">
|
| 393 |
<span class="w-1.5 h-1.5 rounded-full bg-green-400 animate-pulse"></span> Online
|
|
|
|
| 574 |
if(userBtn) userBtn.onclick = toggleUser;
|
| 575 |
overlay.onclick = () => { closeMenu(); closeUser(); };
|
| 576 |
|
| 577 |
+
let scrollTicking = false;
|
| 578 |
+
let navScrolled = false;
|
| 579 |
window.addEventListener("scroll", () => {
|
| 580 |
if (isMenuOpen) closeMenu();
|
| 581 |
if (isUserOpen) closeUser();
|
| 582 |
+
if (!scrollTicking) {
|
| 583 |
+
scrollTicking = true;
|
| 584 |
+
requestAnimationFrame(() => {
|
| 585 |
+
const past = window.scrollY > 20;
|
| 586 |
+
if (past !== navScrolled) {
|
| 587 |
+
navScrolled = past;
|
| 588 |
+
navbar.classList.toggle("nav-scrolled", past);
|
| 589 |
+
}
|
| 590 |
+
scrollTicking = false;
|
| 591 |
+
});
|
| 592 |
+
}
|
| 593 |
+
}, { passive: true });
|
| 594 |
|
| 595 |
document.addEventListener("keydown", e => {
|
| 596 |
if (e.key === "Escape") { closeMenu(); closeUser(); }
|
Backend/fastapi/templates/custom_catalogs.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
<style>
|
| 7 |
.catalog-page {
|
| 8 |
--soft-bg: color-mix(in srgb, var(--bg) 78%, transparent);
|
| 9 |
-
--card-bg: color-mix(in srgb, var(--card)
|
| 10 |
--card-bg-strong: color-mix(in srgb, var(--card) 82%, transparent);
|
| 11 |
--line: color-mix(in srgb, var(--border) 90%, transparent);
|
| 12 |
--primary-soft: color-mix(in srgb, var(--primary) 15%, transparent);
|
|
@@ -18,7 +18,6 @@
|
|
| 18 |
overflow: hidden;
|
| 19 |
background: var(--card-bg);
|
| 20 |
border: 1px solid var(--line);
|
| 21 |
-
backdrop-filter: blur(22px);
|
| 22 |
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
|
| 23 |
}
|
| 24 |
|
|
|
|
| 6 |
<style>
|
| 7 |
.catalog-page {
|
| 8 |
--soft-bg: color-mix(in srgb, var(--bg) 78%, transparent);
|
| 9 |
+
--card-bg: color-mix(in srgb, var(--card) 92%, var(--bg));
|
| 10 |
--card-bg-strong: color-mix(in srgb, var(--card) 82%, transparent);
|
| 11 |
--line: color-mix(in srgb, var(--border) 90%, transparent);
|
| 12 |
--primary-soft: color-mix(in srgb, var(--primary) 15%, transparent);
|
|
|
|
| 18 |
overflow: hidden;
|
| 19 |
background: var(--card-bg);
|
| 20 |
border: 1px solid var(--line);
|
|
|
|
| 21 |
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
|
| 22 |
}
|
| 23 |
|
Backend/fastapi/templates/dashboard.html
CHANGED
|
@@ -33,7 +33,7 @@
|
|
| 33 |
</div>
|
| 34 |
|
| 35 |
<div class="glass-panel p-5 rounded-[2rem] flex items-center gap-4">
|
| 36 |
-
<div class="w-12 h-12 rounded-2xl bg-accent/10 flex items-center justify-center text-accent shadow-[
|
| 37 |
<i class="fa-solid fa-robot"></i>
|
| 38 |
</div>
|
| 39 |
<div>
|
|
@@ -53,7 +53,7 @@
|
|
| 53 |
</div>
|
| 54 |
|
| 55 |
<div class="glass-panel p-5 rounded-[2rem] flex items-center gap-4">
|
| 56 |
-
<div class="w-12 h-12 rounded-2xl bg-
|
| 57 |
<i class="fa-solid fa-code-branch"></i>
|
| 58 |
</div>
|
| 59 |
<div>
|
|
@@ -72,7 +72,7 @@
|
|
| 72 |
|
| 73 |
<div class="grid md:grid-cols-2 gap-4">
|
| 74 |
{% for db_stat in system_stats.databases %}
|
| 75 |
-
<div class="glass-panel p-6 rounded-[2rem] border-
|
| 76 |
<div class="flex justify-between items-start mb-6">
|
| 77 |
<h4 class="font-bold text-text">{{ db_stat.db_name.replace("storage_", "Node ") }}</h4>
|
| 78 |
<span class="text-[10px] bg-primary/10 text-primary px-2 py-1 rounded-lg font-bold uppercase">Online</span>
|
|
@@ -89,7 +89,7 @@
|
|
| 89 |
<span class="text-text-secondary">Disk Usage</span>
|
| 90 |
<span class="text-primary">{{ "%.1f"|format(db_stat.storageSize / 1024 / 1024) }} MB</span>
|
| 91 |
</div>
|
| 92 |
-
<div class="w-full h-1.5 bg-
|
| 93 |
{% set storage_percent = (db_stat.storageSize / (500 * 1024 * 1024) * 100) | round %}
|
| 94 |
<div class="h-full bg-gradient-to-r from-primary to-accent transition-all duration-1000" style="width: {{ storage_percent }}%"></div>
|
| 95 |
</div>
|
|
@@ -101,7 +101,7 @@
|
|
| 101 |
</section>
|
| 102 |
|
| 103 |
<section class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
| 104 |
-
<a href="/media/manage?media_type=movie" class="glass-panel p-6 rounded-[2rem] hover:bg-primary/5 transition-all group border border-
|
| 105 |
<div class="flex items-center gap-4">
|
| 106 |
<div class="w-14 h-14 rounded-2xl bg-primary/10 flex items-center justify-center text-primary group-hover:scale-110 transition-transform">
|
| 107 |
<i class="fa-solid fa-film text-2xl"></i>
|
|
@@ -110,11 +110,11 @@
|
|
| 110 |
<h4 class="font-bold text-text">Manage Movies</h4>
|
| 111 |
<p class="text-xs text-text-secondary">Organize and edit library</p>
|
| 112 |
</div>
|
| 113 |
-
<i class="fa-solid fa-chevron-right ml-auto text-
|
| 114 |
</div>
|
| 115 |
</a>
|
| 116 |
|
| 117 |
-
<a href="/media/manage?media_type=tv" class="glass-panel p-6 rounded-[2rem] hover:bg-accent/5 transition-all group border border-
|
| 118 |
<div class="flex items-center gap-4">
|
| 119 |
<div class="w-14 h-14 rounded-2xl bg-accent/10 flex items-center justify-center text-accent group-hover:scale-110 transition-transform">
|
| 120 |
<i class="fa-solid fa-tv text-2xl"></i>
|
|
@@ -123,7 +123,7 @@
|
|
| 123 |
<h4 class="font-bold text-text">Manage TV Shows</h4>
|
| 124 |
<p class="text-xs text-text-secondary">Handle series and episodes</p>
|
| 125 |
</div>
|
| 126 |
-
<i class="fa-solid fa-chevron-right ml-auto text-
|
| 127 |
</div>
|
| 128 |
</a>
|
| 129 |
</section>
|
|
@@ -131,7 +131,7 @@
|
|
| 131 |
|
| 132 |
<div class="lg:col-span-1">
|
| 133 |
<div class="glass-panel rounded-[2.5rem] overflow-hidden h-full">
|
| 134 |
-
<div class="p-6 border-b border-
|
| 135 |
<div class="flex items-center justify-between gap-3 mb-2">
|
| 136 |
<h3 class="flex items-center gap-2 text-lg font-bold">
|
| 137 |
<i class="fa-solid fa-circle-play text-red-500 animate-pulse"></i> Live Network
|
|
@@ -180,7 +180,7 @@
|
|
| 180 |
</span>
|
| 181 |
</div>
|
| 182 |
|
| 183 |
-
<div class="grid grid-cols-2 gap-3 mt-4 pt-4 border-t border-
|
| 184 |
<div class="text-center">
|
| 185 |
<p class="text-[9px] text-text-secondary uppercase tracking-widest font-bold">Speed</p>
|
| 186 |
<p class="text-xs font-bold text-text">{{ "%.3f"|format(stream.avg_mbps or 0) }} MB/s</p>
|
|
@@ -199,7 +199,7 @@
|
|
| 199 |
</div>
|
| 200 |
</div>
|
| 201 |
|
| 202 |
-
<div class="mt-4 pt-4 border-t border-
|
| 203 |
<div class="flex items-center justify-between text-xs gap-3">
|
| 204 |
<span class="text-text-secondary">Started</span>
|
| 205 |
<span class="text-text text-right truncate max-w-[65%] live-started" data-start-ts="{{ stream.start_ts or 0 }}">—</span>
|
|
@@ -212,8 +212,8 @@
|
|
| 212 |
</div>
|
| 213 |
{% endfor %}
|
| 214 |
{% else %}
|
| 215 |
-
<div class="glass-panel p-8 rounded-[2rem] text-center border-dashed border-
|
| 216 |
-
<i class="fa-solid fa-satellite-dish text-4xl text-
|
| 217 |
<p class="text-sm text-text-secondary font-medium">No active streams right now</p>
|
| 218 |
<p class="text-xs text-text-secondary mt-1">The live network is idle at the moment.</p>
|
| 219 |
</div>
|
|
@@ -227,7 +227,7 @@
|
|
| 227 |
|
| 228 |
<section class="mt-12">
|
| 229 |
<div class="glass-panel rounded-[2.5rem] overflow-hidden">
|
| 230 |
-
<div class="p-5 sm:p-8 border-b border-
|
| 231 |
<div>
|
| 232 |
<h3 class="text-lg sm:text-xl font-bold text-text">Access Management</h3>
|
| 233 |
<p class="text-xs sm:text-sm text-text-secondary">Control API tokens, daily quotas, and monthly quotas</p>
|
|
@@ -238,29 +238,29 @@
|
|
| 238 |
</button>
|
| 239 |
</div>
|
| 240 |
|
| 241 |
-
<div id="create-form-container" class="hidden p-5 sm:p-8 bg-
|
| 242 |
<form onsubmit="createToken(event)" class="grid grid-cols-1 md:grid-cols-5 gap-4 items-end">
|
| 243 |
<div class="md:col-span-2">
|
| 244 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-2 mb-1 block">Token Alias</label>
|
| 245 |
<input type="text" id="token-name" placeholder="E.g., Living Room TV" required
|
| 246 |
-
class="w-full px-4 py-3 rounded-xl border border-
|
| 247 |
</div>
|
| 248 |
|
| 249 |
<div>
|
| 250 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-2 mb-1 block">Daily (GB)</label>
|
| 251 |
<input type="number" id="daily-limit" value="0" step="0.1" min="0"
|
| 252 |
-
class="w-full px-4 py-3 rounded-xl border border-
|
| 253 |
</div>
|
| 254 |
|
| 255 |
<div>
|
| 256 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-2 mb-1 block">Monthly (GB)</label>
|
| 257 |
<input type="number" id="monthly-limit" value="0" step="0.1" min="0"
|
| 258 |
-
class="w-full px-4 py-3 rounded-xl border border-
|
| 259 |
</div>
|
| 260 |
|
| 261 |
<div class="flex gap-2">
|
| 262 |
<button type="submit" class="flex-1 py-3 bg-primary text-background font-bold rounded-xl text-sm">Create</button>
|
| 263 |
-
<button type="button" onclick="toggleCreateForm()" class="px-4 py-3 bg-
|
| 264 |
<i class="fa-solid fa-xmark"></i>
|
| 265 |
</button>
|
| 266 |
</div>
|
|
@@ -270,7 +270,7 @@
|
|
| 270 |
<div class="overflow-x-auto hidden md:block">
|
| 271 |
<table class="w-full text-left">
|
| 272 |
<thead>
|
| 273 |
-
<tr class="bg-
|
| 274 |
<th class="py-5 px-8">Client Name</th>
|
| 275 |
<th class="py-5 px-8">Usage</th>
|
| 276 |
<th class="py-5 px-8">Limits</th>
|
|
@@ -278,9 +278,9 @@
|
|
| 278 |
<th class="py-5 px-8 text-right">Actions</th>
|
| 279 |
</tr>
|
| 280 |
</thead>
|
| 281 |
-
<tbody class="divide-y divide-
|
| 282 |
{% for token in api_tokens %}
|
| 283 |
-
<tr class="group hover:bg-
|
| 284 |
<td class="py-6 px-8">
|
| 285 |
<p class="font-bold text-text">{{ token.name }}</p>
|
| 286 |
<p class="text-[10px] text-text-secondary uppercase mt-1">
|
|
@@ -312,7 +312,7 @@
|
|
| 312 |
|
| 313 |
<td class="py-6 px-8">
|
| 314 |
<button onclick='copyUrl({{ ((request.base_url|string).replace("http:", "https:") ~ "stremio/" ~ token.token ~ "/manifest.json")|tojson }})'
|
| 315 |
-
class="flex items-center gap-2 px-3 py-1.5 bg-background/50 rounded-lg border border-
|
| 316 |
<i class="fa-solid fa-link text-[8px]"></i> COPY MANIFEST
|
| 317 |
</button>
|
| 318 |
</td>
|
|
@@ -320,11 +320,11 @@
|
|
| 320 |
<td class="py-6 px-8 text-right">
|
| 321 |
<div class="flex justify-end gap-2">
|
| 322 |
<button onclick='openEditModal({{ token.token|tojson }}, {{ token.limits.daily_limit_gb|default(0)|tojson }}, {{ token.limits.monthly_limit_gb|default(0)|tojson }})'
|
| 323 |
-
class="w-8 h-8 rounded-lg bg-
|
| 324 |
<i class="fa-solid fa-pen-to-square text-xs"></i>
|
| 325 |
</button>
|
| 326 |
<button onclick='revokeToken({{ token.token|tojson }})'
|
| 327 |
-
class="w-8 h-8 rounded-lg bg-
|
| 328 |
<i class="fa-solid fa-trash text-xs"></i>
|
| 329 |
</button>
|
| 330 |
</div>
|
|
@@ -343,7 +343,7 @@
|
|
| 343 |
</table>
|
| 344 |
</div>
|
| 345 |
|
| 346 |
-
<div class="md:hidden divide-y divide-
|
| 347 |
{% for token in api_tokens %}
|
| 348 |
<div class="p-5 space-y-4" id="token-card-{{ loop.index0 }}">
|
| 349 |
<div class="flex items-start justify-between gap-3">
|
|
@@ -355,17 +355,17 @@
|
|
| 355 |
</div>
|
| 356 |
<div class="flex gap-2 shrink-0">
|
| 357 |
<button onclick='openEditModal({{ token.token|tojson }}, {{ token.limits.daily_limit_gb|default(0)|tojson }}, {{ token.limits.monthly_limit_gb|default(0)|tojson }})'
|
| 358 |
-
class="w-9 h-9 rounded-lg bg-
|
| 359 |
<i class="fa-solid fa-pen-to-square text-xs"></i>
|
| 360 |
</button>
|
| 361 |
<button onclick='revokeToken({{ token.token|tojson }})'
|
| 362 |
-
class="w-9 h-9 rounded-lg bg-
|
| 363 |
<i class="fa-solid fa-trash text-xs"></i>
|
| 364 |
</button>
|
| 365 |
</div>
|
| 366 |
</div>
|
| 367 |
|
| 368 |
-
<div class="grid grid-cols-2 gap-3 pt-3 border-t border-
|
| 369 |
<div>
|
| 370 |
<p class="text-[10px] uppercase font-bold tracking-widest text-text-secondary mb-1">Daily</p>
|
| 371 |
<p class="text-xs font-medium text-text">
|
|
@@ -383,7 +383,7 @@
|
|
| 383 |
</div>
|
| 384 |
|
| 385 |
<button onclick='copyUrl({{ ((request.base_url|string).replace("http:", "https:") ~ "stremio/" ~ token.token ~ "/manifest.json")|tojson }})'
|
| 386 |
-
class="w-full flex items-center justify-center gap-2 px-3 py-2.5 bg-background/50 rounded-xl border border-
|
| 387 |
<i class="fa-solid fa-link text-[8px]"></i> COPY MANIFEST
|
| 388 |
</button>
|
| 389 |
</div>
|
|
@@ -400,7 +400,7 @@
|
|
| 400 |
</div>
|
| 401 |
|
| 402 |
<div id="edit-modal" class="fixed inset-0 bg-background/80 backdrop-blur-md hidden flex items-center justify-center z-50 p-4">
|
| 403 |
-
<div class="glass-panel rounded-[2rem] p-8 w-full max-w-md border border-
|
| 404 |
<h3 class="text-xl font-bold mb-2">Edit Limits</h3>
|
| 405 |
<p class="text-sm text-text-secondary mb-6">Modify daily and monthly data quotas for this token.</p>
|
| 406 |
|
|
@@ -409,17 +409,17 @@
|
|
| 409 |
<div>
|
| 410 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-1 mb-1 block">Daily Limit (GB)</label>
|
| 411 |
<input type="number" id="edit-daily" step="0.1" min="0"
|
| 412 |
-
class="w-full px-4 py-3 rounded-xl border border-
|
| 413 |
</div>
|
| 414 |
<div>
|
| 415 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-1 mb-1 block">Monthly Limit (GB)</label>
|
| 416 |
<input type="number" id="edit-monthly" step="0.1" min="0"
|
| 417 |
-
class="w-full px-4 py-3 rounded-xl border border-
|
| 418 |
</div>
|
| 419 |
</div>
|
| 420 |
|
| 421 |
<div class="mt-8 flex gap-3">
|
| 422 |
-
<button onclick="closeEditModal()" class="flex-1 py-3 bg-
|
| 423 |
<button onclick="saveTokenLimits()" class="flex-1 py-3 bg-primary text-background rounded-xl font-bold transition-all">Save Changes</button>
|
| 424 |
</div>
|
| 425 |
</div>
|
|
@@ -428,7 +428,7 @@
|
|
| 428 |
|
| 429 |
<style>
|
| 430 |
.shadow-glow {
|
| 431 |
-
filter: drop-shadow(0 0 8px
|
| 432 |
}
|
| 433 |
|
| 434 |
.stream-card {
|
|
@@ -771,7 +771,7 @@
|
|
| 771 |
</span>
|
| 772 |
</div>
|
| 773 |
|
| 774 |
-
<div class="grid grid-cols-2 gap-3 mt-4 pt-4 border-t border-
|
| 775 |
<div class="text-center">
|
| 776 |
<p class="text-[9px] text-text-secondary uppercase tracking-widest font-bold">Speed</p>
|
| 777 |
<p class="text-xs font-bold text-text">${avgSpeed}</p>
|
|
@@ -790,7 +790,7 @@
|
|
| 790 |
</div>
|
| 791 |
</div>
|
| 792 |
|
| 793 |
-
<div class="mt-4 pt-4 border-t border-
|
| 794 |
<div class="flex items-center justify-between text-xs gap-3">
|
| 795 |
<span class="text-text-secondary">Stream ID</span>
|
| 796 |
<span class="font-mono text-text text-right truncate max-w-[65%]">${streamId}</span>
|
|
@@ -806,8 +806,8 @@
|
|
| 806 |
|
| 807 |
function renderEmptyState(icon, title, subtitle) {
|
| 808 |
return `
|
| 809 |
-
<div class="glass-panel p-8 rounded-[2rem] text-center border-dashed border-
|
| 810 |
-
<i class="${icon} text-4xl text-
|
| 811 |
<p class="text-sm text-text-secondary font-medium">${escapeHtml(title)}</p>
|
| 812 |
<p class="text-xs text-text-secondary mt-1">${escapeHtml(subtitle)}</p>
|
| 813 |
</div>
|
|
|
|
| 33 |
</div>
|
| 34 |
|
| 35 |
<div class="glass-panel p-5 rounded-[2rem] flex items-center gap-4">
|
| 36 |
+
<div class="w-12 h-12 rounded-2xl bg-accent/10 flex items-center justify-center text-accent shadow-[0_0_15px_color-mix(in_srgb,var(--accent)_35%,transparent)]">
|
| 37 |
<i class="fa-solid fa-robot"></i>
|
| 38 |
</div>
|
| 39 |
<div>
|
|
|
|
| 53 |
</div>
|
| 54 |
|
| 55 |
<div class="glass-panel p-5 rounded-[2rem] flex items-center gap-4">
|
| 56 |
+
<div class="w-12 h-12 rounded-2xl bg-surface flex items-center justify-center text-text-secondary">
|
| 57 |
<i class="fa-solid fa-code-branch"></i>
|
| 58 |
</div>
|
| 59 |
<div>
|
|
|
|
| 72 |
|
| 73 |
<div class="grid md:grid-cols-2 gap-4">
|
| 74 |
{% for db_stat in system_stats.databases %}
|
| 75 |
+
<div class="glass-panel p-6 rounded-[2rem] border-hairline bg-card/10">
|
| 76 |
<div class="flex justify-between items-start mb-6">
|
| 77 |
<h4 class="font-bold text-text">{{ db_stat.db_name.replace("storage_", "Node ") }}</h4>
|
| 78 |
<span class="text-[10px] bg-primary/10 text-primary px-2 py-1 rounded-lg font-bold uppercase">Online</span>
|
|
|
|
| 89 |
<span class="text-text-secondary">Disk Usage</span>
|
| 90 |
<span class="text-primary">{{ "%.1f"|format(db_stat.storageSize / 1024 / 1024) }} MB</span>
|
| 91 |
</div>
|
| 92 |
+
<div class="w-full h-1.5 bg-surface rounded-full overflow-hidden">
|
| 93 |
{% set storage_percent = (db_stat.storageSize / (500 * 1024 * 1024) * 100) | round %}
|
| 94 |
<div class="h-full bg-gradient-to-r from-primary to-accent transition-all duration-1000" style="width: {{ storage_percent }}%"></div>
|
| 95 |
</div>
|
|
|
|
| 101 |
</section>
|
| 102 |
|
| 103 |
<section class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
| 104 |
+
<a href="/media/manage?media_type=movie" class="glass-panel p-6 rounded-[2rem] hover:bg-primary/5 transition-all group border border-hairline">
|
| 105 |
<div class="flex items-center gap-4">
|
| 106 |
<div class="w-14 h-14 rounded-2xl bg-primary/10 flex items-center justify-center text-primary group-hover:scale-110 transition-transform">
|
| 107 |
<i class="fa-solid fa-film text-2xl"></i>
|
|
|
|
| 110 |
<h4 class="font-bold text-text">Manage Movies</h4>
|
| 111 |
<p class="text-xs text-text-secondary">Organize and edit library</p>
|
| 112 |
</div>
|
| 113 |
+
<i class="fa-solid fa-chevron-right ml-auto text-muted group-hover:text-primary group-hover:translate-x-1 transition-all"></i>
|
| 114 |
</div>
|
| 115 |
</a>
|
| 116 |
|
| 117 |
+
<a href="/media/manage?media_type=tv" class="glass-panel p-6 rounded-[2rem] hover:bg-accent/5 transition-all group border border-hairline">
|
| 118 |
<div class="flex items-center gap-4">
|
| 119 |
<div class="w-14 h-14 rounded-2xl bg-accent/10 flex items-center justify-center text-accent group-hover:scale-110 transition-transform">
|
| 120 |
<i class="fa-solid fa-tv text-2xl"></i>
|
|
|
|
| 123 |
<h4 class="font-bold text-text">Manage TV Shows</h4>
|
| 124 |
<p class="text-xs text-text-secondary">Handle series and episodes</p>
|
| 125 |
</div>
|
| 126 |
+
<i class="fa-solid fa-chevron-right ml-auto text-muted group-hover:text-accent group-hover:translate-x-1 transition-all"></i>
|
| 127 |
</div>
|
| 128 |
</a>
|
| 129 |
</section>
|
|
|
|
| 131 |
|
| 132 |
<div class="lg:col-span-1">
|
| 133 |
<div class="glass-panel rounded-[2.5rem] overflow-hidden h-full">
|
| 134 |
+
<div class="p-6 border-b border-hairline">
|
| 135 |
<div class="flex items-center justify-between gap-3 mb-2">
|
| 136 |
<h3 class="flex items-center gap-2 text-lg font-bold">
|
| 137 |
<i class="fa-solid fa-circle-play text-red-500 animate-pulse"></i> Live Network
|
|
|
|
| 180 |
</span>
|
| 181 |
</div>
|
| 182 |
|
| 183 |
+
<div class="grid grid-cols-2 gap-3 mt-4 pt-4 border-t border-hairline">
|
| 184 |
<div class="text-center">
|
| 185 |
<p class="text-[9px] text-text-secondary uppercase tracking-widest font-bold">Speed</p>
|
| 186 |
<p class="text-xs font-bold text-text">{{ "%.3f"|format(stream.avg_mbps or 0) }} MB/s</p>
|
|
|
|
| 199 |
</div>
|
| 200 |
</div>
|
| 201 |
|
| 202 |
+
<div class="mt-4 pt-4 border-t border-hairline space-y-2">
|
| 203 |
<div class="flex items-center justify-between text-xs gap-3">
|
| 204 |
<span class="text-text-secondary">Started</span>
|
| 205 |
<span class="text-text text-right truncate max-w-[65%] live-started" data-start-ts="{{ stream.start_ts or 0 }}">—</span>
|
|
|
|
| 212 |
</div>
|
| 213 |
{% endfor %}
|
| 214 |
{% else %}
|
| 215 |
+
<div class="glass-panel p-8 rounded-[2rem] text-center border-dashed border-hairline">
|
| 216 |
+
<i class="fa-solid fa-satellite-dish text-4xl text-muted mb-3"></i>
|
| 217 |
<p class="text-sm text-text-secondary font-medium">No active streams right now</p>
|
| 218 |
<p class="text-xs text-text-secondary mt-1">The live network is idle at the moment.</p>
|
| 219 |
</div>
|
|
|
|
| 227 |
|
| 228 |
<section class="mt-12">
|
| 229 |
<div class="glass-panel rounded-[2.5rem] overflow-hidden">
|
| 230 |
+
<div class="p-5 sm:p-8 border-b border-hairline flex flex-col md:flex-row md:justify-between md:items-center gap-4">
|
| 231 |
<div>
|
| 232 |
<h3 class="text-lg sm:text-xl font-bold text-text">Access Management</h3>
|
| 233 |
<p class="text-xs sm:text-sm text-text-secondary">Control API tokens, daily quotas, and monthly quotas</p>
|
|
|
|
| 238 |
</button>
|
| 239 |
</div>
|
| 240 |
|
| 241 |
+
<div id="create-form-container" class="hidden p-5 sm:p-8 bg-surface border-b border-hairline animate-in fade-in slide-in-from-top-4">
|
| 242 |
<form onsubmit="createToken(event)" class="grid grid-cols-1 md:grid-cols-5 gap-4 items-end">
|
| 243 |
<div class="md:col-span-2">
|
| 244 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-2 mb-1 block">Token Alias</label>
|
| 245 |
<input type="text" id="token-name" placeholder="E.g., Living Room TV" required
|
| 246 |
+
class="w-full px-4 py-3 rounded-xl border border-hairline focus:border-primary outline-none text-sm text-text placeholder:text-text-secondary bg-[color-mix(in_srgb,var(--card)_88%,var(--bg)_12%)]">
|
| 247 |
</div>
|
| 248 |
|
| 249 |
<div>
|
| 250 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-2 mb-1 block">Daily (GB)</label>
|
| 251 |
<input type="number" id="daily-limit" value="0" step="0.1" min="0"
|
| 252 |
+
class="w-full px-4 py-3 rounded-xl border border-hairline focus:border-primary outline-none text-sm text-text placeholder:text-text-secondary bg-[color-mix(in_srgb,var(--card)_88%,var(--bg)_12%)]">
|
| 253 |
</div>
|
| 254 |
|
| 255 |
<div>
|
| 256 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-2 mb-1 block">Monthly (GB)</label>
|
| 257 |
<input type="number" id="monthly-limit" value="0" step="0.1" min="0"
|
| 258 |
+
class="w-full px-4 py-3 rounded-xl border border-hairline focus:border-primary outline-none text-sm text-text placeholder:text-text-secondary bg-[color-mix(in_srgb,var(--card)_88%,var(--bg)_12%)]">
|
| 259 |
</div>
|
| 260 |
|
| 261 |
<div class="flex gap-2">
|
| 262 |
<button type="submit" class="flex-1 py-3 bg-primary text-background font-bold rounded-xl text-sm">Create</button>
|
| 263 |
+
<button type="button" onclick="toggleCreateForm()" class="px-4 py-3 bg-surface text-text-secondary rounded-xl hover:bg-surface-2 transition-colors">
|
| 264 |
<i class="fa-solid fa-xmark"></i>
|
| 265 |
</button>
|
| 266 |
</div>
|
|
|
|
| 270 |
<div class="overflow-x-auto hidden md:block">
|
| 271 |
<table class="w-full text-left">
|
| 272 |
<thead>
|
| 273 |
+
<tr class="bg-surface text-[10px] uppercase tracking-[0.2em] font-bold text-text-secondary">
|
| 274 |
<th class="py-5 px-8">Client Name</th>
|
| 275 |
<th class="py-5 px-8">Usage</th>
|
| 276 |
<th class="py-5 px-8">Limits</th>
|
|
|
|
| 278 |
<th class="py-5 px-8 text-right">Actions</th>
|
| 279 |
</tr>
|
| 280 |
</thead>
|
| 281 |
+
<tbody class="divide-y divide-hairline">
|
| 282 |
{% for token in api_tokens %}
|
| 283 |
+
<tr class="group hover:bg-surface transition-colors" id="token-row-{{ loop.index0 }}">
|
| 284 |
<td class="py-6 px-8">
|
| 285 |
<p class="font-bold text-text">{{ token.name }}</p>
|
| 286 |
<p class="text-[10px] text-text-secondary uppercase mt-1">
|
|
|
|
| 312 |
|
| 313 |
<td class="py-6 px-8">
|
| 314 |
<button onclick='copyUrl({{ ((request.base_url|string).replace("http:", "https:") ~ "stremio/" ~ token.token ~ "/manifest.json")|tojson }})'
|
| 315 |
+
class="flex items-center gap-2 px-3 py-1.5 bg-background/50 rounded-lg border border-hairline text-[10px] font-bold text-text-secondary hover:text-primary hover:border-primary/30 transition-all">
|
| 316 |
<i class="fa-solid fa-link text-[8px]"></i> COPY MANIFEST
|
| 317 |
</button>
|
| 318 |
</td>
|
|
|
|
| 320 |
<td class="py-6 px-8 text-right">
|
| 321 |
<div class="flex justify-end gap-2">
|
| 322 |
<button onclick='openEditModal({{ token.token|tojson }}, {{ token.limits.daily_limit_gb|default(0)|tojson }}, {{ token.limits.monthly_limit_gb|default(0)|tojson }})'
|
| 323 |
+
class="w-8 h-8 rounded-lg bg-surface flex items-center justify-center text-text-secondary hover:bg-blue-500 hover:text-white transition-all token-action-btn">
|
| 324 |
<i class="fa-solid fa-pen-to-square text-xs"></i>
|
| 325 |
</button>
|
| 326 |
<button onclick='revokeToken({{ token.token|tojson }})'
|
| 327 |
+
class="w-8 h-8 rounded-lg bg-surface flex items-center justify-center text-text-secondary hover:bg-red-500 hover:text-white transition-all token-action-btn">
|
| 328 |
<i class="fa-solid fa-trash text-xs"></i>
|
| 329 |
</button>
|
| 330 |
</div>
|
|
|
|
| 343 |
</table>
|
| 344 |
</div>
|
| 345 |
|
| 346 |
+
<div class="md:hidden divide-y divide-hairline">
|
| 347 |
{% for token in api_tokens %}
|
| 348 |
<div class="p-5 space-y-4" id="token-card-{{ loop.index0 }}">
|
| 349 |
<div class="flex items-start justify-between gap-3">
|
|
|
|
| 355 |
</div>
|
| 356 |
<div class="flex gap-2 shrink-0">
|
| 357 |
<button onclick='openEditModal({{ token.token|tojson }}, {{ token.limits.daily_limit_gb|default(0)|tojson }}, {{ token.limits.monthly_limit_gb|default(0)|tojson }})'
|
| 358 |
+
class="w-9 h-9 rounded-lg bg-surface flex items-center justify-center text-text-secondary hover:bg-blue-500 hover:text-white transition-all">
|
| 359 |
<i class="fa-solid fa-pen-to-square text-xs"></i>
|
| 360 |
</button>
|
| 361 |
<button onclick='revokeToken({{ token.token|tojson }})'
|
| 362 |
+
class="w-9 h-9 rounded-lg bg-surface flex items-center justify-center text-text-secondary hover:bg-red-500 hover:text-white transition-all">
|
| 363 |
<i class="fa-solid fa-trash text-xs"></i>
|
| 364 |
</button>
|
| 365 |
</div>
|
| 366 |
</div>
|
| 367 |
|
| 368 |
+
<div class="grid grid-cols-2 gap-3 pt-3 border-t border-hairline">
|
| 369 |
<div>
|
| 370 |
<p class="text-[10px] uppercase font-bold tracking-widest text-text-secondary mb-1">Daily</p>
|
| 371 |
<p class="text-xs font-medium text-text">
|
|
|
|
| 383 |
</div>
|
| 384 |
|
| 385 |
<button onclick='copyUrl({{ ((request.base_url|string).replace("http:", "https:") ~ "stremio/" ~ token.token ~ "/manifest.json")|tojson }})'
|
| 386 |
+
class="w-full flex items-center justify-center gap-2 px-3 py-2.5 bg-background/50 rounded-xl border border-hairline text-[10px] font-bold text-text-secondary hover:text-primary hover:border-primary/30 transition-all">
|
| 387 |
<i class="fa-solid fa-link text-[8px]"></i> COPY MANIFEST
|
| 388 |
</button>
|
| 389 |
</div>
|
|
|
|
| 400 |
</div>
|
| 401 |
|
| 402 |
<div id="edit-modal" class="fixed inset-0 bg-background/80 backdrop-blur-md hidden flex items-center justify-center z-50 p-4">
|
| 403 |
+
<div class="glass-panel rounded-[2rem] p-8 w-full max-w-md border border-hairline shadow-2xl">
|
| 404 |
<h3 class="text-xl font-bold mb-2">Edit Limits</h3>
|
| 405 |
<p class="text-sm text-text-secondary mb-6">Modify daily and monthly data quotas for this token.</p>
|
| 406 |
|
|
|
|
| 409 |
<div>
|
| 410 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-1 mb-1 block">Daily Limit (GB)</label>
|
| 411 |
<input type="number" id="edit-daily" step="0.1" min="0"
|
| 412 |
+
class="w-full px-4 py-3 rounded-xl border border-hairline focus:border-primary outline-none text-text placeholder:text-text-secondary bg-[color-mix(in_srgb,var(--card)_88%,var(--bg)_12%)]">
|
| 413 |
</div>
|
| 414 |
<div>
|
| 415 |
<label class="text-[10px] font-bold uppercase text-text-secondary tracking-widest ml-1 mb-1 block">Monthly Limit (GB)</label>
|
| 416 |
<input type="number" id="edit-monthly" step="0.1" min="0"
|
| 417 |
+
class="w-full px-4 py-3 rounded-xl border border-hairline focus:border-primary outline-none text-text placeholder:text-text-secondary bg-[color-mix(in_srgb,var(--card)_88%,var(--bg)_12%)]">
|
| 418 |
</div>
|
| 419 |
</div>
|
| 420 |
|
| 421 |
<div class="mt-8 flex gap-3">
|
| 422 |
+
<button onclick="closeEditModal()" class="flex-1 py-3 bg-surface hover:bg-surface-2 text-text rounded-xl font-bold transition-all">Cancel</button>
|
| 423 |
<button onclick="saveTokenLimits()" class="flex-1 py-3 bg-primary text-background rounded-xl font-bold transition-all">Save Changes</button>
|
| 424 |
</div>
|
| 425 |
</div>
|
|
|
|
| 428 |
|
| 429 |
<style>
|
| 430 |
.shadow-glow {
|
| 431 |
+
filter: drop-shadow(0 0 8px color-mix(in srgb, var(--primary) 45%, transparent));
|
| 432 |
}
|
| 433 |
|
| 434 |
.stream-card {
|
|
|
|
| 771 |
</span>
|
| 772 |
</div>
|
| 773 |
|
| 774 |
+
<div class="grid grid-cols-2 gap-3 mt-4 pt-4 border-t border-hairline">
|
| 775 |
<div class="text-center">
|
| 776 |
<p class="text-[9px] text-text-secondary uppercase tracking-widest font-bold">Speed</p>
|
| 777 |
<p class="text-xs font-bold text-text">${avgSpeed}</p>
|
|
|
|
| 790 |
</div>
|
| 791 |
</div>
|
| 792 |
|
| 793 |
+
<div class="mt-4 pt-4 border-t border-hairline space-y-2">
|
| 794 |
<div class="flex items-center justify-between text-xs gap-3">
|
| 795 |
<span class="text-text-secondary">Stream ID</span>
|
| 796 |
<span class="font-mono text-text text-right truncate max-w-[65%]">${streamId}</span>
|
|
|
|
| 806 |
|
| 807 |
function renderEmptyState(icon, title, subtitle) {
|
| 808 |
return `
|
| 809 |
+
<div class="glass-panel p-8 rounded-[2rem] text-center border-dashed border-hairline">
|
| 810 |
+
<i class="${icon} text-4xl text-muted mb-3"></i>
|
| 811 |
<p class="text-sm text-text-secondary font-medium">${escapeHtml(title)}</p>
|
| 812 |
<p class="text-xs text-text-secondary mt-1">${escapeHtml(subtitle)}</p>
|
| 813 |
</div>
|
Backend/fastapi/templates/login.html
CHANGED
|
@@ -37,7 +37,7 @@
|
|
| 37 |
<div class="relative group">
|
| 38 |
<i class="fa-solid fa-user absolute left-4 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors text-sm"></i>
|
| 39 |
<input type="text" name="username" required
|
| 40 |
-
class="w-full pl-11 pr-4 py-3 bg-background/50 rounded-2xl border border-
|
| 41 |
placeholder="Admin ID">
|
| 42 |
</div>
|
| 43 |
</div>
|
|
@@ -48,7 +48,7 @@
|
|
| 48 |
<i class="fa-solid fa-lock absolute left-4 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors text-sm"></i>
|
| 49 |
|
| 50 |
<input type="password" id="password" name="password" required
|
| 51 |
-
class="w-full pl-11 pr-11 py-3 bg-background/50 rounded-2xl border border-
|
| 52 |
placeholder="••••••••">
|
| 53 |
|
| 54 |
<button type="button" onclick="togglePassword()"
|
|
|
|
| 37 |
<div class="relative group">
|
| 38 |
<i class="fa-solid fa-user absolute left-4 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors text-sm"></i>
|
| 39 |
<input type="text" name="username" required
|
| 40 |
+
class="w-full pl-11 pr-4 py-3 bg-background/50 rounded-2xl border border-hairline focus:border-primary/50 focus:ring-4 focus:ring-primary/10 outline-none transition-all text-text text-sm"
|
| 41 |
placeholder="Admin ID">
|
| 42 |
</div>
|
| 43 |
</div>
|
|
|
|
| 48 |
<i class="fa-solid fa-lock absolute left-4 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors text-sm"></i>
|
| 49 |
|
| 50 |
<input type="password" id="password" name="password" required
|
| 51 |
+
class="w-full pl-11 pr-11 py-3 bg-background/50 rounded-2xl border border-hairline focus:border-primary/50 focus:ring-4 focus:ring-primary/10 outline-none transition-all text-text text-sm"
|
| 52 |
placeholder="••••••••">
|
| 53 |
|
| 54 |
<button type="button" onclick="togglePassword()"
|
Backend/fastapi/templates/media_edit.html
CHANGED
|
@@ -5,16 +5,14 @@
|
|
| 5 |
{% block content %}
|
| 6 |
<style>
|
| 7 |
.glass-card {
|
| 8 |
-
background: color-mix(in srgb, var(--card)
|
| 9 |
border: 1px solid color-mix(in srgb, var(--border) 95%, transparent);
|
| 10 |
-
backdrop-filter: blur(22px);
|
| 11 |
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
|
| 12 |
}
|
| 13 |
|
| 14 |
.glass-card-soft {
|
| 15 |
-
background: color-mix(in srgb, var(--card)
|
| 16 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
| 17 |
-
backdrop-filter: blur(18px);
|
| 18 |
}
|
| 19 |
|
| 20 |
.section-title {
|
|
@@ -271,7 +269,7 @@
|
|
| 271 |
<div class="mx-auto md:mx-0 flex-shrink-0">
|
| 272 |
<img src="{{ media_details.poster or '/static/placeholder.jpg' }}"
|
| 273 |
alt="{{ media_details.title }}"
|
| 274 |
-
class="w-36 sm:w-40 md:w-48 h-54 sm:h-60 md:h-72 object-cover rounded-2xl shadow-2xl border border-
|
| 275 |
onerror="this.src='https://via.placeholder.com/300x450/e5e7eb/9ca3af?text=No+Image'">
|
| 276 |
</div>
|
| 277 |
|
|
@@ -286,11 +284,11 @@
|
|
| 286 |
⭐ {{ media_details.rating }}
|
| 287 |
</span>
|
| 288 |
{% endif %}
|
| 289 |
-
<span class="inline-flex items-center px-3 py-1 rounded-full bg-
|
| 290 |
{{ media_details.release_year }}
|
| 291 |
</span>
|
| 292 |
{% if media_details.genres %}
|
| 293 |
-
<span class="inline-flex items-center px-3 py-1 rounded-full bg-
|
| 294 |
{{ media_details.genres|length }} genre{{ 's' if media_details.genres|length != 1 else '' }}
|
| 295 |
</span>
|
| 296 |
{% endif %}
|
|
@@ -309,7 +307,7 @@
|
|
| 309 |
</div>
|
| 310 |
|
| 311 |
{% if media_details.description %}
|
| 312 |
-
<div class="border-t border-
|
| 313 |
<h3 class="section-title text-lg sm:text-xl mb-3">Overview</h3>
|
| 314 |
<p class="muted leading-7 text-sm sm:text-base">{{ media_details.description }}</p>
|
| 315 |
</div>
|
|
@@ -346,7 +344,7 @@
|
|
| 346 |
|
| 347 |
<div id="rescan-results" class="grid grid-cols-1 xl:grid-cols-2 gap-3 mt-4"></div>
|
| 348 |
|
| 349 |
-
<div id="rescan-preview" class="hidden mt-5 rounded-3xl border border-
|
| 350 |
<div class="flex items-start gap-4">
|
| 351 |
<img id="rescan-preview-poster" src="/static/placeholder.jpg" alt="Selected poster" class="match-thumb">
|
| 352 |
<div class="min-w-0 flex-1">
|
|
@@ -505,8 +503,8 @@
|
|
| 505 |
{% elif media_type == 'tv' and media_details.seasons %}
|
| 506 |
<div class="space-y-4 sm:space-y-5">
|
| 507 |
{% for season in media_details.seasons|sort(attribute='season_number') %}
|
| 508 |
-
<div class="glass-card-soft rounded-3xl overflow-hidden border border-
|
| 509 |
-
<div class="px-4 sm:px-5 lg:px-6 py-4 sm:py-5 border-b border-
|
| 510 |
<div class="flex items-center justify-between gap-3">
|
| 511 |
<div>
|
| 512 |
<h4 class="section-title text-base sm:text-lg lg:text-xl">Season {{ season.season_number }}</h4>
|
|
@@ -522,7 +520,7 @@
|
|
| 522 |
</div>
|
| 523 |
|
| 524 |
<div id="season-content-{{ loop.index0 }}" class="season-content">
|
| 525 |
-
<div class="divide-y divide-
|
| 526 |
{% for episode in season.episodes|sort(attribute='episode_number') %}
|
| 527 |
<div class="p-4 sm:p-5">
|
| 528 |
<div class="flex flex-col xl:flex-row xl:items-start gap-4">
|
|
@@ -576,7 +574,7 @@
|
|
| 576 |
{% endfor %}
|
| 577 |
</div>
|
| 578 |
|
| 579 |
-
<div class="px-4 sm:px-5 lg:px-6 py-4 border-t border-
|
| 580 |
<button onclick="deleteTVSeason({{ season.season_number }})" class="btn-ui btn-danger px-4 py-2 text-sm">
|
| 581 |
Delete Entire Season
|
| 582 |
</button>
|
|
@@ -587,7 +585,7 @@
|
|
| 587 |
</div>
|
| 588 |
{% else %}
|
| 589 |
<div class="text-center py-10">
|
| 590 |
-
<svg class="mx-auto h-12 w-12 text-
|
| 591 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
| 592 |
d="M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h4a1 1 0 110 2h-1v12a2 2 0 01-2-2V6H3a1 1 0 110-2h4zM9 6v10h6V6H9z" />
|
| 593 |
</svg>
|
|
@@ -603,26 +601,26 @@
|
|
| 603 |
|
| 604 |
<div class="absolute inset-0 flex items-center justify-center p-2 sm:p-4">
|
| 605 |
<div class="glass-card speed-modal-shell rounded-2xl sm:rounded-3xl">
|
| 606 |
-
<div class="flex items-start sm:items-center justify-between gap-3 px-4 sm:px-6 py-4 border-b border-
|
| 607 |
<div class="min-w-0">
|
| 608 |
<h2 class="text-base sm:text-xl font-black text-white leading-tight">🚀 DC Speed Test</h2>
|
| 609 |
-
<p id="st-label" class="text-[11px] sm:text-sm text-
|
| 610 |
</div>
|
| 611 |
-
<button onclick="closeSpeedTest()" class="flex-shrink-0 text-
|
| 612 |
</div>
|
| 613 |
|
| 614 |
<div class="speed-modal-body px-4 sm:px-6 py-5 sm:py-6">
|
| 615 |
<div id="st-spinner" class="flex flex-col items-center gap-4 py-8 sm:py-10">
|
| 616 |
-
<div class="w-12 h-12 sm:w-14 sm:h-14 rounded-full border-4 border-
|
| 617 |
-
<p class="text-sm text-
|
| 618 |
-
<p class="text-xs text-
|
| 619 |
</div>
|
| 620 |
|
| 621 |
<div id="st-results" class="hidden">
|
| 622 |
-
<div class="overflow-x-auto rounded-2xl border border-
|
| 623 |
<table class="w-full min-w-[760px] text-sm">
|
| 624 |
-
<thead class="bg-
|
| 625 |
-
<tr class="text-
|
| 626 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Bot / DC</th>
|
| 627 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Ping</th>
|
| 628 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Speed</th>
|
|
@@ -631,16 +629,16 @@
|
|
| 631 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Status</th>
|
| 632 |
</tr>
|
| 633 |
</thead>
|
| 634 |
-
<tbody id="st-tbody" class="divide-y divide-
|
| 635 |
</table>
|
| 636 |
</div>
|
| 637 |
-
<p id="st-summary" class="text-xs text-
|
| 638 |
</div>
|
| 639 |
|
| 640 |
<div id="st-error" class="hidden mt-2 rounded-2xl border border-red-500/25 bg-red-500/10 px-4 py-3 text-sm text-red-200"></div>
|
| 641 |
</div>
|
| 642 |
|
| 643 |
-
<div class="flex flex-col sm:flex-row justify-end gap-3 px-4 sm:px-6 py-4 border-t border-
|
| 644 |
<button id="st-rerun-btn" onclick="rerunSpeedTest()" class="hidden btn-ui btn-primary">
|
| 645 |
🔄 Re-run
|
| 646 |
</button>
|
|
@@ -1199,14 +1197,14 @@
|
|
| 1199 |
}
|
| 1200 |
|
| 1201 |
function _pingClass(ms) {
|
| 1202 |
-
if (ms === null) return 'text-
|
| 1203 |
if (ms < 100) return 'text-emerald-300 font-semibold';
|
| 1204 |
if (ms < 300) return 'text-amber-300 font-semibold';
|
| 1205 |
return 'text-rose-300 font-semibold';
|
| 1206 |
}
|
| 1207 |
|
| 1208 |
function _speedClass(mbps) {
|
| 1209 |
-
if (mbps === null) return 'text-
|
| 1210 |
if (mbps >= 20) return 'text-emerald-300 font-bold';
|
| 1211 |
if (mbps >= 5) return 'text-amber-300 font-bold';
|
| 1212 |
return 'text-rose-300 font-bold';
|
|
@@ -1215,7 +1213,7 @@
|
|
| 1215 |
function _miniBar(value, max, color) {
|
| 1216 |
if (!value || !max) return '';
|
| 1217 |
const pct = Math.min(100, (value / max) * 100).toFixed(1);
|
| 1218 |
-
return `<div class="w-full bg-
|
| 1219 |
<div class="${color} h-1.5 rounded-full transition-all" style="width:${pct}%"></div>
|
| 1220 |
</div>`;
|
| 1221 |
}
|
|
@@ -1283,12 +1281,12 @@
|
|
| 1283 |
const tr = document.createElement('tr');
|
| 1284 |
tr.className = 'animate-pulse';
|
| 1285 |
tr.innerHTML = `
|
| 1286 |
-
<td class="px-4 py-3 font-medium text-
|
| 1287 |
-
<td class="px-4 py-3"><span class="text-
|
| 1288 |
-
<td class="px-4 py-3"><span class="text-
|
| 1289 |
-
<td class="px-4 py-3 text-
|
| 1290 |
-
<td class="px-4 py-3 text-
|
| 1291 |
-
<td class="px-4 py-3"><span class="px-2 py-0.5 rounded-full text-xs bg-
|
| 1292 |
tbody.appendChild(tr);
|
| 1293 |
pendingRows[i] = tr;
|
| 1294 |
}
|
|
@@ -1302,12 +1300,12 @@
|
|
| 1302 |
maxSpeed = Math.max(maxSpeed, r.speed_mbps || 0, 1);
|
| 1303 |
const isErr = !!r.error && !r.speed_mbps;
|
| 1304 |
const medal = '';
|
| 1305 |
-
const dc = `Bot ${r.client_index + 1} <span class="text-xs text-
|
| 1306 |
-
const ping = r.ping_ms !== null ? `<span class="${_pingClass(r.ping_ms)}">${r.ping_ms} ms</span>` : '<span class="text-
|
| 1307 |
const speed = r.speed_mbps !== null
|
| 1308 |
? `<span class="${_speedClass(r.speed_mbps)}">${r.speed_mbps.toFixed(2)} MB/s</span>
|
| 1309 |
${_miniBar(r.speed_mbps, maxSpeed, r.speed_mbps >= 20 ? 'bg-emerald-400' : r.speed_mbps >= 5 ? 'bg-amber-300' : 'bg-rose-300')}`
|
| 1310 |
-
: '<span class="text-
|
| 1311 |
const taken = r.time_taken_sec !== null ? `${r.time_taken_sec.toFixed(2)}s` : '—';
|
| 1312 |
const bytes = r.bytes_downloaded ? `${(r.bytes_downloaded / 1048576).toFixed(2)} MB` : '—';
|
| 1313 |
const badge = isErr
|
|
@@ -1318,10 +1316,10 @@
|
|
| 1318 |
newTr.className = `transition-colors ${isErr ? 'opacity-70' : ''}`;
|
| 1319 |
newTr.innerHTML = `
|
| 1320 |
<td class="px-4 py-3 font-medium text-white">${medal}${dc}</td>
|
| 1321 |
-
<td class="px-4 py-3 text-
|
| 1322 |
-
<td class="px-4 py-3 text-
|
| 1323 |
-
<td class="px-4 py-3 text-
|
| 1324 |
-
<td class="px-4 py-3 text-
|
| 1325 |
<td class="px-4 py-3">${badge}</td>`;
|
| 1326 |
|
| 1327 |
if (pendingRows[r.client_index]) {
|
|
@@ -1349,12 +1347,12 @@
|
|
| 1349 |
const r = allResults[i];
|
| 1350 |
const isErr = !!r.error && !r.speed_mbps;
|
| 1351 |
const medal = i === 0 && !isErr ? '🥇 ' : '';
|
| 1352 |
-
const dc = `Bot ${r.client_index + 1} <span class="text-xs text-
|
| 1353 |
-
const ping = r.ping_ms !== null ? `<span class="${_pingClass(r.ping_ms)}">${r.ping_ms} ms</span>` : '<span class="text-
|
| 1354 |
const speed = r.speed_mbps !== null
|
| 1355 |
? `<span class="${_speedClass(r.speed_mbps)}">${r.speed_mbps.toFixed(2)} MB/s</span>
|
| 1356 |
${_miniBar(r.speed_mbps, maxSpeed, r.speed_mbps >= 20 ? 'bg-emerald-400' : r.speed_mbps >= 5 ? 'bg-amber-300' : 'bg-rose-300')}`
|
| 1357 |
-
: '<span class="text-
|
| 1358 |
const taken = r.time_taken_sec !== null ? `${r.time_taken_sec.toFixed(2)}s` : '—';
|
| 1359 |
const bytes = r.bytes_downloaded ? `${(r.bytes_downloaded / 1048576).toFixed(2)} MB` : '—';
|
| 1360 |
const badge = isErr
|
|
@@ -1365,10 +1363,10 @@
|
|
| 1365 |
tr.className = `transition-colors ${isErr ? 'opacity-70' : ''}`;
|
| 1366 |
tr.innerHTML = `
|
| 1367 |
<td class="px-4 py-3 font-medium text-white">${medal}${dc}</td>
|
| 1368 |
-
<td class="px-4 py-3 text-
|
| 1369 |
-
<td class="px-4 py-3 text-
|
| 1370 |
-
<td class="px-4 py-3 text-
|
| 1371 |
-
<td class="px-4 py-3 text-
|
| 1372 |
<td class="px-4 py-3">${badge}</td>`;
|
| 1373 |
tbody.appendChild(tr);
|
| 1374 |
}
|
|
|
|
| 5 |
{% block content %}
|
| 6 |
<style>
|
| 7 |
.glass-card {
|
| 8 |
+
background: color-mix(in srgb, var(--card) 94%, var(--bg));
|
| 9 |
border: 1px solid color-mix(in srgb, var(--border) 95%, transparent);
|
|
|
|
| 10 |
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
|
| 11 |
}
|
| 12 |
|
| 13 |
.glass-card-soft {
|
| 14 |
+
background: color-mix(in srgb, var(--card) 86%, var(--bg));
|
| 15 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
.section-title {
|
|
|
|
| 269 |
<div class="mx-auto md:mx-0 flex-shrink-0">
|
| 270 |
<img src="{{ media_details.poster or '/static/placeholder.jpg' }}"
|
| 271 |
alt="{{ media_details.title }}"
|
| 272 |
+
class="w-36 sm:w-40 md:w-48 h-54 sm:h-60 md:h-72 object-cover rounded-2xl shadow-2xl border border-hairline-strong"
|
| 273 |
onerror="this.src='https://via.placeholder.com/300x450/e5e7eb/9ca3af?text=No+Image'">
|
| 274 |
</div>
|
| 275 |
|
|
|
|
| 284 |
⭐ {{ media_details.rating }}
|
| 285 |
</span>
|
| 286 |
{% endif %}
|
| 287 |
+
<span class="inline-flex items-center px-3 py-1 rounded-full bg-surface-3 text-white text-sm font-semibold border border-hairline-strong">
|
| 288 |
{{ media_details.release_year }}
|
| 289 |
</span>
|
| 290 |
{% if media_details.genres %}
|
| 291 |
+
<span class="inline-flex items-center px-3 py-1 rounded-full bg-surface-3 text-white text-sm font-semibold border border-hairline-strong">
|
| 292 |
{{ media_details.genres|length }} genre{{ 's' if media_details.genres|length != 1 else '' }}
|
| 293 |
</span>
|
| 294 |
{% endif %}
|
|
|
|
| 307 |
</div>
|
| 308 |
|
| 309 |
{% if media_details.description %}
|
| 310 |
+
<div class="border-t border-hairline p-5 sm:p-6 lg:p-8">
|
| 311 |
<h3 class="section-title text-lg sm:text-xl mb-3">Overview</h3>
|
| 312 |
<p class="muted leading-7 text-sm sm:text-base">{{ media_details.description }}</p>
|
| 313 |
</div>
|
|
|
|
| 344 |
|
| 345 |
<div id="rescan-results" class="grid grid-cols-1 xl:grid-cols-2 gap-3 mt-4"></div>
|
| 346 |
|
| 347 |
+
<div id="rescan-preview" class="hidden mt-5 rounded-3xl border border-hairline bg-surface p-4 sm:p-5">
|
| 348 |
<div class="flex items-start gap-4">
|
| 349 |
<img id="rescan-preview-poster" src="/static/placeholder.jpg" alt="Selected poster" class="match-thumb">
|
| 350 |
<div class="min-w-0 flex-1">
|
|
|
|
| 503 |
{% elif media_type == 'tv' and media_details.seasons %}
|
| 504 |
<div class="space-y-4 sm:space-y-5">
|
| 505 |
{% for season in media_details.seasons|sort(attribute='season_number') %}
|
| 506 |
+
<div class="glass-card-soft rounded-3xl overflow-hidden border border-hairline">
|
| 507 |
+
<div class="px-4 sm:px-5 lg:px-6 py-4 sm:py-5 border-b border-hairline bg-surface">
|
| 508 |
<div class="flex items-center justify-between gap-3">
|
| 509 |
<div>
|
| 510 |
<h4 class="section-title text-base sm:text-lg lg:text-xl">Season {{ season.season_number }}</h4>
|
|
|
|
| 520 |
</div>
|
| 521 |
|
| 522 |
<div id="season-content-{{ loop.index0 }}" class="season-content">
|
| 523 |
+
<div class="divide-y divide-hairline">
|
| 524 |
{% for episode in season.episodes|sort(attribute='episode_number') %}
|
| 525 |
<div class="p-4 sm:p-5">
|
| 526 |
<div class="flex flex-col xl:flex-row xl:items-start gap-4">
|
|
|
|
| 574 |
{% endfor %}
|
| 575 |
</div>
|
| 576 |
|
| 577 |
+
<div class="px-4 sm:px-5 lg:px-6 py-4 border-t border-hairline bg-surface flex justify-center sm:justify-start">
|
| 578 |
<button onclick="deleteTVSeason({{ season.season_number }})" class="btn-ui btn-danger px-4 py-2 text-sm">
|
| 579 |
Delete Entire Season
|
| 580 |
</button>
|
|
|
|
| 585 |
</div>
|
| 586 |
{% else %}
|
| 587 |
<div class="text-center py-10">
|
| 588 |
+
<svg class="mx-auto h-12 w-12 text-muted mb-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 589 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
| 590 |
d="M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h4a1 1 0 110 2h-1v12a2 2 0 01-2-2V6H3a1 1 0 110-2h4zM9 6v10h6V6H9z" />
|
| 591 |
</svg>
|
|
|
|
| 601 |
|
| 602 |
<div class="absolute inset-0 flex items-center justify-center p-2 sm:p-4">
|
| 603 |
<div class="glass-card speed-modal-shell rounded-2xl sm:rounded-3xl">
|
| 604 |
+
<div class="flex items-start sm:items-center justify-between gap-3 px-4 sm:px-6 py-4 border-b border-hairline bg-surface">
|
| 605 |
<div class="min-w-0">
|
| 606 |
<h2 class="text-base sm:text-xl font-black text-white leading-tight">🚀 DC Speed Test</h2>
|
| 607 |
+
<p id="st-label" class="text-[11px] sm:text-sm text-text-secondary mt-1 break-all"></p>
|
| 608 |
</div>
|
| 609 |
+
<button onclick="closeSpeedTest()" class="flex-shrink-0 text-text-secondary hover:text-white text-3xl leading-none transition-colors">×</button>
|
| 610 |
</div>
|
| 611 |
|
| 612 |
<div class="speed-modal-body px-4 sm:px-6 py-5 sm:py-6">
|
| 613 |
<div id="st-spinner" class="flex flex-col items-center gap-4 py-8 sm:py-10">
|
| 614 |
+
<div class="w-12 h-12 sm:w-14 sm:h-14 rounded-full border-4 border-hairline-strong border-t-primary st-spin"></div>
|
| 615 |
+
<p class="text-sm text-text text-center">Testing all DC clients simultaneously…</p>
|
| 616 |
+
<p class="text-xs text-text-secondary text-center max-w-md">Downloading 100 MB from each bot client</p>
|
| 617 |
</div>
|
| 618 |
|
| 619 |
<div id="st-results" class="hidden">
|
| 620 |
+
<div class="overflow-x-auto rounded-2xl border border-hairline">
|
| 621 |
<table class="w-full min-w-[760px] text-sm">
|
| 622 |
+
<thead class="bg-surface text-left">
|
| 623 |
+
<tr class="text-text-secondary">
|
| 624 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Bot / DC</th>
|
| 625 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Ping</th>
|
| 626 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Speed</th>
|
|
|
|
| 629 |
<th class="px-4 py-3 font-semibold text-xs uppercase tracking-wider whitespace-nowrap">Status</th>
|
| 630 |
</tr>
|
| 631 |
</thead>
|
| 632 |
+
<tbody id="st-tbody" class="divide-y divide-hairline bg-surface"></tbody>
|
| 633 |
</table>
|
| 634 |
</div>
|
| 635 |
+
<p id="st-summary" class="text-xs text-text-secondary mt-3 text-right"></p>
|
| 636 |
</div>
|
| 637 |
|
| 638 |
<div id="st-error" class="hidden mt-2 rounded-2xl border border-red-500/25 bg-red-500/10 px-4 py-3 text-sm text-red-200"></div>
|
| 639 |
</div>
|
| 640 |
|
| 641 |
+
<div class="flex flex-col sm:flex-row justify-end gap-3 px-4 sm:px-6 py-4 border-t border-hairline bg-surface">
|
| 642 |
<button id="st-rerun-btn" onclick="rerunSpeedTest()" class="hidden btn-ui btn-primary">
|
| 643 |
🔄 Re-run
|
| 644 |
</button>
|
|
|
|
| 1197 |
}
|
| 1198 |
|
| 1199 |
function _pingClass(ms) {
|
| 1200 |
+
if (ms === null) return 'text-text-secondary';
|
| 1201 |
if (ms < 100) return 'text-emerald-300 font-semibold';
|
| 1202 |
if (ms < 300) return 'text-amber-300 font-semibold';
|
| 1203 |
return 'text-rose-300 font-semibold';
|
| 1204 |
}
|
| 1205 |
|
| 1206 |
function _speedClass(mbps) {
|
| 1207 |
+
if (mbps === null) return 'text-text-secondary';
|
| 1208 |
if (mbps >= 20) return 'text-emerald-300 font-bold';
|
| 1209 |
if (mbps >= 5) return 'text-amber-300 font-bold';
|
| 1210 |
return 'text-rose-300 font-bold';
|
|
|
|
| 1213 |
function _miniBar(value, max, color) {
|
| 1214 |
if (!value || !max) return '';
|
| 1215 |
const pct = Math.min(100, (value / max) * 100).toFixed(1);
|
| 1216 |
+
return `<div class="w-full bg-surface-2 rounded-full h-1.5 mt-1 overflow-hidden">
|
| 1217 |
<div class="${color} h-1.5 rounded-full transition-all" style="width:${pct}%"></div>
|
| 1218 |
</div>`;
|
| 1219 |
}
|
|
|
|
| 1281 |
const tr = document.createElement('tr');
|
| 1282 |
tr.className = 'animate-pulse';
|
| 1283 |
tr.innerHTML = `
|
| 1284 |
+
<td class="px-4 py-3 font-medium text-text-secondary">🔄 Bot ${i + 1}</td>
|
| 1285 |
+
<td class="px-4 py-3"><span class="text-muted">testing…</span></td>
|
| 1286 |
+
<td class="px-4 py-3"><span class="text-muted">testing…</span></td>
|
| 1287 |
+
<td class="px-4 py-3 text-muted">—</td>
|
| 1288 |
+
<td class="px-4 py-3 text-muted">—</td>
|
| 1289 |
+
<td class="px-4 py-3"><span class="px-2 py-0.5 rounded-full text-xs bg-surface-2 text-text-secondary">Pending</span></td>`;
|
| 1290 |
tbody.appendChild(tr);
|
| 1291 |
pendingRows[i] = tr;
|
| 1292 |
}
|
|
|
|
| 1300 |
maxSpeed = Math.max(maxSpeed, r.speed_mbps || 0, 1);
|
| 1301 |
const isErr = !!r.error && !r.speed_mbps;
|
| 1302 |
const medal = '';
|
| 1303 |
+
const dc = `Bot ${r.client_index + 1} <span class="text-xs text-text-secondary">(DC ${r.dc_id})</span>`;
|
| 1304 |
+
const ping = r.ping_ms !== null ? `<span class="${_pingClass(r.ping_ms)}">${r.ping_ms} ms</span>` : '<span class="text-text-secondary">—</span>';
|
| 1305 |
const speed = r.speed_mbps !== null
|
| 1306 |
? `<span class="${_speedClass(r.speed_mbps)}">${r.speed_mbps.toFixed(2)} MB/s</span>
|
| 1307 |
${_miniBar(r.speed_mbps, maxSpeed, r.speed_mbps >= 20 ? 'bg-emerald-400' : r.speed_mbps >= 5 ? 'bg-amber-300' : 'bg-rose-300')}`
|
| 1308 |
+
: '<span class="text-text-secondary">—</span>';
|
| 1309 |
const taken = r.time_taken_sec !== null ? `${r.time_taken_sec.toFixed(2)}s` : '—';
|
| 1310 |
const bytes = r.bytes_downloaded ? `${(r.bytes_downloaded / 1048576).toFixed(2)} MB` : '—';
|
| 1311 |
const badge = isErr
|
|
|
|
| 1316 |
newTr.className = `transition-colors ${isErr ? 'opacity-70' : ''}`;
|
| 1317 |
newTr.innerHTML = `
|
| 1318 |
<td class="px-4 py-3 font-medium text-white">${medal}${dc}</td>
|
| 1319 |
+
<td class="px-4 py-3 text-text">${ping}</td>
|
| 1320 |
+
<td class="px-4 py-3 text-text">${speed}${isErr ? `<div class="text-xs text-rose-300 mt-1">${r.error}</div>` : ''}</td>
|
| 1321 |
+
<td class="px-4 py-3 text-text-secondary text-sm">${taken}</td>
|
| 1322 |
+
<td class="px-4 py-3 text-text-secondary text-xs">${bytes}</td>
|
| 1323 |
<td class="px-4 py-3">${badge}</td>`;
|
| 1324 |
|
| 1325 |
if (pendingRows[r.client_index]) {
|
|
|
|
| 1347 |
const r = allResults[i];
|
| 1348 |
const isErr = !!r.error && !r.speed_mbps;
|
| 1349 |
const medal = i === 0 && !isErr ? '🥇 ' : '';
|
| 1350 |
+
const dc = `Bot ${r.client_index + 1} <span class="text-xs text-text-secondary">(DC ${r.dc_id})</span>`;
|
| 1351 |
+
const ping = r.ping_ms !== null ? `<span class="${_pingClass(r.ping_ms)}">${r.ping_ms} ms</span>` : '<span class="text-text-secondary">—</span>';
|
| 1352 |
const speed = r.speed_mbps !== null
|
| 1353 |
? `<span class="${_speedClass(r.speed_mbps)}">${r.speed_mbps.toFixed(2)} MB/s</span>
|
| 1354 |
${_miniBar(r.speed_mbps, maxSpeed, r.speed_mbps >= 20 ? 'bg-emerald-400' : r.speed_mbps >= 5 ? 'bg-amber-300' : 'bg-rose-300')}`
|
| 1355 |
+
: '<span class="text-text-secondary">—</span>';
|
| 1356 |
const taken = r.time_taken_sec !== null ? `${r.time_taken_sec.toFixed(2)}s` : '—';
|
| 1357 |
const bytes = r.bytes_downloaded ? `${(r.bytes_downloaded / 1048576).toFixed(2)} MB` : '—';
|
| 1358 |
const badge = isErr
|
|
|
|
| 1363 |
tr.className = `transition-colors ${isErr ? 'opacity-70' : ''}`;
|
| 1364 |
tr.innerHTML = `
|
| 1365 |
<td class="px-4 py-3 font-medium text-white">${medal}${dc}</td>
|
| 1366 |
+
<td class="px-4 py-3 text-text">${ping}</td>
|
| 1367 |
+
<td class="px-4 py-3 text-text">${speed}${isErr ? `<div class="text-xs text-rose-300 mt-1">${r.error}</div>` : ''}</td>
|
| 1368 |
+
<td class="px-4 py-3 text-text-secondary text-sm">${taken}</td>
|
| 1369 |
+
<td class="px-4 py-3 text-text-secondary text-xs">${bytes}</td>
|
| 1370 |
<td class="px-4 py-3">${badge}</td>`;
|
| 1371 |
tbody.appendChild(tr);
|
| 1372 |
}
|
Backend/fastapi/templates/media_management.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
<div class="flex flex-col gap-5">
|
| 10 |
<div class="flex flex-col md:flex-row md:items-end md:justify-between gap-4">
|
| 11 |
<div>
|
| 12 |
-
<div class="inline-flex items-center gap-2 px-3 py-1 rounded-full border border-
|
| 13 |
<i class="fa-solid fa-clapperboard text-primary"></i>
|
| 14 |
Library Control
|
| 15 |
</div>
|
|
@@ -27,7 +27,7 @@
|
|
| 27 |
{% if media_type == 'movie' %}
|
| 28 |
bg-primary text-white border-primary shadow-lg shadow-primary/20
|
| 29 |
{% else %}
|
| 30 |
-
glass-panel text-text hover:bg-
|
| 31 |
{% endif %}">
|
| 32 |
<i class="fa-solid fa-film"></i>
|
| 33 |
Movies
|
|
@@ -37,7 +37,7 @@
|
|
| 37 |
{% if media_type == 'tv' %}
|
| 38 |
bg-primary text-white border-primary shadow-lg shadow-primary/20
|
| 39 |
{% else %}
|
| 40 |
-
glass-panel text-text hover:bg-
|
| 41 |
{% endif %}">
|
| 42 |
<i class="fa-solid fa-tv"></i>
|
| 43 |
TV Shows
|
|
@@ -46,11 +46,11 @@
|
|
| 46 |
</div>
|
| 47 |
|
| 48 |
<div class="grid grid-cols-1 md:grid-cols-3 gap-3">
|
| 49 |
-
<div class="rounded-2xl border border-
|
| 50 |
<p class="text-[11px] uppercase tracking-wider text-text-secondary font-bold">Current view</p>
|
| 51 |
<p class="mt-1 text-sm font-semibold text-text capitalize">{{ media_type }}</p>
|
| 52 |
</div>
|
| 53 |
-
<div class="rounded-2xl border border-
|
| 54 |
<p class="text-[11px] uppercase tracking-wider text-text-secondary font-bold">Actions</p>
|
| 55 |
<p class="mt-1 text-sm font-semibold text-text">Search, Edit, Delete</p>
|
| 56 |
</div>
|
|
@@ -81,7 +81,7 @@
|
|
| 81 |
Search
|
| 82 |
</button>
|
| 83 |
<button onclick="clearSearch()"
|
| 84 |
-
class="inline-flex justify-center items-center gap-2 glass-panel hover:bg-
|
| 85 |
<i class="fa-solid fa-rotate-left"></i>
|
| 86 |
Clear
|
| 87 |
</button>
|
|
@@ -91,7 +91,7 @@
|
|
| 91 |
|
| 92 |
<!-- Loading Indicator -->
|
| 93 |
<div id="loading" class="hidden text-center py-16">
|
| 94 |
-
<div class="inline-flex items-center justify-center w-14 h-14 rounded-full border border-
|
| 95 |
<div class="animate-spin rounded-full h-7 w-7 border-b-2 border-primary"></div>
|
| 96 |
</div>
|
| 97 |
<p class="text-text-secondary">Loading {{ media_type }}s...</p>
|
|
@@ -126,7 +126,7 @@
|
|
| 126 |
<!-- No Results -->
|
| 127 |
<div id="no-results" class="hidden text-center py-16">
|
| 128 |
<div class="glass-panel rounded-3xl p-8 max-w-xl mx-auto">
|
| 129 |
-
<div class="mx-auto w-16 h-16 rounded-2xl bg-
|
| 130 |
<i class="fa-solid fa-box-open text-3xl text-text-secondary"></i>
|
| 131 |
</div>
|
| 132 |
<h3 class="text-xl font-bold text-text mb-2">No {{ media_type }}s found</h3>
|
|
@@ -260,13 +260,13 @@
|
|
| 260 |
const safeTitle = title.replace(/"/g, '"');
|
| 261 |
|
| 262 |
return `
|
| 263 |
-
<div class="group overflow-hidden rounded-3xl glass-panel border border-
|
| 264 |
<div class="relative overflow-hidden">
|
| 265 |
<img src="${poster}" alt="${title}" class="w-full aspect-[2/3] object-cover transition duration-300 group-hover:scale-105" onerror="this.src='https://via.placeholder.com/300x450/e5e7eb/9ca3af?text=No+Image'" loading="lazy">
|
| 266 |
<div class="absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
|
| 267 |
|
| 268 |
<div class="absolute top-3 left-3">
|
| 269 |
-
<span class="inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-black/60 text-white text-[11px] font-bold
|
| 270 |
<i class="fa-solid fa-calendar-days"></i> ${year}
|
| 271 |
</span>
|
| 272 |
</div>
|
|
@@ -288,7 +288,7 @@
|
|
| 288 |
data-tmdb-id="${item.tmdb_id}"
|
| 289 |
data-db-index="${item.db_index ?? ''}"
|
| 290 |
data-title="${safeTitle}"
|
| 291 |
-
class="inline-flex items-center justify-center gap-2 px-3 py-2 rounded-2xl glass-panel hover:bg-red-500/10 text-red-300 text-xs font-bold transition border border-
|
| 292 |
<i class="fa-solid fa-trash"></i>
|
| 293 |
</button>
|
| 294 |
</div>
|
|
@@ -313,7 +313,7 @@
|
|
| 313 |
if (currentPage > 1) {
|
| 314 |
paginationHTML += `
|
| 315 |
<button onclick='loadMedia(${currentPage - 1}, ${JSON.stringify(currentSearch)})'
|
| 316 |
-
class="px-4 py-2 rounded-2xl glass-panel hover:bg-
|
| 317 |
Previous
|
| 318 |
</button>
|
| 319 |
`;
|
|
@@ -325,7 +325,7 @@
|
|
| 325 |
if (startPage > 1) {
|
| 326 |
paginationHTML += `
|
| 327 |
<button onclick='loadMedia(1, ${JSON.stringify(currentSearch)})'
|
| 328 |
-
class="px-4 py-2 rounded-2xl glass-panel hover:bg-
|
| 329 |
1
|
| 330 |
</button>
|
| 331 |
`;
|
|
@@ -341,7 +341,7 @@
|
|
| 341 |
class="px-4 py-2 rounded-2xl text-sm font-bold transition border
|
| 342 |
${isActive
|
| 343 |
? 'bg-primary text-white border-primary shadow-lg shadow-primary/20'
|
| 344 |
-
: 'glass-panel hover:bg-
|
| 345 |
${i}
|
| 346 |
</button>
|
| 347 |
`;
|
|
@@ -353,7 +353,7 @@
|
|
| 353 |
}
|
| 354 |
paginationHTML += `
|
| 355 |
<button onclick='loadMedia(${totalPages}, ${JSON.stringify(currentSearch)})'
|
| 356 |
-
class="px-4 py-2 rounded-2xl glass-panel hover:bg-
|
| 357 |
${totalPages}
|
| 358 |
</button>
|
| 359 |
`;
|
|
@@ -362,7 +362,7 @@
|
|
| 362 |
if (currentPage < totalPages) {
|
| 363 |
paginationHTML += `
|
| 364 |
<button onclick='loadMedia(${currentPage + 1}, ${JSON.stringify(currentSearch)})'
|
| 365 |
-
class="px-4 py-2 rounded-2xl glass-panel hover:bg-
|
| 366 |
Next
|
| 367 |
</button>
|
| 368 |
`;
|
|
|
|
| 9 |
<div class="flex flex-col gap-5">
|
| 10 |
<div class="flex flex-col md:flex-row md:items-end md:justify-between gap-4">
|
| 11 |
<div>
|
| 12 |
+
<div class="inline-flex items-center gap-2 px-3 py-1 rounded-full border border-hairline bg-surface text-xs font-semibold text-text-secondary mb-3">
|
| 13 |
<i class="fa-solid fa-clapperboard text-primary"></i>
|
| 14 |
Library Control
|
| 15 |
</div>
|
|
|
|
| 27 |
{% if media_type == 'movie' %}
|
| 28 |
bg-primary text-white border-primary shadow-lg shadow-primary/20
|
| 29 |
{% else %}
|
| 30 |
+
glass-panel text-text hover:bg-surface-2 border-hairline
|
| 31 |
{% endif %}">
|
| 32 |
<i class="fa-solid fa-film"></i>
|
| 33 |
Movies
|
|
|
|
| 37 |
{% if media_type == 'tv' %}
|
| 38 |
bg-primary text-white border-primary shadow-lg shadow-primary/20
|
| 39 |
{% else %}
|
| 40 |
+
glass-panel text-text hover:bg-surface-2 border-hairline
|
| 41 |
{% endif %}">
|
| 42 |
<i class="fa-solid fa-tv"></i>
|
| 43 |
TV Shows
|
|
|
|
| 46 |
</div>
|
| 47 |
|
| 48 |
<div class="grid grid-cols-1 md:grid-cols-3 gap-3">
|
| 49 |
+
<div class="rounded-2xl border border-hairline bg-surface px-4 py-3">
|
| 50 |
<p class="text-[11px] uppercase tracking-wider text-text-secondary font-bold">Current view</p>
|
| 51 |
<p class="mt-1 text-sm font-semibold text-text capitalize">{{ media_type }}</p>
|
| 52 |
</div>
|
| 53 |
+
<div class="rounded-2xl border border-hairline bg-surface px-4 py-3">
|
| 54 |
<p class="text-[11px] uppercase tracking-wider text-text-secondary font-bold">Actions</p>
|
| 55 |
<p class="mt-1 text-sm font-semibold text-text">Search, Edit, Delete</p>
|
| 56 |
</div>
|
|
|
|
| 81 |
Search
|
| 82 |
</button>
|
| 83 |
<button onclick="clearSearch()"
|
| 84 |
+
class="inline-flex justify-center items-center gap-2 glass-panel hover:bg-surface-2 text-text px-5 py-3 rounded-2xl transition font-bold border border-hairline">
|
| 85 |
<i class="fa-solid fa-rotate-left"></i>
|
| 86 |
Clear
|
| 87 |
</button>
|
|
|
|
| 91 |
|
| 92 |
<!-- Loading Indicator -->
|
| 93 |
<div id="loading" class="hidden text-center py-16">
|
| 94 |
+
<div class="inline-flex items-center justify-center w-14 h-14 rounded-full border border-hairline glass-panel mb-4">
|
| 95 |
<div class="animate-spin rounded-full h-7 w-7 border-b-2 border-primary"></div>
|
| 96 |
</div>
|
| 97 |
<p class="text-text-secondary">Loading {{ media_type }}s...</p>
|
|
|
|
| 126 |
<!-- No Results -->
|
| 127 |
<div id="no-results" class="hidden text-center py-16">
|
| 128 |
<div class="glass-panel rounded-3xl p-8 max-w-xl mx-auto">
|
| 129 |
+
<div class="mx-auto w-16 h-16 rounded-2xl bg-surface flex items-center justify-center mb-4 border border-hairline">
|
| 130 |
<i class="fa-solid fa-box-open text-3xl text-text-secondary"></i>
|
| 131 |
</div>
|
| 132 |
<h3 class="text-xl font-bold text-text mb-2">No {{ media_type }}s found</h3>
|
|
|
|
| 260 |
const safeTitle = title.replace(/"/g, '"');
|
| 261 |
|
| 262 |
return `
|
| 263 |
+
<div class="group overflow-hidden rounded-3xl glass-panel border border-hairline hover:border-primary/30 transition-all duration-300 hover:-translate-y-1 hover:shadow-2xl">
|
| 264 |
<div class="relative overflow-hidden">
|
| 265 |
<img src="${poster}" alt="${title}" class="w-full aspect-[2/3] object-cover transition duration-300 group-hover:scale-105" onerror="this.src='https://via.placeholder.com/300x450/e5e7eb/9ca3af?text=No+Image'" loading="lazy">
|
| 266 |
<div class="absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
|
| 267 |
|
| 268 |
<div class="absolute top-3 left-3">
|
| 269 |
+
<span class="inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-black/60 text-white text-[11px] font-bold border border-hairline">
|
| 270 |
<i class="fa-solid fa-calendar-days"></i> ${year}
|
| 271 |
</span>
|
| 272 |
</div>
|
|
|
|
| 288 |
data-tmdb-id="${item.tmdb_id}"
|
| 289 |
data-db-index="${item.db_index ?? ''}"
|
| 290 |
data-title="${safeTitle}"
|
| 291 |
+
class="inline-flex items-center justify-center gap-2 px-3 py-2 rounded-2xl glass-panel hover:bg-red-500/10 text-red-300 text-xs font-bold transition border border-hairline">
|
| 292 |
<i class="fa-solid fa-trash"></i>
|
| 293 |
</button>
|
| 294 |
</div>
|
|
|
|
| 313 |
if (currentPage > 1) {
|
| 314 |
paginationHTML += `
|
| 315 |
<button onclick='loadMedia(${currentPage - 1}, ${JSON.stringify(currentSearch)})'
|
| 316 |
+
class="px-4 py-2 rounded-2xl glass-panel hover:bg-surface-2 text-text text-sm font-bold transition border border-hairline">
|
| 317 |
Previous
|
| 318 |
</button>
|
| 319 |
`;
|
|
|
|
| 325 |
if (startPage > 1) {
|
| 326 |
paginationHTML += `
|
| 327 |
<button onclick='loadMedia(1, ${JSON.stringify(currentSearch)})'
|
| 328 |
+
class="px-4 py-2 rounded-2xl glass-panel hover:bg-surface-2 text-text text-sm font-bold transition border border-hairline">
|
| 329 |
1
|
| 330 |
</button>
|
| 331 |
`;
|
|
|
|
| 341 |
class="px-4 py-2 rounded-2xl text-sm font-bold transition border
|
| 342 |
${isActive
|
| 343 |
? 'bg-primary text-white border-primary shadow-lg shadow-primary/20'
|
| 344 |
+
: 'glass-panel hover:bg-surface-2 text-text border-hairline'}">
|
| 345 |
${i}
|
| 346 |
</button>
|
| 347 |
`;
|
|
|
|
| 353 |
}
|
| 354 |
paginationHTML += `
|
| 355 |
<button onclick='loadMedia(${totalPages}, ${JSON.stringify(currentSearch)})'
|
| 356 |
+
class="px-4 py-2 rounded-2xl glass-panel hover:bg-surface-2 text-text text-sm font-bold transition border border-hairline">
|
| 357 |
${totalPages}
|
| 358 |
</button>
|
| 359 |
`;
|
|
|
|
| 362 |
if (currentPage < totalPages) {
|
| 363 |
paginationHTML += `
|
| 364 |
<button onclick='loadMedia(${currentPage + 1}, ${JSON.stringify(currentSearch)})'
|
| 365 |
+
class="px-4 py-2 rounded-2xl glass-panel hover:bg-surface-2 text-text text-sm font-bold transition border border-hairline">
|
| 366 |
Next
|
| 367 |
</button>
|
| 368 |
`;
|
Backend/fastapi/templates/settings.html
CHANGED
|
@@ -26,8 +26,7 @@
|
|
| 26 |
|
| 27 |
/* ── Section cards ───────────────────────────────────────────────────────── */
|
| 28 |
.settings-card {
|
| 29 |
-
background: color-mix(in srgb, var(--card)
|
| 30 |
-
backdrop-filter: blur(20px);
|
| 31 |
border: 1px solid var(--border);
|
| 32 |
border-radius: 1.5rem;
|
| 33 |
padding: 1.5rem 1.75rem;
|
|
|
|
| 26 |
|
| 27 |
/* ── Section cards ───────────────────────────────────────────────────────── */
|
| 28 |
.settings-card {
|
| 29 |
+
background: color-mix(in srgb, var(--card) 94%, var(--bg));
|
|
|
|
| 30 |
border: 1px solid var(--border);
|
| 31 |
border-radius: 1.5rem;
|
| 32 |
padding: 1.5rem 1.75rem;
|
Backend/fastapi/templates/subscriptions_manage.html
CHANGED
|
@@ -72,10 +72,8 @@
|
|
| 72 |
|
| 73 |
.glass-btn {
|
| 74 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
| 75 |
-
background: color-mix(in srgb, var(--card)
|
| 76 |
color: var(--text);
|
| 77 |
-
backdrop-filter: blur(14px);
|
| 78 |
-
-webkit-backdrop-filter: blur(14px);
|
| 79 |
transition: all 0.25s ease;
|
| 80 |
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
|
| 81 |
}
|
|
@@ -149,12 +147,10 @@
|
|
| 149 |
border-radius: 1.5rem;
|
| 150 |
background: linear-gradient(
|
| 151 |
180deg,
|
| 152 |
-
color-mix(in srgb, var(--card)
|
| 153 |
-
color-mix(in srgb, var(--card)
|
| 154 |
);
|
| 155 |
border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
|
| 156 |
-
backdrop-filter: blur(18px);
|
| 157 |
-
-webkit-backdrop-filter: blur(18px);
|
| 158 |
box-shadow: 0 12px 30px rgba(0,0,0,0.18);
|
| 159 |
transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
|
| 160 |
}
|
|
|
|
| 72 |
|
| 73 |
.glass-btn {
|
| 74 |
border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
|
| 75 |
+
background: color-mix(in srgb, var(--card) 92%, var(--bg));
|
| 76 |
color: var(--text);
|
|
|
|
|
|
|
| 77 |
transition: all 0.25s ease;
|
| 78 |
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
|
| 79 |
}
|
|
|
|
| 147 |
border-radius: 1.5rem;
|
| 148 |
background: linear-gradient(
|
| 149 |
180deg,
|
| 150 |
+
color-mix(in srgb, var(--card) 96%, var(--bg)),
|
| 151 |
+
color-mix(in srgb, var(--card) 88%, var(--bg))
|
| 152 |
);
|
| 153 |
border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
|
|
|
|
|
|
|
| 154 |
box-shadow: 0 12px 30px rgba(0,0,0,0.18);
|
| 155 |
transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
|
| 156 |
}
|
Backend/fastapi/templates/tools.html
CHANGED
|
@@ -5,8 +5,7 @@
|
|
| 5 |
|
| 6 |
<style>
|
| 7 |
.tool-card {
|
| 8 |
-
background: color-mix(in srgb, var(--card)
|
| 9 |
-
backdrop-filter: blur(20px);
|
| 10 |
border: 1px solid var(--border);
|
| 11 |
border-radius: 1.5rem;
|
| 12 |
padding: 1.5rem 1.75rem;
|
|
|
|
| 5 |
|
| 6 |
<style>
|
| 7 |
.tool-card {
|
| 8 |
+
background: color-mix(in srgb, var(--card) 94%, var(--bg));
|
|
|
|
| 9 |
border: 1px solid var(--border);
|
| 10 |
border-radius: 1.5rem;
|
| 11 |
padding: 1.5rem 1.75rem;
|
Backend/fastapi/themes.py
CHANGED
|
@@ -1,131 +1,145 @@
|
|
|
|
|
|
|
|
| 1 |
THEMES = {
|
| 2 |
-
"
|
| 3 |
-
"name": "
|
| 4 |
"is_dark": True,
|
| 5 |
"colors": {
|
| 6 |
-
"primary": "#
|
| 7 |
-
"secondary": "#
|
| 8 |
-
"accent": "#
|
| 9 |
-
"background": "#
|
| 10 |
-
"card": "#
|
| 11 |
-
"border": "#
|
| 12 |
-
"text": "#
|
| 13 |
-
"text_secondary": "#
|
| 14 |
},
|
| 15 |
-
"css_classes": "theme-
|
| 16 |
},
|
| 17 |
-
"
|
| 18 |
-
"name": "
|
| 19 |
-
"is_dark":
|
| 20 |
"colors": {
|
| 21 |
-
"primary": "#
|
| 22 |
-
"secondary": "#
|
| 23 |
-
"accent": "#
|
| 24 |
-
"background": "#
|
| 25 |
-
"card": "#
|
| 26 |
-
"border": "#
|
| 27 |
-
"text": "#
|
| 28 |
-
"text_secondary": "#
|
| 29 |
},
|
| 30 |
-
"css_classes": "theme-
|
| 31 |
},
|
| 32 |
-
"
|
| 33 |
-
"name": "
|
| 34 |
-
"is_dark":
|
| 35 |
"colors": {
|
| 36 |
-
"primary": "#
|
| 37 |
-
"secondary": "#
|
| 38 |
-
"accent": "#
|
| 39 |
-
"background": "#
|
| 40 |
-
"card": "#
|
| 41 |
-
"border": "#
|
| 42 |
-
"text": "#
|
| 43 |
-
"text_secondary": "#
|
| 44 |
},
|
| 45 |
-
"css_classes": "theme-
|
| 46 |
},
|
| 47 |
-
"
|
| 48 |
-
"name": "
|
| 49 |
"is_dark": True,
|
| 50 |
"colors": {
|
| 51 |
-
"primary": "#
|
| 52 |
-
"secondary": "#
|
| 53 |
-
"accent": "#
|
| 54 |
-
"background": "#
|
| 55 |
-
"card": "#
|
| 56 |
-
"border": "#
|
| 57 |
-
"text": "#
|
| 58 |
-
"text_secondary": "#
|
| 59 |
},
|
| 60 |
-
"css_classes": "theme-
|
| 61 |
},
|
| 62 |
-
"
|
| 63 |
-
"name": "
|
| 64 |
"is_dark": True,
|
| 65 |
"colors": {
|
| 66 |
-
"primary": "#
|
| 67 |
-
"secondary": "#
|
| 68 |
-
"accent": "#
|
| 69 |
-
"background": "#
|
| 70 |
-
"card": "#
|
| 71 |
-
"border": "#
|
| 72 |
-
"text": "#
|
| 73 |
-
"text_secondary": "#
|
| 74 |
},
|
| 75 |
-
"css_classes": "theme-
|
| 76 |
},
|
| 77 |
-
"
|
| 78 |
-
"name": "
|
| 79 |
"is_dark": False,
|
| 80 |
"colors": {
|
| 81 |
-
"primary": "#
|
| 82 |
-
"secondary": "#
|
| 83 |
-
"accent": "#
|
| 84 |
-
"background": "#
|
| 85 |
"card": "#FFFFFF",
|
| 86 |
-
"border": "#
|
| 87 |
-
"text": "#
|
| 88 |
-
"text_secondary": "#
|
| 89 |
},
|
| 90 |
-
"css_classes": "theme-
|
| 91 |
},
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
"is_dark": False,
|
| 96 |
"colors": {
|
| 97 |
-
"primary": "#
|
| 98 |
-
"secondary": "#
|
| 99 |
-
"accent": "#
|
| 100 |
-
"background": "#
|
| 101 |
"card": "#FFFFFF",
|
| 102 |
-
"border": "#
|
| 103 |
-
"text": "#
|
| 104 |
-
"text_secondary": "#
|
| 105 |
},
|
| 106 |
-
"css_classes": "theme-
|
| 107 |
},
|
| 108 |
-
"
|
| 109 |
-
"name": "
|
| 110 |
"is_dark": False,
|
| 111 |
"colors": {
|
| 112 |
-
"primary": "#
|
| 113 |
-
"secondary": "#
|
| 114 |
-
"accent": "#
|
| 115 |
-
"background": "#
|
| 116 |
"card": "#FFFFFF",
|
| 117 |
-
"border": "#
|
| 118 |
-
"text": "#
|
| 119 |
-
"text_secondary": "#
|
| 120 |
},
|
| 121 |
-
"css_classes": "theme-
|
| 122 |
}
|
| 123 |
}
|
| 124 |
|
| 125 |
-
def get_theme(theme_name: str =
|
| 126 |
-
|
| 127 |
-
return THEMES.get(theme_name, THEMES["dark_professional"])
|
| 128 |
|
| 129 |
def get_all_themes():
|
| 130 |
-
"""Returns all available theme configurations."""
|
| 131 |
return THEMES
|
|
|
|
| 1 |
+
DEFAULT_THEME = "graphite_amber"
|
| 2 |
+
|
| 3 |
THEMES = {
|
| 4 |
+
"graphite_amber": {
|
| 5 |
+
"name": "Graphite Amber",
|
| 6 |
"is_dark": True,
|
| 7 |
"colors": {
|
| 8 |
+
"primary": "#F59E0B",
|
| 9 |
+
"secondary": "#D97706",
|
| 10 |
+
"accent": "#FBBF24",
|
| 11 |
+
"background": "#0C0C0D",
|
| 12 |
+
"card": "#18181B",
|
| 13 |
+
"border": "#2B2B30",
|
| 14 |
+
"text": "#FAFAF9",
|
| 15 |
+
"text_secondary": "#A9A8A4"
|
| 16 |
},
|
| 17 |
+
"css_classes": "theme-graphite-amber"
|
| 18 |
},
|
| 19 |
+
"amoled_midnight": {
|
| 20 |
+
"name": "AMOLED Midnight",
|
| 21 |
+
"is_dark": True,
|
| 22 |
"colors": {
|
| 23 |
+
"primary": "#38BDF8",
|
| 24 |
+
"secondary": "#0EA5E9",
|
| 25 |
+
"accent": "#818CF8",
|
| 26 |
+
"background": "#000000",
|
| 27 |
+
"card": "#0B0B0F",
|
| 28 |
+
"border": "#1E2430",
|
| 29 |
+
"text": "#F4F7FB",
|
| 30 |
+
"text_secondary": "#9AA6B8"
|
| 31 |
},
|
| 32 |
+
"css_classes": "theme-amoled-midnight"
|
| 33 |
},
|
| 34 |
+
"obsidian_emerald": {
|
| 35 |
+
"name": "Obsidian Emerald",
|
| 36 |
+
"is_dark": True,
|
| 37 |
"colors": {
|
| 38 |
+
"primary": "#10B981",
|
| 39 |
+
"secondary": "#059669",
|
| 40 |
+
"accent": "#34D399",
|
| 41 |
+
"background": "#08100C",
|
| 42 |
+
"card": "#111C16",
|
| 43 |
+
"border": "#203029",
|
| 44 |
+
"text": "#ECFDF5",
|
| 45 |
+
"text_secondary": "#92B6A4"
|
| 46 |
},
|
| 47 |
+
"css_classes": "theme-obsidian-emerald"
|
| 48 |
},
|
| 49 |
+
"royal_violet": {
|
| 50 |
+
"name": "Royal Violet",
|
| 51 |
"is_dark": True,
|
| 52 |
"colors": {
|
| 53 |
+
"primary": "#8B5CF6",
|
| 54 |
+
"secondary": "#7C3AED",
|
| 55 |
+
"accent": "#A78BFA",
|
| 56 |
+
"background": "#0B0712",
|
| 57 |
+
"card": "#171022",
|
| 58 |
+
"border": "#2C2142",
|
| 59 |
+
"text": "#F5F3FF",
|
| 60 |
+
"text_secondary": "#B4A8CF"
|
| 61 |
},
|
| 62 |
+
"css_classes": "theme-royal-violet"
|
| 63 |
},
|
| 64 |
+
"slate_ocean": {
|
| 65 |
+
"name": "Slate Ocean",
|
| 66 |
"is_dark": True,
|
| 67 |
"colors": {
|
| 68 |
+
"primary": "#0EA5E9",
|
| 69 |
+
"secondary": "#0284C7",
|
| 70 |
+
"accent": "#38BDF8",
|
| 71 |
+
"background": "#0A0F1A",
|
| 72 |
+
"card": "#121C2B",
|
| 73 |
+
"border": "#23324B",
|
| 74 |
+
"text": "#EFF6FF",
|
| 75 |
+
"text_secondary": "#93A7C4"
|
| 76 |
},
|
| 77 |
+
"css_classes": "theme-slate-ocean"
|
| 78 |
},
|
| 79 |
+
"rose_quartz": {
|
| 80 |
+
"name": "Rose Quartz",
|
| 81 |
"is_dark": False,
|
| 82 |
"colors": {
|
| 83 |
+
"primary": "#E11D48",
|
| 84 |
+
"secondary": "#BE123C",
|
| 85 |
+
"accent": "#F43F5E",
|
| 86 |
+
"background": "#FFF1F2",
|
| 87 |
"card": "#FFFFFF",
|
| 88 |
+
"border": "#FBD5DB",
|
| 89 |
+
"text": "#4C0519",
|
| 90 |
+
"text_secondary": "#8A2B3E"
|
| 91 |
},
|
| 92 |
+
"css_classes": "theme-rose-quartz"
|
| 93 |
},
|
| 94 |
+
"daylight_sky": {
|
| 95 |
+
"name": "Daylight Sky",
|
| 96 |
+
"is_dark": False,
|
| 97 |
+
"colors": {
|
| 98 |
+
"primary": "#2563EB",
|
| 99 |
+
"secondary": "#1D4ED8",
|
| 100 |
+
"accent": "#3B82F6",
|
| 101 |
+
"background": "#F8FAFC",
|
| 102 |
+
"card": "#FFFFFF",
|
| 103 |
+
"border": "#E2E8F0",
|
| 104 |
+
"text": "#0F172A",
|
| 105 |
+
"text_secondary": "#475569"
|
| 106 |
+
},
|
| 107 |
+
"css_classes": "theme-daylight-sky"
|
| 108 |
+
},
|
| 109 |
+
"sage_linen": {
|
| 110 |
+
"name": "Sage Linen",
|
| 111 |
"is_dark": False,
|
| 112 |
"colors": {
|
| 113 |
+
"primary": "#0F766E",
|
| 114 |
+
"secondary": "#0D9488",
|
| 115 |
+
"accent": "#14B8A6",
|
| 116 |
+
"background": "#F5F8F6",
|
| 117 |
"card": "#FFFFFF",
|
| 118 |
+
"border": "#DCE7E3",
|
| 119 |
+
"text": "#11271F",
|
| 120 |
+
"text_secondary": "#4B5D58"
|
| 121 |
},
|
| 122 |
+
"css_classes": "theme-sage-linen"
|
| 123 |
},
|
| 124 |
+
"golden_hour": {
|
| 125 |
+
"name": "Golden Hour",
|
| 126 |
"is_dark": False,
|
| 127 |
"colors": {
|
| 128 |
+
"primary": "#B45309",
|
| 129 |
+
"secondary": "#92400E",
|
| 130 |
+
"accent": "#D97706",
|
| 131 |
+
"background": "#FFFBF2",
|
| 132 |
"card": "#FFFFFF",
|
| 133 |
+
"border": "#F0E4CC",
|
| 134 |
+
"text": "#3F2D12",
|
| 135 |
+
"text_secondary": "#7A5A2E"
|
| 136 |
},
|
| 137 |
+
"css_classes": "theme-golden-hour"
|
| 138 |
}
|
| 139 |
}
|
| 140 |
|
| 141 |
+
def get_theme(theme_name: str = DEFAULT_THEME):
|
| 142 |
+
return THEMES.get(theme_name, THEMES[DEFAULT_THEME])
|
|
|
|
| 143 |
|
| 144 |
def get_all_themes():
|
|
|
|
| 145 |
return THEMES
|