CI / validate-monitoring (push) Successful in 14s
CI / lint (push) Successful in 21s
CI / federation-interop (push) Successful in 1m21s
CI / test (push) Successful in 4m2s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 6s
Sharing page gets a "Now playing" section: off / show on profile / show on profile and post, as a single choice matching the settings column - generalised sharing.js's visibility-only radio-group handling to a small RADIO_GROUPS list so now_playing_mode reuses the same fill/ save logic rather than adding a second special case. Public profile API and profile.html gain a live "now playing" field, sourced from the same actors.now_playing_text() the actor document uses and gated the same way (now_playing_mode off means never showing it, whatever's actually playing). Refactored actors.py along the way: now_playing_field() takes settings directly and does its own off-mode gating, rather than build_document() doing it externally - one place decides whether the field is shown, reused by the actor document, the push Update, and now the public profile API. Verified by hand in a real browser: settings round-trip through the Sharing page's new radio group, the public profile page shows "Now playing: Reckoner by Radiohead" once now_playing_mode is on, and the raw actor document (curl, Accept: application/activity+json) carries the same PropertyValue attachment. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
125 lines
6.5 KiB
HTML
125 lines
6.5 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Sharing · Scrobbler</title>
|
|
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%231c2330'/%3E%3Ccircle cx='8' cy='8' r='3.5' fill='%23f2a541'/%3E%3C/svg%3E">
|
|
<link rel="stylesheet" href="css/style.css">
|
|
<script src="config.js"></script>
|
|
<script type="module" src="js/sharing.js"></script>
|
|
</head>
|
|
<body>
|
|
<header class="site-header" id="site-header"></header>
|
|
<main id="main">
|
|
<h1 class="page-title">Sharing</h1>
|
|
<p class="lede">Let people on Mastodon and other fediverse apps follow your listening.</p>
|
|
<div id="messages"></div>
|
|
<form id="sharing" class="sharing" hidden>
|
|
<div class="share-switch">
|
|
<input type="checkbox" id="enabled" name="enabled" role="switch">
|
|
<label for="enabled">Share my listening on the fediverse</label>
|
|
</div>
|
|
<div class="handle-panel" id="handle-panel" hidden>
|
|
<p class="display-status">Your fediverse handle</p>
|
|
<p class="approve-app handle" id="handle"></p>
|
|
<p class="muted">People can follow you by searching for this in their app. It can't be changed once people follow you.</p>
|
|
<p class="follower-summary" id="follower-summary"></p>
|
|
</div>
|
|
|
|
<fieldset class="choices">
|
|
<legend>Who can see posts</legend>
|
|
<div class="choice">
|
|
<input type="radio" id="vis-followers" name="visibility" value="followers">
|
|
<label for="vis-followers"><strong>Only your followers</strong><span class="muted">Posts go to followers and nowhere else.</span></label>
|
|
</div>
|
|
<div class="choice">
|
|
<input type="radio" id="vis-unlisted" name="visibility" value="unlisted">
|
|
<label for="vis-unlisted"><strong>Anyone who visits your profile</strong><span class="muted">Kept out of public timelines.</span></label>
|
|
</div>
|
|
<div class="choice">
|
|
<input type="radio" id="vis-public" name="visibility" value="public">
|
|
<label for="vis-public"><strong>Everyone</strong><span class="muted">Including public timelines and search.</span></label>
|
|
</div>
|
|
<p class="hint">"Only your followers" is only as private as who can follow you. To choose who sees your posts, turn on <em>Approve followers</em> below.</p>
|
|
</fieldset>
|
|
|
|
<fieldset class="choices">
|
|
<legend>Followers and discovery</legend>
|
|
<div class="choice">
|
|
<input type="checkbox" id="manually_approves_followers" name="manually_approves_followers">
|
|
<label for="manually_approves_followers"><strong>Approve followers</strong><span class="muted">New followers need your OK.</span></label>
|
|
</div>
|
|
<div class="choice">
|
|
<input type="checkbox" id="discoverable" name="discoverable">
|
|
<label for="discoverable"><strong>List me in directories</strong><span class="muted">Fediverse apps may suggest your profile to others.</span></label>
|
|
</div>
|
|
<div class="choice">
|
|
<input type="checkbox" id="indexable" name="indexable">
|
|
<label for="indexable"><strong>Allow search</strong><span class="muted">Your public posts may be found by full-text search.</span></label>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<fieldset class="choices">
|
|
<legend>What to post</legend>
|
|
<div class="choice">
|
|
<input type="checkbox" id="post_weekly_summary" name="post_weekly_summary">
|
|
<label for="post_weekly_summary"><strong>Weekly summary</strong><span class="muted">Your play count and top artist, once a week.</span></label>
|
|
</div>
|
|
<div class="choice">
|
|
<input type="checkbox" id="post_milestones" name="post_milestones">
|
|
<label for="post_milestones"><strong>Milestones</strong><span class="muted">Scrobble-count, artist-plays and top-10 milestones as you reach them.</span></label>
|
|
</div>
|
|
<div class="field">
|
|
<label for="timezone">Time zone</label>
|
|
<input id="timezone" name="timezone" list="timezones" autocomplete="off">
|
|
<datalist id="timezones"></datalist>
|
|
<span class="hint">Decides when your week ends for the weekly summary.</span>
|
|
</div>
|
|
<div class="button-row">
|
|
<button class="button button-quiet" type="button" id="preview-weekly">Preview this week's summary</button>
|
|
</div>
|
|
<div class="preview-box" id="weekly-preview" hidden></div>
|
|
<p class="muted"><a href="posts.html">See your posts</a></p>
|
|
</fieldset>
|
|
|
|
<fieldset class="choices">
|
|
<legend>Now playing</legend>
|
|
<div class="choice">
|
|
<input type="radio" id="np-off" name="now_playing_mode" value="off">
|
|
<label for="np-off"><strong>Off</strong><span class="muted">Nothing shown or posted.</span></label>
|
|
</div>
|
|
<div class="choice">
|
|
<input type="radio" id="np-profile" name="now_playing_mode" value="profile">
|
|
<label for="np-profile"><strong>Show on my profile</strong><span class="muted">A "Now playing" field, refreshed every few minutes and cleared when you stop.</span></label>
|
|
</div>
|
|
<div class="choice">
|
|
<input type="radio" id="np-posts" name="now_playing_mode" value="posts">
|
|
<label for="np-posts"><strong>Show on my profile and post</strong><span class="muted">The profile field, plus a post for each track played 30+ seconds, replacing the last one, at most every 30 minutes.</span></label>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<fieldset class="choices">
|
|
<legend>Profile</legend>
|
|
<div class="field">
|
|
<label for="display_name">Display name</label>
|
|
<input id="display_name" name="display_name" maxlength="100" autocomplete="off">
|
|
</div>
|
|
<div class="field">
|
|
<label for="bio">Bio</label>
|
|
<textarea id="bio" name="bio" maxlength="500" rows="3"></textarea>
|
|
<span class="hint">Shown on your fediverse profile. Plain text.</span>
|
|
</div>
|
|
<p class="muted" id="profile-link"></p>
|
|
</fieldset>
|
|
|
|
<div class="notice notice-error confirm-off" id="confirm-off" role="alertdialog" aria-live="assertive" hidden></div>
|
|
<div class="button-row save-row">
|
|
<button class="button" type="submit">Save sharing settings</button>
|
|
<span class="muted" id="save-status" role="status"></span>
|
|
</div>
|
|
</form>
|
|
</main>
|
|
</body>
|
|
</html>
|