mirror of
https://github.com/Dasemu/X-GeoBlock.git
synced 2026-11-26 23:36:11 +00:00
feat: redesign controls and configure cloud cache
This commit is contained in:
1 parent
070e07845c
commit
e12164c312
15 files changed
+178
-78
No files matched your search
+44
-26
@@ -1,27 +1,45 @@
|
||||
<!doctype html>
|
||||
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>X GeoBlock settings</title><link rel="stylesheet" href="options.css"></head>
|
||||
<body><main>
|
||||
<div class="brand"><img src="../icons/icon.png" alt=""><div><h1>X GeoBlock</h1><p class="lead">Hide posts based on the country shown in an account's About page.</p></div></div>
|
||||
<form id="settings">
|
||||
<label class="check"><input id="enabled" type="checkbox"> Enable filtering</label>
|
||||
<fieldset>
|
||||
<legend>Blocked countries and regions</legend>
|
||||
<p class="hint">X may show a country such as “United Kingdom” or a broader region such as “West Asia”. Nothing is blocked by default.</p>
|
||||
<div class="country-tools"><input id="country-search" type="search" placeholder="Search countries and regions…" autocomplete="off"><button type="button" class="link-button" id="clear-selection">Clear selection</button></div>
|
||||
<p id="selection-count" class="selection-count"></p>
|
||||
<div id="country-list" class="country-list"></div>
|
||||
</fieldset>
|
||||
<label class="check"><input id="placeholder" type="checkbox"> Show a clickable placeholder for hidden posts</label>
|
||||
<label class="check"><input id="debug-mode" type="checkbox"> Enable debug logging in the X page console</label>
|
||||
<fieldset class="cloud-settings">
|
||||
<legend>Collaborative cloud cache</legend>
|
||||
<p class="hint">Optional. Confirmed results reduce requests to X. Deploy the included Cloudflare Worker and enter its HTTPS URL.</p>
|
||||
<label for="cloud-endpoint">Worker URL</label>
|
||||
<input id="cloud-endpoint" type="url" placeholder="https://x-geoblock-cache.example.workers.dev" autocomplete="url">
|
||||
<label class="check"><input id="cloud-contribute" type="checkbox"> Contribute locally observed locations</label>
|
||||
<p class="hint">Contributions send a SHA-256 hash of the public username and its location. Following relationships, posts, and your blacklist are never uploaded.</p>
|
||||
</fieldset>
|
||||
<div class="actions"><button type="submit">Save settings</button><button type="button" class="secondary" id="clear">Clear user cache</button></div>
|
||||
<p id="status" role="status"></p>
|
||||
</form>
|
||||
</main><script src="../lib/config.js"></script><script src="../lib/countries.js"></script><script src="../lib/cloud-cache.js"></script><script src="options.js"></script></body></html>
|
||||
<html lang="en">
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>X GeoBlock // Control panel</title><link rel="stylesheet" href="options.css"></head>
|
||||
<body>
|
||||
<div class="noise" aria-hidden="true"></div>
|
||||
<main>
|
||||
<header class="masthead">
|
||||
<div class="identity"><div class="logo-shell"><img src="../icons/icon.png" alt=""></div><div><p class="kicker">XGB // CONTROL SYSTEM</p><h1>X GeoBlock</h1><p class="lead">Geographic signal filtering for your X timeline.</p></div></div>
|
||||
<div class="system-state"><span class="state-dot"></span><div><small>SYSTEM STATUS</small><strong>OPERATIONAL</strong></div></div>
|
||||
</header>
|
||||
|
||||
<form id="settings">
|
||||
<section class="panel master-panel">
|
||||
<div class="panel-index">01</div>
|
||||
<div class="panel-copy"><p class="section-tag">CORE</p><h2>Filter engine</h2><p>Analyze posts as they enter the timeline and apply your location rules.</p></div>
|
||||
<label class="switch" for="enabled"><input id="enabled" type="checkbox"><span class="track"><span></span></span><b>ACTIVE</b></label>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<div class="section-head"><div><p class="section-tag">02 // TARGET MATRIX</p><h2>Blocked locations</h2><p class="hint">Select countries or broader regions reported by X. The list starts empty.</p></div><div class="counter" id="selection-count">0 locations selected</div></div>
|
||||
<div class="country-tools"><label class="search-shell"><span aria-hidden="true">⌕</span><input id="country-search" type="search" placeholder="Search location database…" autocomplete="off"></label><button type="button" class="ghost" id="clear-selection">CLEAR ALL</button></div>
|
||||
<div id="country-list" class="country-list"></div>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<div class="section-head"><div><p class="section-tag">03 // BEHAVIOR</p><h2>Interface controls</h2></div></div>
|
||||
<div class="setting-grid">
|
||||
<label class="setting-card"><input id="placeholder" type="checkbox"><span class="checkmark"></span><span><strong>Reveal controls</strong><small>Show a clickable marker where a post was hidden.</small></span></label>
|
||||
<label class="setting-card"><input id="debug-mode" type="checkbox"><span class="checkmark"></span><span><strong>Diagnostic stream</strong><small>Write detailed activity to the X page console.</small></span></label>
|
||||
<label class="setting-card"><input id="skip-followed" type="checkbox"><span class="checkmark"></span><span><strong>Ignore followed accounts</strong><small>Always allow posts from accounts you follow.</small></span></label>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="panel cloud-panel">
|
||||
<div class="section-head"><div><p class="section-tag">04 // DISTRIBUTED CACHE</p><h2>Cloud relay</h2><p class="hint">Confirmed shared results reduce requests to X. Reads are enabled automatically.</p></div><span class="connected"><i></i>CONNECTED</span></div>
|
||||
<div class="endpoint"><span>ENDPOINT</span><code>x-geoblock-cache.dariosevilla.es</code><span class="lock" aria-label="Fixed endpoint">LOCKED</span></div>
|
||||
<label class="setting-card contribution"><input id="cloud-contribute" type="checkbox"><span class="checkmark"></span><span><strong>Contribute observations</strong><small>Send a SHA-256 username hash and observed location. Following data, posts and your blocklist stay local.</small></span></label>
|
||||
</section>
|
||||
|
||||
<footer class="actions"><div><button type="submit" class="primary">SAVE CONFIGURATION</button><button type="button" class="danger" id="clear">PURGE LOCAL CACHE</button></div><p id="status" role="status"></p></footer>
|
||||
</form>
|
||||
</main>
|
||||
<script src="../lib/config.js"></script><script src="../lib/countries.js"></script><script src="../lib/cloud-cache.js"></script><script src="options.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user