CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 13s
CI / federation-interop (push) Successful in 1m0s
CI / test (push) Successful in 2m53s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s
/api/v1/federation gains:
- GET /posts, DELETE /posts/{id}: manage your own posts from the UI.
- GET /preview/weekly: what the weekly summary would say right now, for
the week still in progress - never posted or stored. Backed by a new
weekly.preview() and schedule.current_week_start().
- GET /profiles/{username}/posts/{post_uuid} (public, unauthenticated):
backs the UI's post page, which can't itself speak ActivityPub.
Settings gain timezone/post_weekly_summary/post_milestones, already
present in sharing.EDITABLE since phase 3 step 2 but never added to
SharingSettingsSchema, so the API was silently dropping them from
responses. timezone validates against the same is_valid_timezone() the
service layer uses, with a dedicated marshmallow validator.
Fixed a real gap found while wiring the post page: ids.post_page_url()
took a username but never put it in the URL, so post.html would have
had no way to know whose post to look up. It's now ?u=<username>&id=<uuid>.
Sharing page gets a "What to post" section (weekly summary and
milestones toggles, a timezone field with a browser-supplied IANA
datalist where Intl.supportedValuesOf exists, and a live preview).
New posts.html lists a user's posts with delete (mirroring followers.js's
confirm-before-destructive-action pattern); new post.html is the public
landing page for a post's `url`, reached by browsers redirected from the
raw ActivityPub endpoint.
Verified by hand against a local dev server and a real browser: sign in,
enable sharing, preview and publish, list and delete a post, and follow
the ActivityPub redirect through to the public post page and its 404
after deletion - fixed one bug found this way (the preview box was
collapsing the summary's line breaks).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
109 lines
5.5 KiB
HTML
109 lines
5.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>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>
|