Skip to content

Commit

Permalink
feat(userField): add navigation to personal access token
Browse files Browse the repository at this point in the history
- add button for navigation to 'myPersonalAccessToken' in UserField.vue
- include icon and translation for access token menu item
  • Loading branch information
ShiinaKin committed Nov 16, 2024
1 parent 3016066 commit 2e8280b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions ui/src/locales/zh_cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ message:
userMenuMyAlbum: "我的相册"
userMenuAccount: "我的账户"
userMenuProfile: "我的资料"
userMenuMyAccessToken: "我的令牌"
userMenuAdminField: "管理后台"
userMenuLogout: "退出登录"
userMenuLogoutSuccess: "登出成功"
Expand Down
12 changes: 12 additions & 0 deletions ui/src/views/structure/userField/UserField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ function handleLogout() {
</button>
</li>

<li>
<button
@click="router.push({ name: 'myPersonalAccessToken' })"
:class="isActive('myPersonalAccessToken') ? activeCSS : inactiveCSS"
>
<div class="flex items-center gap-1">
<Icon icon="mdi:account-key" class="size-5" />
<span>{{ t("message.userMenuMyAccessToken") }}</span>
</div>
</button>
</li>

<li v-if="isAdmin">
<button @click="router.push({ name: 'adminField' })" :class="inactiveCSS">
<div class="flex items-center gap-1">
Expand Down

0 comments on commit 2e8280b

Please sign in to comment.