{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}}

{{ctx.Locale.Tr "settings.manage_access_token"}}

{{ctx.Locale.Tr "settings.tokens_desc"}}
{{range .Tokens}}
{{svg "fontawesome-send" 32}}
{{.Name}}

{{ctx.Locale.Tr "settings.repo_and_org_access"}}: {{if .DisplayPublicOnly}} {{ctx.Locale.Tr "settings.permissions_public_only"}} {{else}} {{ctx.Locale.Tr "settings.permissions_access_all"}} {{end}}

{{ctx.Locale.Tr "settings.permissions_list"}}

    {{range .Scope.StringSlice}} {{if (ne . $.AccessTokenScopePublicOnly)}}
  • {{.}}
  • {{end}} {{end}}

{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} — {{svg "octicon-info"}} {{if .HasUsed}}{{ctx.Locale.Tr "settings.last_used"}} {{DateTime "short" .UpdatedUnix}}{{else}}{{ctx.Locale.Tr "settings.no_activity"}}{{end}}

{{end}}
{{ctx.Locale.Tr "settings.generate_new_token"}}
{{.CsrfTokenHtml}}
{{ctx.Locale.Tr "settings.select_permissions"}}

{{ctx.Locale.Tr "settings.access_token_desc" (`href="/api/swagger" target="_blank"`|SafeHTML) (`href="https://forgejo.org/docs/latest/user/token-scope/" target="_blank"`|SafeHTML)}}

{{/* Fomantic ".ui.form .warning.message" is hidden by default, so put the warning message out of the form*/}}
{{ctx.Locale.Tr "settings.at_least_one_permission"}}
{{if .EnableOAuth2}} {{template "user/settings/grants_oauth2" .}} {{template "user/settings/applications_oauth2" .}} {{end}}
{{template "user/settings/layout_footer" .}}