summaryrefslogtreecommitdiffstats
path: root/templates/user/settings/applications.tmpl
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2023-02-20 21:28:44 +0000
committerGitHub <noreply@github.com>2023-02-20 15:28:44 -0600
commitd2128b44f714fcaacdc88865e62f6f9dd8216577 (patch)
treef6697bf42a61acc7f31b378882124e764281106b /templates/user/settings/applications.tmpl
parent330b16642305458339d12222eea2ee9a1bbb3b64 (diff)
downloadgitea-d2128b44f714fcaacdc88865e62f6f9dd8216577.tar.gz
gitea-d2128b44f714fcaacdc88865e62f6f9dd8216577.zip
Add scopes to API to create token and display them (#22989)
The API to create tokens is missing the ability to set the required scopes for tokens, and to show them on the API and on the UI. This PR adds this functionality. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates/user/settings/applications.tmpl')
-rw-r--r--templates/user/settings/applications.tmpl9
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl
index 439ed5e148..ef9ac9a977 100644
--- a/templates/user/settings/applications.tmpl
+++ b/templates/user/settings/applications.tmpl
@@ -21,7 +21,14 @@
</div>
<i class="icon tooltip{{if .HasRecentActivity}} green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.token_state_desc"}}"{{end}}>{{svg "fontawesome-send" 36}}</i>
<div class="content">
- <strong>{{.Name}}</strong>
+ <details><summary><strong>{{.Name}}</strong></summary>
+ <p class="gt-my-2">{{$.locale.Tr "settings.scopes_list"}}</p>
+ <ul class="gt-my-2">
+ {{range .Scope.StringSlice}}
+ <li>{{.}}</li>
+ {{end}}
+ </ul>
+ </details>
<div class="activity meta">
<i>{{$.locale.Tr "settings.add_on"}} <span><time data-format="short-date" datetime="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</time></span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}><time data-format="short-date" datetime="{{.UpdatedUnix.FormatLong}}">{{.UpdatedUnix.FormatShort}}</time></span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>