48 lines
3.6 KiB
Plaintext
Executable File
48 lines
3.6 KiB
Plaintext
Executable File
<%
|
|
const currentPage = typeof activePage === 'string' ? activePage : '';
|
|
const pageTitle = typeof title === 'string' && title ? title : 'Proxer Downloader';
|
|
const globalStatus = typeof global === 'object' && global ? global : {};
|
|
const summaryKnown = typeof counts === 'object' && counts !== null;
|
|
const downloadsPaused = globalStatus.captcha_blocked === true;
|
|
const pendingCount = summaryKnown ? (Number(counts.queued) || 0) + (Number(counts.processing) || 0) : null;
|
|
%>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="color-scheme" content="dark">
|
|
<title><%= pageTitle %><%= pageTitle === 'Proxer Downloader' ? '' : ' · Proxer Downloader' %></title>
|
|
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon">
|
|
<link rel="stylesheet" href="/style.css">
|
|
<script src="/app.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<a class="skip-link" href="#main-content">Skip to content</a>
|
|
<header class="topbar">
|
|
<div class="topbar-inner">
|
|
<a class="brand" href="/" aria-label="Proxer Downloader home">
|
|
<span class="brand-mark" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none"><path d="M12 4v11m-4-4 4 4 4-4M5 17v3h14v-3" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
|
|
<span class="brand-text">Proxer<span>Downloader</span></span>
|
|
</a>
|
|
<nav class="main-nav" aria-label="Main navigation">
|
|
<a href="/" class="nav-link<%= currentPage === 'dashboard' ? ' is-active' : '' %>"<%- currentPage === 'dashboard' ? ' aria-current="page"' : '' %>>Dashboard</a>
|
|
<a href="/download" class="nav-link<%= currentPage === 'download' ? ' is-active' : '' %>"<%- currentPage === 'download' ? ' aria-current="page"' : '' %>>New download</a>
|
|
<a href="/status" class="nav-link<%= currentPage === 'queue' ? ' is-active' : '' %>"<%- currentPage === 'queue' ? ' aria-current="page"' : '' %>>Queue <span id="nav-queue-count" class="nav-count"<%- pendingCount === null ? ' hidden' : '' %>><%= pendingCount === null ? '' : pendingCount.toLocaleString('en') %></span></a>
|
|
<a href="/pm2" class="nav-link<%= currentPage === 'workers' ? ' is-active' : '' %>"<%- currentPage === 'workers' ? ' aria-current="page"' : '' %>>Workers</a>
|
|
</nav>
|
|
<span id="global-status" class="connection-status<%= downloadsPaused ? ' is-paused' : summaryKnown ? ' is-ready' : '' %>" role="status" aria-live="polite"><span class="status-dot" aria-hidden="true"></span><span id="global-status-text"><%= downloadsPaused ? 'Downloads paused' : summaryKnown ? 'Queue ready' : 'Checking queue…' %></span></span>
|
|
</div>
|
|
</header>
|
|
<div class="notice-wrap">
|
|
<section id="captcha-alert" class="verification-notice" aria-label="Downloads need your attention"<%- downloadsPaused ? '' : ' hidden' %>>
|
|
<div class="notice-copy"><strong>Verification needed</strong><span id="captcha-message"><%= globalStatus.pause_reason === 'resolution'
|
|
? 'The video link could not be resolved. Possible causes include CAPTCHA or login verification, an unavailable video, or a source change. Workers are paused for verification.'
|
|
: 'Authentication or access needs verification on Proxer. Workers are paused until verification is complete.' %></span></div>
|
|
<form id="clear-captcha-form" action="/clear-captcha" method="POST">
|
|
<button type="submit" class="button button-warning button-small">Resume after verification</button>
|
|
</form>
|
|
</section>
|
|
</div>
|
|
<main id="main-content" class="app-main" data-page="<%= currentPage %>" tabindex="-1">
|