Social accounts: the redirect address at the top of each card
It sat under the Save button, while the keys' help pointed below to it. Now it comes first, with a Copy button, ahead of the keys that need it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -176,7 +176,7 @@ var accountFields = []secretField{
|
|||||||
{"X", secrets.XBearerToken, "Bearer token",
|
{"X", secrets.XBearerToken, "Bearer token",
|
||||||
"For reading posts; needs an X API plan with read access. In the X Developer Console, open your app → Keys and tokens → Bearer token.", xConsole},
|
"For reading posts; needs an X API plan with read access. In the X Developer Console, open your app → Keys and tokens → Bearer token.", xConsole},
|
||||||
{"X", secrets.XClientID, "OAuth 2.0 client ID",
|
{"X", secrets.XClientID, "OAuth 2.0 client ID",
|
||||||
"For posting. In your app, set up User authentication (read and write; type Web App; the callback URL below), then Keys and tokens → OAuth 2.0 Client ID.", xConsole},
|
"For posting. In your app, set up User authentication (read and write; type Web App; the callback URL above), then Keys and tokens → OAuth 2.0 Client ID.", xConsole},
|
||||||
{"X", secrets.XClientSecret, "OAuth 2.0 client secret",
|
{"X", secrets.XClientSecret, "OAuth 2.0 client secret",
|
||||||
"Next to the client ID, under Keys and tokens. Only a confidential client (Web App) has one; leave empty for a public client.", xConsole},
|
"Next to the client ID, under Keys and tokens. Only a confidential client (Web App) has one; leave empty for a public client.", xConsole},
|
||||||
{"LinkedIn", secrets.LinkedInClientID, "Client ID",
|
{"LinkedIn", secrets.LinkedInClientID, "Client ID",
|
||||||
@@ -188,7 +188,7 @@ var accountFields = []secretField{
|
|||||||
{"LinkedIn page", secrets.LinkedInPageClientSecret, "Client secret",
|
{"LinkedIn page", secrets.LinkedInPageClientSecret, "Client secret",
|
||||||
"On the same Auth tab, under the client ID.", linkedInApps},
|
"On the same Auth tab, under the client ID.", linkedInApps},
|
||||||
{"Reddit", secrets.RedditClientID, "Client ID",
|
{"Reddit", secrets.RedditClientID, "Client ID",
|
||||||
"Create app → choose \"web app\" and enter the redirect URI below. The client ID is the string under the app's name.", redditApps},
|
"Create app → choose \"web app\" and enter the redirect URI above. The client ID is the string under the app's name.", redditApps},
|
||||||
{"Reddit", secrets.RedditClientSecret, "Client secret",
|
{"Reddit", secrets.RedditClientSecret, "Client secret",
|
||||||
"On the same app, next to \"secret\".", redditApps},
|
"On the same app, next to \"secret\".", redditApps},
|
||||||
{"YouTube", secrets.YouTubeAPIKey, "API key",
|
{"YouTube", secrets.YouTubeAPIKey, "API key",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<h2>{{.Name}}
|
<h2>{{.Name}}
|
||||||
{{with .Connect}}{{if .Signed}}<span class="badge published">connected{{with .Account}} as {{.}}{{end}}</span>{{else}}<span class="badge">not connected</span>{{end}}{{end}}
|
{{with .Connect}}{{if .Signed}}<span class="badge published">connected{{with .Account}} as {{.}}{{end}}</span>{{else}}<span class="badge">not connected</span>{{end}}{{end}}
|
||||||
</h2>
|
</h2>
|
||||||
|
{{with .Connect}}<p class="help">{{.Setup}} <code id="redirect-{{.Provider}}">{{.Redirect}}</code> <button type="button" class="link small" data-copy="redirect-{{.Provider}}">Copy</button>{{with .Note}}<br>{{.}}{{end}}</p>{{end}}
|
||||||
<form method="post" action="/settings/accounts" hx-post="/settings/accounts" hx-target="closest section" hx-swap="outerHTML" autocomplete="off">
|
<form method="post" action="/settings/accounts" hx-post="/settings/accounts" hx-target="closest section" hx-swap="outerHTML" autocomplete="off">
|
||||||
<input type="hidden" name="network" value="{{.Name}}">
|
<input type="hidden" name="network" value="{{.Name}}">
|
||||||
{{range .Fields}}
|
{{range .Fields}}
|
||||||
@@ -42,7 +43,6 @@
|
|||||||
{{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>
|
{{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>
|
||||||
{{else}}<p class="help">The sign-in lasts until {{.At.Local.Format "2 Jan 2006"}}; {{.Network}} doesn't let it be renewed without signing in again. Supermarket reminds you two weeks before.</p>{{end}}
|
{{else}}<p class="help">The sign-in lasts until {{.At.Local.Format "2 Jan 2006"}}; {{.Network}} doesn't let it be renewed without signing in again. Supermarket reminds you two weeks before.</p>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<p class="help">{{.Setup}} <code>{{.Redirect}}</code>{{with .Note}}<br>{{.}}{{end}}</p>
|
|
||||||
<form method="post" action="/auth/{{.Provider}}/start">
|
<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}}Add or reconnect a company account{{else}}Connect {{$name}}{{end}}</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>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user