Phase 10, part 7: posting accounts, and who may post to which

Social accounts become posting accounts: several per network, the
company's and each person's own, with their tokens kept per account. The
old sign-ins are adopted as the company's. Admins say who may post to which
(Settings → Posting accounts); a draft can go out from one account or a
copy to several, each recording who posted it and as what. Signing an
account out, or removing its owner, holds the posts scheduled to it and
tells whoever scheduled them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 09:26:34 -07:00
co-authored by Claude Opus 5.5
parent a4dd36f5a4
commit bb4772637c
31 changed files with 1758 additions and 325 deletions
+6 -2
View File
@@ -32,7 +32,11 @@
{{with .Connect}}
<div class="signin">
<h3>Sign in to post</h3>
{{if .Signed}}<p>Connected{{with .Account}} as <strong>{{.}}</strong>{{end}}{{if not .At.IsZero}}, {{ago .At}}{{end}}.</p>{{end}}
{{if .Accounts}}<ul class="accounts">{{range .Accounts}}
<li><strong>{{.Name}}</strong> <span class="muted small">{{if eq .Owner 0}}the company's{{else}}someone's own{{end}}, since {{.Created.Local.Format "2 Jan 2006"}}{{if not .Expires.IsZero}}, until {{.Expires.Local.Format "2 Jan 2006"}}{{end}}</span>
<form class="inline" method="post" action="/settings/posting/{{.ID}}/remove" data-confirm="Sign {{.Name}} out? Posts scheduled to it go back to Posts."><button type="submit" class="secondary small">Sign out</button></form></li>
{{end}}</ul>
<p class="help">Who may post to each: <a href="/settings/posting">Settings → Posting accounts</a>.</p>{{end}}
{{with .Expiry}}
{{if .Expired}}<p class="error">The sign-in expired on {{.At.Local.Format "2 Jan 2006"}}: reconnect to publish again.</p>
{{else if .Soon}}<p class="warn-text"><strong>The sign-in expires {{if eq .Days 0}}today{{else if eq .Days 1}}tomorrow{{else}}in {{.Days}} days{{end}}, on {{.At.Local.Format "2 Jan 2006"}}.</strong> Reconnect now to keep posting.</p>
@@ -40,7 +44,7 @@
{{end}}
<p class="help">{{.Setup}} <code>{{.Redirect}}</code>{{with .Note}}<br>{{.}}{{end}}</p>
<form method="post" action="/auth/{{.Provider}}/start">
<button type="submit" {{if not .Ready}}disabled title="Save the client ID{{if ne .Provider "x"}} and secret{{end}} first"{{end}}>{{if .Signed}}Reconnect{{else}}Connect{{end}} {{$name}}</button>
<button type="submit" {{if not .Ready}}disabled title="Save the client ID{{if ne .Provider "x"}} and secret{{end}} first"{{end}}>{{if .Signed}}Add or reconnect a company account{{else}}Connect {{$name}}{{end}}</button>
</form>
</div>
{{with .Page}}{{$pg := .}}