{{define "content"}}{{template "settings-start" .}}{{with .Data}}

Social accounts

The keys Supermarket reads posts with, and the sign-ins it publishes with. Keys are kept in secrets.json in Supermarket's data folder, readable only by you; saved values are never shown, and an empty field keeps what's saved.

{{range .Networks}}{{template "network" .}}{{end}} {{end}}{{template "settings-end"}}{{end}} {{/* One network's card. Its keys form saves in place (htmx swaps the card for the server's new copy); the sign-in form is a sibling, not nested. */}} {{define "network"}}{{$set := .Set}}{{$name := .Name}}

{{.Name}} {{with .Connect}}{{if .Signed}}connected{{with .Account}} as {{.}}{{end}}{{else}}not connected{{end}}{{end}}

{{range .Fields}}
{{if index $set .Name}}{{end}}
{{end}}
{{if .Saved}}Saved.{{end}}
{{with .Connect}}

Sign in to post

{{if .Signed}}

Connected{{with .Account}} as {{.}}{{end}}{{if not .At.IsZero}}, {{ago .At}}{{end}}.

{{end}}

{{.Setup}} {{.Redirect}}{{with .Note}}
{{.}}{{end}}

{{end}}
{{end}}