Rewrite UI text to be more plain and human

This commit is contained in:
2026-05-19 23:51:31 -07:00
parent 801779d84a
commit 66d8ff0203
+43 -57
View File
@@ -72,7 +72,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
let socks5_hidden = if proxy.mode == "socks5" { "" } else { " style=\"display:none\"" };
let network_section = format!(
r#"<div class="card">
<div class="card-title">Network / Proxy <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">restart required</span></div>
<div class="card-title">Proxy <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">needs restart</span></div>
<form method="POST" action="/ui/settings/network">
<div class="radio-group">{proxy_radios}</div>
<div id="socks5-url"{socks5_hidden} style="margin-top:.75rem">
@@ -104,7 +104,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
let relays_section = format!(
r#"<div class="card">
<div class="card-title">Relays <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">restart required</span></div>
<div class="card-title">Relays <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">needs restart</span></div>
<div class="relay-list" style="margin-bottom:.75rem">{relay_rows}</div>
<form method="POST" action="/ui/settings/relays/add">
<div class="form-row">
@@ -122,17 +122,17 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
let depth2 = if c.follow_depth == 2 { " selected" } else { "" };
let curation_section = format!(
r#"<div class="card">
<div class="card-title">Curation &amp; Trust</div>
<div class="card-title">Trust</div>
<form method="POST" action="/ui/settings/curation">
<div class="setting-row">
<label class="setting-label">Operator pubkey
<span class="setting-hint">Your Nostr pubkey (npub or hex) — root of the follow graph</span>
<label class="setting-label">Your Nostr pubkey
<span class="setting-hint">npub or 64-char hex. Used to build your trust list from who you follow.</span>
</label>
<input type="text" name="operator_pubkey" value="{op_pk}" placeholder="npub1… or 64-char hex" style="width:420px" class="mono-in">
</div>
<div class="setting-row">
<label class="setting-label">Follow depth
<span class="setting-hint">How many hops to include in the Web of Trust graph</span>
<span class="setting-hint">1 = just people you follow. 2 = people your follows follow too.</span>
</label>
<select name="follow_depth">
<option value="1"{depth1}>1 — direct follows only</option>
@@ -140,17 +140,17 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
</select>
</div>
<div class="setting-row">
<label class="setting-label">WoT only
<span class="setting-hint">Drop events from pubkeys outside your follow graph</span>
<label class="setting-label">Trusted only
<span class="setting-hint">Ignore posts from anyone not in your follow network</span>
</label>
<label class="toggle-label">
<input type="checkbox" name="wot_only" value="true"{wot_checked}>
Only index publishers in my follow graph
Only index posts from people I follow
</label>
</div>
<div class="setting-row">
<label class="setting-label">Auto-block threshold
<span class="setting-hint">Block a publisher automatically after this many reports</span>
<label class="setting-label">Auto-block after reports
<span class="setting-hint">Auto-block a publisher once they hit this many reports</span>
</label>
<input type="number" name="auto_block_threshold" value="{abt}" min="1" max="100" style="width:80px">
</div>
@@ -166,11 +166,11 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
// ── Ingest ────────────────────────────────────────────────────────────────
let ingest_section = format!(
r#"<div class="card">
<div class="card-title">Ingest <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">restart required</span></div>
<div class="card-title">History <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">needs restart</span></div>
<form method="POST" action="/ui/settings/ingest">
<div class="setting-row">
<label class="setting-label">Backfill days
<span class="setting-hint">How far back to request history from a relay that has never been seen before</span>
<label class="setting-label">Days of history to fetch
<span class="setting-hint">How far back to go when connecting to a relay for the first time</span>
</label>
<input type="number" name="backfill_days" value="{bd}" min="1" max="3650" style="width:100px">
</div>
@@ -190,7 +190,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
<form method="POST" action="/ui/settings/tmdb">
<div class="setting-row">
<label class="setting-label">Enabled
<span class="setting-hint">Look up movie/TV metadata from TMDB when a torrent has no TMDB ID tag</span>
<span class="setting-hint">Automatically look up movie and TV info for better matching in Sonarr and Radarr</span>
</label>
<label class="toggle-label">
<input type="checkbox" name="enabled" value="true"{tmdb_checked}>
@@ -199,7 +199,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
</div>
<div class="setting-row">
<label class="setting-label">API key
<span class="setting-hint">TMDB v3 read access token — <a href="https://www.themoviedb.org/settings/api" target="_blank">get one here</a></span>
<span class="setting-hint">Free to get at <a href="https://www.themoviedb.org/settings/api" target="_blank">themoviedb.org</a></span>
</label>
<input type="text" name="api_key" value="{api_key}" placeholder="eyJ…" style="width:420px" class="mono-in">
</div>
@@ -217,7 +217,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
let deluge_labels = d.labels.join(", ");
let deluge_section = format!(
r#"<div class="card">
<div class="card-title">Deluge <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">restart required</span></div>
<div class="card-title">Deluge <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">needs restart</span></div>
<form method="POST" action="/ui/settings/deluge">
<div class="setting-row">
<label class="setting-label">Enabled</label>
@@ -228,7 +228,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
</div>
<div class="setting-row">
<label class="setting-label">Web UI URL
<span class="setting-hint">Enable the Web UI plugin in Deluge, then log in once in a browser to set a password. Default port is 8112.</span>
<span class="setting-hint">The Deluge web UI address. You need to log into it in a browser at least once to set a password. Default port is 8112.</span>
</label>
<input type="text" name="url" value="{d_url}" placeholder="http://127.0.0.1:8112" style="width:280px">
</div>
@@ -263,7 +263,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
let qb_cats = qb.categories.join(", ");
let qbittorrent_section = format!(
r#"<div class="card">
<div class="card-title">qBittorrent <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">restart required</span></div>
<div class="card-title">qBittorrent <span class="badge badge-warn" style="font-size:10px;vertical-align:middle">needs restart</span></div>
<form method="POST" action="/ui/settings/qbittorrent">
<div class="setting-row">
<label class="setting-label">Web UI URL</label>
@@ -330,7 +330,7 @@ async fn render(state: &AppState, params: &PageParams) -> anyhow::Result<Html<St
let apikeys_section = format!(
r#"<div class="card">
<div class="card-title">API Keys — for Sonarr / Radarr / Lidarr</div>
<div class="card-title">API Keys</div>
<div class="table-wrap" style="margin-bottom:.9rem">
<table>
<thead><tr><th>Label</th><th>Key</th><th>Created</th><th>Last used</th><th></th></tr></thead>
@@ -367,69 +367,55 @@ function copyKey() {
let body = format!(
r#"<h1>Settings</h1>
<p style="color:var(--muted);font-size:13px;margin-bottom:1.2rem">
Settings saved here are stored in the database and applied on the next restart.
They override values in your YAML config file. Sections marked
<span class="badge badge-warn" style="font-size:10px;vertical-align:middle">restart required</span>
take effect after restarting kindexr.
Changes here are saved to the database. Anything marked
<span class="badge badge-warn" style="font-size:10px;vertical-align:middle">needs restart</span>
won't kick in until you restart kindexr.
</p>
{flash}
<div class="section">
<div class="section-title">API Keys</div>
<p class="section-desc">API keys authenticate requests from Sonarr, Radarr, Lidarr, Readarr, and Prowlarr.
Each app gets its own key so you can revoke access individually without affecting other clients.
The key is entered in the indexer settings of each app — label it so you remember which is which.</p>
<p class="section-desc">Paste one of these into Sonarr, Radarr or any other app when adding this as an indexer.
Give each app its own key so you can cut one off without breaking the others.</p>
{apikeys_section}
</div>
<div class="section">
<div class="section-title">Torrent clients</div>
<p class="section-desc">kindexr can watch a torrent client for newly completed downloads and automatically
publish them to Nostr as kind 2003 events. Only one client needs to be configured.
Use labels (Deluge) or categories (qBittorrent) to control which torrents get published —
leave them blank to publish everything that finishes downloading.</p>
<p class="section-desc">Hook up your torrent client and kindexr will post finished downloads to Nostr automatically.
You only need one client configured. If you only want certain torrents published, set a label or category
on them in your client and put it here. Leave it blank to publish everything that finishes.</p>
{deluge_section}
{qbittorrent_section}
</div>
<div class="section">
<div class="section-title">Network</div>
<p class="section-desc">Controls how kindexr connects to Nostr relays and external APIs (TMDB).
Direct mode uses your server's default network. Tor and I2P route all outbound traffic through
the respective anonymity network — the proxy must already be running on the same machine.
SOCKS5 lets you point at any proxy, including PIA or Mullvad's built-in proxies.</p>
<p class="section-desc">How kindexr reaches the internet. Direct is the default. Tor and I2P need to already be running
on this machine. SOCKS5 works with PIA, Mullvad or any proxy you have set up.</p>
{network_section}
</div>
<div class="section">
<div class="section-title">Relays</div>
<p class="section-desc">Nostr relays kindexr subscribes to for incoming kind 2003 torrent events.
More relays means broader coverage but higher bandwidth and connection overhead.
kindexr tracks the last event seen per relay so it only requests new events on reconnect —
removing and re-adding a relay will re-fetch its full history up to the backfill window.</p>
<p class="section-desc">The Nostr relays to pull torrent posts from. More relays means more content but uses more bandwidth.
kindexr remembers where it left off on each one so it won't re-download old stuff when it restarts.</p>
{relays_section}
</div>
<div class="section">
<div class="section-title">Curation &amp; Trust</div>
<p class="section-desc">Controls which publishers kindexr trusts and indexes.
The <strong>operator pubkey</strong> is your Nostr identity — kindexr reads your kind 3 follow list
from the relay network every 24 hours and uses it to score publishers by how many hops away
they are from you. Publishers outside your follow graph get a lower trust score.
Enable <strong>WoT only</strong> to hard-drop events from anyone not in your graph.
Use the Publishers page to manually override trust for specific pubkeys.</p>
<div class="section-title">Trust</div>
<p class="section-desc">Your Nostr pubkey is used to figure out who to trust. People you follow get a higher score,
people your follows follow get a bit less, everyone else is untrusted. Turn on trusted only to ignore posts
from people completely outside that circle. You can always override individual publishers on the Publishers page.</p>
{curation_section}
</div>
<div class="section">
<div class="section-title">Ingest</div>
<p class="section-desc">Controls how much history kindexr requests when first connecting to a relay.
The backfill window is applied per relay — if you add a new relay, kindexr will request events
going back this many days. Existing relays only receive events newer than the last one seen,
so changing this setting only affects relays added after the change.</p>
<div class="section-title">History</div>
<p class="section-desc">When you add a new relay, how far back should it grab posts from?
This only applies to relays you haven't connected to before. Existing ones pick up from where they left off.</p>
{ingest_section}
</div>
<div class="section">
<div class="section-title">TMDB enrichment</div>
<p class="section-desc">When enabled, kindexr looks up movie and TV show metadata from The Movie Database
for events that don't already have a TMDB ID tag. This helps Sonarr and Radarr match torrents
to their library entries. Requires a free TMDB API read-access token — get one at
<a href="https://www.themoviedb.org/settings/api" target="_blank">themoviedb.org</a>.
Lookups are cached for 7 days to avoid hitting rate limits.</p>
<div class="section-title">TMDB</div>
<p class="section-desc">Automatically fills in movie and TV show info so Sonarr and Radarr can match things properly.
You need a free API key from <a href="https://www.themoviedb.org/settings/api" target="_blank">themoviedb.org</a> to use this.
Results are cached so you won't run into rate limits.</p>
{tmdb_section}
</div>
{js}"#