mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: i18n
This commit is contained in:
parent
e8a52c824a
commit
0b72c5d4c2
|
|
@ -23,7 +23,7 @@
|
|||
<template v-if="user.userInfo?.role_name && user.userInfo.role_name.length > 0">
|
||||
<TagGroup
|
||||
size="small"
|
||||
:tags="user.userInfo?.role_name"
|
||||
:tags="role_list"
|
||||
v-if="hasPermission([EditionConst.IS_EE, EditionConst.IS_PE], 'OR')"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -150,9 +150,10 @@
|
|||
<!-- <UserPwdDialog ref="UserPwdDialogRef" /> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted} from 'vue'
|
||||
import {ref, onMounted, computed} from 'vue'
|
||||
import useStore from '@/stores'
|
||||
import {useRouter} from 'vue-router'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {t} from "@/locales"
|
||||
import ResetPassword from './ResetPassword.vue'
|
||||
import AboutDialog from './AboutDialog.vue'
|
||||
// import UserPwdDialog from '@/views/user-manage/component/UserPwdDialog.vue'
|
||||
|
|
@ -185,7 +186,23 @@ function openAPIKeyDialog() {
|
|||
const openResetPassword = () => {
|
||||
resetPasswordRef.value?.open()
|
||||
}
|
||||
|
||||
const m:any = {
|
||||
"系统管理员": 'layout.about.inner_admin',
|
||||
"工作空间管理员": 'layout.about.inner_wsm',
|
||||
"普通用户":'layout.about.inner_user'
|
||||
}
|
||||
const role_list = computed(() => {
|
||||
if (!user.userInfo) {
|
||||
return []
|
||||
}
|
||||
return user.userInfo?.role_name?.map(name => {
|
||||
const inner = m[name]
|
||||
if (inner) {
|
||||
return t(inner)
|
||||
}
|
||||
return name
|
||||
})
|
||||
})
|
||||
const logout = () => {
|
||||
login.logout().then(() => {
|
||||
if (user?.userInfo?.source && ['CAS', 'OIDC', 'OAuth2'].includes(user.userInfo.source)) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ export default {
|
|||
remark: 'Remarks',
|
||||
update: 'Update',
|
||||
authorize: 'Authorized',
|
||||
|
||||
inner_admin: 'System Admin',
|
||||
inner_wsm: 'Workspace Manager',
|
||||
inner_user: 'Common User',
|
||||
},
|
||||
time: {
|
||||
daysLater: 'days later',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,11 @@ export default {
|
|||
serialNo: '序列号',
|
||||
remark: '备注',
|
||||
update: '更新',
|
||||
authorize: '授权给'
|
||||
authorize: '授权给',
|
||||
inner_admin: '系统管理员',
|
||||
inner_wsm: '工作空间管理员',
|
||||
inner_user: '普通用户',
|
||||
|
||||
},
|
||||
time: {
|
||||
daysLater: '天后',
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@ export default {
|
|||
serialNo: '序列號',
|
||||
remark: '備註',
|
||||
update: '更新',
|
||||
authorize: '授權給'
|
||||
authorize: '授權給',
|
||||
inner_admin: '系統管理員',
|
||||
inner_wsm: '工作空間管理員',
|
||||
inner_user: '普通用戶',
|
||||
},
|
||||
time: {
|
||||
daysLater: '天後',
|
||||
|
|
|
|||
Loading…
Reference in New Issue