
window.localStorage was null, so trying to read would fail seen on falkon 23.08.4 with qtwebengine 5.15.12 (fedora39) might as well be paranoid about the other failure modes too (sudden exceptions on reads and/or writes)
121 lines
3.7 KiB
HTML
121 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{{ s_doctitle }}</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
|
<meta name="theme-color" content="#333">
|
|
{{ html_head }}
|
|
<link rel="stylesheet" media="screen" href="{{ r }}/.cpr/splash.css?_={{ ts }}">
|
|
<link rel="stylesheet" media="screen" href="{{ r }}/.cpr/ui.css?_={{ ts }}">
|
|
</head>
|
|
|
|
<body>
|
|
<div id="wrap">
|
|
<a id="a" href="{{ r }}/?h" class="af">refresh</a>
|
|
<a id="v" href="{{ r }}/?hc" class="af">connect</a>
|
|
|
|
{%- if this.uname == '*' %}
|
|
<p id="b">howdy stranger <small>(you're not logged in)</small></p>
|
|
{%- else %}
|
|
<a id="c" href="{{ r }}/?pw=x" class="logout">logout</a>
|
|
<p><span id="m">welcome back,</span> <strong>{{ this.uname }}</strong></p>
|
|
{%- endif %}
|
|
|
|
{%- if msg %}
|
|
<div id="msg">
|
|
{{ msg }}
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if avol %}
|
|
<h1>admin panel:</h1>
|
|
<table><tr><td> <!-- hehehe -->
|
|
<table class="num">
|
|
<tr><td>scanning</td><td>{{ scanning }}</td></tr>
|
|
<tr><td>hash-q</td><td>{{ hashq }}</td></tr>
|
|
<tr><td>tag-q</td><td>{{ tagq }}</td></tr>
|
|
<tr><td>mtp-q</td><td>{{ mtpq }}</td></tr>
|
|
<tr><td>db-act</td><td id="u">{{ dbwt }}</td></tr>
|
|
</table>
|
|
</td><td>
|
|
<table class="vols">
|
|
<thead><tr><th>vol</th><th id="t">action</th><th>status</th></tr></thead>
|
|
<tbody>
|
|
{% for mp in avol %}
|
|
{%- if mp in vstate and vstate[mp] %}
|
|
<tr><td><a href="{{ r }}{{ mp }}{{ url_suf }}">{{ mp }}</a></td><td><a class="s" href="{{ r }}{{ mp }}?scan">rescan</a></td><td>{{ vstate[mp] }}</td></tr>
|
|
{%- endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</td></tr></table>
|
|
<div class="btns">
|
|
<a id="d" href="{{ r }}/?stack">dump stack</a>
|
|
<a id="e" href="{{ r }}/?reload=cfg">reload cfg</a>
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if rvol %}
|
|
<h1 id="f">you can browse:</h1>
|
|
<ul>
|
|
{% for mp in rvol %}
|
|
<li><a href="{{ r }}{{ mp }}{{ url_suf }}">{{ mp }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{%- endif %}
|
|
|
|
{%- if wvol %}
|
|
<h1 id="g">you can upload to:</h1>
|
|
<ul>
|
|
{% for mp in wvol %}
|
|
<li><a href="{{ r }}{{ mp }}{{ url_suf }}">{{ mp }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{%- endif %}
|
|
|
|
<h1 id="cc">client config:</h1>
|
|
<ul>
|
|
{% if k304 %}
|
|
<li><a id="h" href="{{ r }}/?k304=n">disable k304</a> (currently enabled)
|
|
{%- else %}
|
|
<li><a id="i" href="{{ r }}/?k304=y" class="r">enable k304</a> (currently disabled)
|
|
{% endif %}
|
|
<blockquote id="j">enabling this will disconnect your client on every HTTP 304, which can prevent some buggy proxies from getting stuck (suddenly not loading pages), <em>but</em> it will also make things slower in general</blockquote></li>
|
|
|
|
<li><a id="k" href="{{ r }}/?reset" class="r" onclick="localStorage.clear();return true">reset client settings</a></li>
|
|
</ul>
|
|
|
|
<h1 id="l">login for more:</h1>
|
|
<div>
|
|
<form method="post" enctype="multipart/form-data" action="{{ r }}/{{ qvpath }}">
|
|
<input type="hidden" name="act" value="login" />
|
|
<input type="password" name="cppwd" />
|
|
<input type="submit" value="Login" />
|
|
{% if ahttps %}
|
|
<a id="w" href="{{ ahttps }}">switch to https</a>
|
|
{% endif %}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<a href="#" id="repl">π</a>
|
|
{%- if not this.args.nb %}
|
|
<span id="pb"><span>powered by</span> <a href="{{ this.args.pb_url }}">copyparty {{ver}}</a></span>
|
|
{%- endif %}
|
|
<script>
|
|
|
|
var SR = {{ r|tojson }},
|
|
lang="{{ lang }}",
|
|
dfavico="{{ favico }}";
|
|
|
|
var STG = window.localStorage;
|
|
document.documentElement.className = (STG && STG.cpp_thm) || "{{ this.args.theme }}";
|
|
|
|
</script>
|
|
<script src="{{ r }}/.cpr/util.js?_={{ ts }}"></script>
|
|
<script src="{{ r }}/.cpr/splash.js?_={{ ts }}"></script>
|
|
</body>
|
|
</html>
|