{{define "title"}}{{ tr "Settings" }} · {{ tr "Volumen admin" }}{{end}} {{define "content"}}

{{ tr "Settings" }}

{{ tr "Manage your account and users" }}

{{if .Notice}}
{{ .Notice }}
{{end}} {{if .Error}} {{end}}

{{ tr "Account" }}

{{ tr "Signed in as" }} {{ .CurrentUser }} · {{ tr .CurrentRole }}

{{ tr "Profile photo" }}

{{ tr "WebP, AVIF or SVG, max 10 MB. Shown in the sidebar." }}

{{if .CurrentUserRecord.Photo}} {{else}} {{ .UserInitial }} {{end}}
{{if .CurrentUserRecord.Photo}} {{end}}
{{if .CurrentUserRecord.Photo}} {{end}}

{{ tr "Language" }}

{{ tr "The interface language of your account. The login screen follows your last choice." }}

{{ tr "Colour scheme" }}

{{ tr "The colour scheme of your account. The login screen follows your last choice." }}

{{ tr "Identity" }}

{{ tr "Display name pre-fills the author field. Fediverse handle pre-fills the creator, and the ORCID pre-fills the author identifier of new publications." }}

{{ tr "Your Open Researcher and Contributor ID; it pre-fills the author field of new publications." }}

{{ tr "Security" }}

{{ tr "Change your password and username. You can also lock yourself out." }}

{{ tr "Two-factor authentication" }}

{{if .RecoveryCodes}}
{{ .RecoveryNotice }}
{{range .RecoveryCodes}}{{ . }}{{end}}
{{else if .TotpEnabled}}

{{ tr "Your sign-in asks for a code from your application after the password." }}

{{else if .TotpPending}}

{{ tr "Scan the code with your authenticator application, or enter the secret by hand, then confirm with the code it shows." }}

{{ .TotpSVG }}

{{ tr "Secret" }}

{{ .TotpSecret }}
{{else}}

{{ tr "Ask for a code from your authenticator application after the password. Voluntary: nothing changes until you finish the setup." }}

{{end}}
{{if .IsAdmin}}

{{ tr "Users" }}

{{ tr "Add or remove admin and editor accounts" }}

{{range .UserRows}}
{{if .Photo}} {{else}} {{ .Initial }} {{end}} {{ .Display }} {{if .IsSelf}} {{ tr "you" }}{{end}} @{{ .Username }}
{{if .IsSelf}} {{ tr .Role }} {{else}}
{{ tr "Reset password" }}
{{end}}
{{end}}

{{ tr "Add user" }}

{{ tr "Post templates" }}

{{ tr "Pre-fill new posts with a reusable structure" }}

{{if .TemplatesList}}
    {{range .TemplatesList}}
  • {{ .Name }}{{if .Tags}}: {{ join .Tags ", " }}{{end}}{{if .FieldsText}} · {{ .FieldsText }}{{end}}
  • {{end}}
{{else}}

{{ tr "No templates yet. Templates pre-fill the new-post form so you can keep your favourite structure on hand." }}

{{end}}

{{ tr "Extra editor inputs as TOML key = value lines, one per line, strings quoted: author, lang, doi, orcid, series, series_order, cover, excerpt." }}

{{ tr "Backup & restore" }}

{{ tr "Export or import all posts, media, users, and templates" }}

{{ tr "Export" }}

{{ trh "Download a .tar.gz archive of your entire site." }}

{{ tr "Download backup" }}

{{ tr "Import" }}

{{ tr "Restore from a previously exported archive. Overwrites existing data." }}

{{ tr "Version" }}

{{ tr "Keep Volumen up to date" }}

{{ tr "Installed version" }}

{{ tr "Running" }} {{ .Version }} {{if .UpdateAvailable}} · {{ tr "latest" }} {{ .UpdateAvailable }} {{end}}

{{if .UpdateAvailable}}
Volumen {{ .UpdateAvailable }} {{ tr "is available; you are running" }} {{ .Version }}. {{ tr "The server will restart." }}
{{else}}
{{end}}

{{ tr "Webhooks" }}

{{ tr "Notify external services when posts change" }}

{{ tr "Endpoints" }}

{{if not .WebhookRows}}

{{ trh "No webhooks yet. Add an endpoint below, or declare [[webhooks]] blocks in config.toml (those are read-only here):" }}

[[webhooks]]
url = "https://example.com/hooks/rebuild"
secret = "a-long-random-string"   # HMAC-SHA256 signing key
events = ["post.created", "post.updated", "post.deleted", "post.published"]
{{else}}

{{ tr "Signed JSON payloads are POSTed on post changes. Changes apply without a restart." }}

{{range .WebhookRows}} {{end}}
URL{{ tr "Events" }}
{{ .URL }} {{if not .Enabled}}{{ tr "disabled" }}{{end}} {{if .Signed}}{{ tr "signed" }}{{end}} {{if not .Managed}}{{ tr "from config" }}{{end}} {{ .EventsText }}
{{if .Managed}}
{{if .Enabled}} {{else}}{{end}}
{{end}}
{{end}}
{{ tr "Add webhook" }}
{{if .WebhookDeliveries}}

{{ tr "Recent deliveries" }}

{{ tr "Kept in memory; cleared on restart." }}

{{range .WebhookDeliveries}} {{end}}
{{ tr "When" }}{{ tr "Event" }}{{ tr "Endpoint" }}{{ tr "Result" }}
{{ .Timestamp }} {{ .Event }} {{ .HookURL }} {{if .OK}} HTTP {{ .StatusCode }} {{else}} {{ .Result }} {{end}}
{{end}}

{{ tr "API tokens" }}

{{ tr "Programmatic write access to the public API" }}

{{ tr "Access tokens" }}

{{ trh "Send a token as Authorization: Bearer <token> on POST/PUT/DELETE /api/volumen/posts." }}

{{if .NewToken}}
{{ tr "Copy this token now; it will never be shown again." }}
{{ .NewToken }}
{{end}} {{if .TokenRows}}
{{range .TokenRows}} {{end}}
{{ tr "Name" }}{{ tr "Created" }}{{ tr "Last used" }}
{{ .Name }} {{ .CreatedDay }} {{ .LastUsedDay }}
{{else}}

{{ tr "No tokens yet. Create one to publish posts from scripts or CI." }}

{{end}}
{{ tr "Scopes" }}

{{ tr "Write creates and edits posts; delete removes them. Read endpoints are public, so no scope is needed for them. Selecting neither grants full access." }}

{{end}}
{{end}}