{{ template "header" .}}

{{ .locale.Tr "settings" }}

{{ .locale.Tr "settings.change-username" }}

{{ .csrfHtml }}
{{ if not .disableForm }}

{{if .hasPassword}} {{ .locale.Tr "settings.change-password" }} {{else}} {{ .locale.Tr "settings.create-password" }} {{end}}

{{if .hasPassword}} {{ .locale.Tr "settings.change-password-help" }} {{else}} {{ .locale.Tr "settings.create-password-help" }} {{end}}

{{ .csrfHtml }}
{{ end }}

{{ .locale.Tr "settings.email" }}

{{ .locale.Tr "settings.email-help" }}

{{ .csrfHtml }}
{{ if or .githubOauth .gitlabOauth .giteaOauth .oidcOauth }}

{{ .locale.Tr "settings.link-accounts" }}

{{ if .githubOauth }} {{ if .userLogged.GithubID }} {{ .locale.Tr "settings.unlink-github-account" }} {{ else }} {{ .locale.Tr "settings.link-github-account" }} {{ end }} {{ end }} {{ if .gitlabOauth }} {{ if .userLogged.GitlabID }} {{ .locale.Tr "settings.unlink-gitlab-account" }} {{ else }} {{ .locale.Tr "settings.link-gitlab-account" }} {{ end }} {{ end }} {{ if .giteaOauth }} {{ if .userLogged.GiteaID }} {{ .locale.Tr "settings.unlink-gitea-account" }} {{ else }} {{ .locale.Tr "settings.link-gitea-account" }} {{ end }} {{ end }} {{ if .oidcOauth }} {{ if .userLogged.OIDCID }} Unlink OpenID account {{ else }} Link OpenID account {{ end }} {{ end }}
{{ end }}

{{ .locale.Tr "auth.totp" }}

{{ .locale.Tr "auth.totp.help" }}

{{ if .hasTotp }}
{{ .csrfHtml }}
{{ .csrfHtml }}
{{ else }} {{ .locale.Tr "auth.totp.use" }} {{ end }}

{{ .locale.Tr "auth.mfa.passkeys" }}

{{ .locale.Tr "auth.mfa.passkeys-help" }}

{{ .csrfHtml }}
    {{ if .passkeys }} {{ range $passkey := .passkeys }}
  • {{ .Name }}

    {{ $.locale.Tr "auth.mfa.passkey-added-at" }} {{ .CreatedAt }}

    {{ if eq .LastUsedAt 0 }}

    {{ $.locale.Tr "auth.mfa.passkey-never-used" }}

    {{ else }}

    {{ $.locale.Tr "auth.mfa.passkey-last-used" }} {{ .LastUsedAt }}

    {{ end }}
    {{ $.csrfHtml }}
  • {{ end }} {{ end }}

{{ .locale.Tr "settings.add-ssh-key" }}

{{ .locale.Tr "settings.add-ssh-key-help" }}

{{ .csrfHtml }}
    {{ if .sshKeys }} {{ range $key := .sshKeys }}
  • {{ .Title }}

    SHA256:{{.SHA}}

    {{ $.locale.Tr "settings.ssh-key-added-at" }} {{ .CreatedAt }}

    {{ if eq .LastUsedAt 0 }}

    {{ $.locale.Tr "settings.ssh-key-never-used" }}

    {{ else }}

    {{ $.locale.Tr "settings.ssh-key-last-used" }} {{ .LastUsedAt }}

    {{ end }}
    {{ $.csrfHtml }}
  • {{ end }} {{ end }}

{{ .locale.Tr "settings.delete-account" }}

{{ .csrfHtml }}
{{ template "footer" .}}