Files
tv/web/settings.html
T
2026-08-27 11:32:37 -05:00

93 lines
5.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bug.tv — settings</title>
<link rel="stylesheet" href="css/tokens.css?v=20260826">
<link rel="stylesheet" href="css/base.css?v=20260826">
<link rel="stylesheet" href="css/components.css?v=20260826">
<link rel="stylesheet" href="css/pages.css?v=20260829">
</head>
<body>
<header class="site-header">
<div class="container site-header__inner">
<a class="brand" href="index.html">bug<span>.tv</span></a>
<nav class="site-header__nav" aria-label="Primary">
<a href="index.html">Home</a>
<a href="search.html">Search</a>
</nav>
<div class="site-header__actions">
<a class="icon-btn" href="search.html" aria-label="Search" title="Search">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
</a>
<a class="icon-btn is-active" href="settings.html" aria-label="Settings" title="Settings" aria-current="page">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
</a>
</div>
</div>
</header>
<main class="page container">
<div class="settings">
<nav class="settings__nav" aria-label="Settings sections">
<a class="settings__navlink is-active" href="#sources">Sources</a>
<a class="settings__navlink" href="#server">Server</a>
<a class="settings__navlink" href="#data">Data</a>
</nav>
<div class="settings__content">
<section class="settings__card" id="sources">
<h2>Sources</h2>
<p class="settings__hint">Choose which providers to search for streams. Saved in this browser; applies from the next stream lookup.</p>
<div class="settings__actions">
<button class="btn btn--ghost" id="allOn" type="button">Enable all</button>
<button class="btn btn--ghost" id="allOff" type="button">Disable all</button>
<button class="btn btn--ghost" id="providersReset" type="button">Server defaults</button>
</div>
<p class="settings__status" id="providersStatus"></p>
<div class="provider-list" id="providerList"></div>
</section>
<section class="settings__card" id="server">
<h2>Server</h2>
<p class="settings__hint">The REST API that bug.tv queries. Change this only if you run your own instance.</p>
<label class="field-label" for="apiBaseInput">API base URL</label>
<input class="field" id="apiBaseInput" type="text" spellcheck="false" autocomplete="off" placeholder="https://api-tv.bug.tools">
<div class="settings__actions">
<button class="btn btn--primary" id="apiBaseSave" type="button">Save</button>
<button class="btn btn--ghost" id="apiBaseReset" type="button">Reset to default</button>
</div>
<p class="settings__status" id="connStatus"></p>
</section>
<section class="settings__card" id="data">
<h2>Data</h2>
<p class="settings__hint">Everything bug.tv stores lives in this browser — no accounts, nothing on a server.</p>
<div class="settings__actions">
<button class="btn btn--ghost" id="clearHistory" type="button">Clear continue-watching</button>
<button class="btn btn--ghost" id="resetProviders" type="button">Reset source toggles</button>
</div>
<p class="settings__status" id="dataStatus"></p>
</section>
</div>
</div>
</main>
<footer class="site-footer">
<div class="container">
<span>bug.tv</span>
<span>API: <a id="apiBaseLabel" href="#" target="_blank" rel="noopener"></a></span>
</div>
</footer>
<script src="js/util.js?v=20260826"></script>
<script src="js/config.js?v=20260826"></script>
<script src="js/api.js?v=20260826"></script>
<script src="js/storage.js?v=20260826"></script>
<script src="js/cards.js?v=20260826"></script>
<script src="js/app.js?v=20260826"></script>
<script src="js/settings.js?v=20260826"></script>
</body>
</html>