mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 17:54:37 +00:00
perf: 优化 i18n
This commit is contained in:
@@ -94,6 +94,10 @@ export default {
|
|||||||
border-radius: 0.3em;
|
border-radius: 0.3em;
|
||||||
max-width: 1500px;
|
max-width: 1500px;
|
||||||
|
|
||||||
|
.form-group-header {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.el-icon-circle-check {
|
.el-icon-circle-check {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@@ -1 +1 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#646A73" d="M14 5a2.5 2.5 0 1 0 .001 5.001A2.5 2.5 0 0 0 14 5ZM9.5 7.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0Zm1.835 7.5C9.515 15 8 16.498 8 18.4V20h12v-1.6c0-1.901-1.515-3.4-3.335-3.4h-5.33ZM6 18.4c0-2.982 2.39-5.4 5.335-5.4h5.33C19.61 13 22 15.418 22 18.4v2.7c0 .497-.4.9-.89.9H6.89a.896.896 0 0 1-.89-.9v-2.7Z" clip-rule="evenodd" fill-rule="evenodd"/><path fill-opacity=".2" fill="#000" d="M14 5a2.5 2.5 0 1 0 .001 5.001A2.5 2.5 0 0 0 14 5ZM9.5 7.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0Zm1.835 7.5C9.515 15 8 16.498 8 18.4V20h12v-1.6c0-1.901-1.515-3.4-3.335-3.4h-5.33ZM6 18.4c0-2.982 2.39-5.4 5.335-5.4h5.33C19.61 13 22 15.418 22 18.4v2.7c0 .497-.4.9-.89.9H6.89a.896.896 0 0 1-.89-.9v-2.7Z" clip-rule="evenodd" fill-rule="evenodd"/><path fill="#646A73" d="M3 6h4a1 1 0 0 0 0-2H2.5A1.5 1.5 0 0 0 1 5.5v15A1.5 1.5 0 0 0 2.5 22H4a1 1 0 1 0 0-2H3V6Zm1 4a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H5a1 1 0 0 1-1-1Zm0 3a1 1 0 0 1 1-1h1a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z" clip-rule="evenodd" fill-rule="evenodd"/><path fill-opacity=".2" fill="#000" d="M3 6h4a1 1 0 0 0 0-2H2.5A1.5 1.5 0 0 0 1 5.5v15A1.5 1.5 0 0 0 2.5 22H4a1 1 0 1 0 0-2H3V6Zm1 4a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H5a1 1 0 0 1-1-1Zm0 3a1 1 0 0 1 1-1h1a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z" clip-rule="evenodd" fill-rule="evenodd"/></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706780074168" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6054" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M538.944 1003.584c224.832-122.912 353.312-248.64 385.536-377.152A2450.752 2450.752 0 0 0 986.88 263.04a64 64 0 0 0-36.64-64.064L536.832 6.016A64 64 0 0 0 483.232 5.76L69.44 194.464a64 64 0 0 0-37.408 61.28c5.28 111.136 26.496 234.688 63.648 370.688 40.256 147.392 168.448 273.6 384.576 378.56a64 64 0 0 0 58.656-1.408z m-30.688-56.16C307.2 849.792 192.096 736.48 157.44 609.568 121.472 477.856 101.056 358.848 96 252.704L509.76 64l413.44 192.96a2386.752 2386.752 0 0 1-60.8 353.92c-26.88 107.296-143.488 221.376-354.144 336.544zM544 475.968A128.064 128.064 0 0 0 512 224a128 128 0 0 0-32 251.968V768a32 32 0 0 0 64 0v-128h96a32 32 0 0 0 0-64h-96v-100.032zM512 416a64 64 0 1 1 0-128 64 64 0 0 1 0 128z" fill="#515151" p-id="6055"></path></svg>
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.0 KiB |
1
src/icons/svg/acl.svg
Normal file
1
src/icons/svg/acl.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1706779803337" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1493" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M957 290m0 30l0 0q0 30-30 30l-105 0q-30 0-30-30l0 0q0-30 30-30l105 0q30 0 30 30Z" fill="#515151" p-id="1494"></path><path d="M957 662m0 30l0 0q0 30-30 30l-105 0q-30 0-30-30l0 0q0-30 30-30l105 0q30 0 30 30Z" fill="#515151" p-id="1495"></path><path d="M232 662m0 30l0 0q0 30-30 30l-105 0q-30 0-30-30l0 0q0-30 30-30l105 0q30 0 30 30Z" fill="#515151" p-id="1496"></path><path d="M232 290m0 30l0 0q0 30-30 30l-105 0q-30 0-30-30l0 0q0-30 30-30l105 0q30 0 30 30Z" fill="#515151" p-id="1497"></path><path d="M485 68m30 0l0 0q30 0 30 30l0 105q0 30-30 30l0 0q-30 0-30-30l0-105q0-30 30-30Z" fill="#515151" p-id="1498"></path><path d="M485 412m30 0l0 0q30 0 30 30l0 105q0 30-30 30l0 0q-30 0-30-30l0-105q0-30 30-30Z" fill="#515151" p-id="1499"></path><path d="M485 796m30 0l0 0q30 0 30 30l0 105q0 30-30 30l0 0q-30 0-30-30l0-105q0-30 30-30Z" fill="#515151" p-id="1500"></path><path d="M246 615a6 6 0 0 0-6 6v142a6 6 0 0 0 6 6h538a6 6 0 0 0 6-6V621a6 6 0 0 0-6-6H246z m0-60h538c36.45 0 66 29.55 66 66v142c0 36.45-29.55 66-66 66H246c-36.45 0-66-29.55-66-66V621c0-36.45 29.55-66 66-66zM246 243a6 6 0 0 0-6 6v142a6 6 0 0 0 6 6h538a6 6 0 0 0 6-6V249a6 6 0 0 0-6-6H246z m0-60h538c36.45 0 66 29.55 66 66v142c0 36.45-29.55 66-66 66H246c-36.45 0-66-29.55-66-66V249c0-36.45 29.55-66 66-66z" fill="#515151" p-id="1501"></path><path d="M715.763 349.762a29.997 29.997 0 0 0 20.13-47.903 29.996 29.996 0 0 0-27.656-11.621 29.997 29.997 0 0 0-20.13 47.903 29.996 29.996 0 0 0 27.656 11.621zM715.763 721.762a29.997 29.997 0 0 0 20.13-47.903 29.996 29.996 0 0 0-27.656-11.621 29.997 29.997 0 0 0-20.13 47.903 29.996 29.996 0 0 0 27.656 11.621z" fill="#515151" p-id="1502"></path></svg>
|
After Width: | Height: | Size: 1.9 KiB |
@@ -1,4 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { capitalizeFirst } from '@/utils/common'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuItem',
|
name: 'MenuItem',
|
||||||
functional: true,
|
functional: true,
|
||||||
@@ -24,7 +26,7 @@ export default {
|
|||||||
|
|
||||||
if (title) {
|
if (title) {
|
||||||
const iTitle = title.split(' ').map(item => {
|
const iTitle = title.split(' ').map(item => {
|
||||||
return _.capitalize(item)
|
return capitalizeFirst(item)
|
||||||
}).join(' ')
|
}).join(' ')
|
||||||
vnodes.push(<span slot='title'>{iTitle}</span>)
|
vnodes.push(<span slot='title'>{iTitle}</span>)
|
||||||
}
|
}
|
||||||
|
@@ -4,54 +4,6 @@ import empty from '@/layout/empty'
|
|||||||
const globalSubmenu = () => import('@/layout/globalOrg.vue')
|
const globalSubmenu = () => import('@/layout/globalOrg.vue')
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
|
||||||
path: 'login-acls',
|
|
||||||
component: globalSubmenu,
|
|
||||||
redirect: '',
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('UserLoginAclList'),
|
|
||||||
app: 'acls',
|
|
||||||
resource: 'loginacl',
|
|
||||||
disableOrgsChange: true
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
name: 'UserLoginAclList',
|
|
||||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLList.vue'),
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('UserLoginAclList')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'create',
|
|
||||||
name: 'UserLoginAclCreate',
|
|
||||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
|
||||||
hidden: true,
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('UserLoginAclCreate')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: ':id',
|
|
||||||
name: 'UserLoginAclDetail',
|
|
||||||
component: () => import('@/views/acl/UserLoginACL/UserDetail/index'),
|
|
||||||
hidden: true,
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('UserLoginAclDetail'),
|
|
||||||
app: 'acls',
|
|
||||||
resource: 'loginacl'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: ':id/update',
|
|
||||||
name: 'UserLoginAclUpdate',
|
|
||||||
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
|
||||||
hidden: true,
|
|
||||||
meta: { title: i18n.t('UserLoginAclUpdate') }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'cmd-acls',
|
path: 'cmd-acls',
|
||||||
component: empty,
|
component: empty,
|
||||||
@@ -228,5 +180,53 @@ export default [
|
|||||||
meta: { title: i18n.t('ConnectMethodAclUpdate') }
|
meta: { title: i18n.t('ConnectMethodAclUpdate') }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'login-acls',
|
||||||
|
component: globalSubmenu,
|
||||||
|
redirect: '',
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('UserLoginAclList'),
|
||||||
|
app: 'acls',
|
||||||
|
resource: 'loginacl',
|
||||||
|
disableOrgsChange: true
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: 'UserLoginAclList',
|
||||||
|
component: () => import('@/views/acl/UserLoginACL/UserLoginACLList.vue'),
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('UserLoginAclList')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'create',
|
||||||
|
name: 'UserLoginAclCreate',
|
||||||
|
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
||||||
|
hidden: true,
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('UserLoginAclCreate')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':id',
|
||||||
|
name: 'UserLoginAclDetail',
|
||||||
|
component: () => import('@/views/acl/UserLoginACL/UserDetail/index'),
|
||||||
|
hidden: true,
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('UserLoginAclDetail'),
|
||||||
|
app: 'acls',
|
||||||
|
resource: 'loginacl'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':id/update',
|
||||||
|
name: 'UserLoginAclUpdate',
|
||||||
|
component: () => import('@/views/acl/UserLoginACL/UserLoginACLCreateUpdate.vue'),
|
||||||
|
hidden: true,
|
||||||
|
meta: { title: i18n.t('UserLoginAclUpdate') }
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -8,6 +8,7 @@ import AssetsMenu from './assets'
|
|||||||
import PermsMenu from './perms'
|
import PermsMenu from './perms'
|
||||||
import AccountMenus from './accounts'
|
import AccountMenus from './accounts'
|
||||||
import LabelMenus from './labels'
|
import LabelMenus from './labels'
|
||||||
|
import AclsMenus from './acls'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: '/console',
|
path: '/console',
|
||||||
@@ -61,7 +62,7 @@ export default {
|
|||||||
name: 'Accounts',
|
name: 'Accounts',
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('MenuAccounts'),
|
title: i18n.t('MenuAccounts'),
|
||||||
icon: 'accounts'
|
icon: 'key'
|
||||||
},
|
},
|
||||||
children: AccountMenus
|
children: AccountMenus
|
||||||
},
|
},
|
||||||
@@ -69,12 +70,23 @@ export default {
|
|||||||
path: '/console/perms',
|
path: '/console/perms',
|
||||||
component: empty,
|
component: empty,
|
||||||
name: 'Perms',
|
name: 'Perms',
|
||||||
alwaysShow: false,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('MenuPermissions'),
|
title: i18n.t('MenuPermissions'),
|
||||||
icon: 'permission'
|
icon: 'permission',
|
||||||
|
resource: 'assetpermission',
|
||||||
|
permissions: []
|
||||||
},
|
},
|
||||||
children: PermsMenu
|
children: PermsMenu[0].children
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/console/acls',
|
||||||
|
component: empty,
|
||||||
|
name: 'Acls',
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('MenuAcls'),
|
||||||
|
icon: 'acl'
|
||||||
|
},
|
||||||
|
children: AclsMenus
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/console/more',
|
path: '/console/more',
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import i18n from '@/i18n/i18n'
|
import i18n from '@/i18n/i18n'
|
||||||
import empty from '@/layout/empty'
|
import empty from '@/layout/empty'
|
||||||
import ACLRoutes from '@/router/console/acls'
|
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@@ -15,30 +14,29 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: 'AssetPermissionList',
|
name: 'AssetPermissionList',
|
||||||
component: () => import('@/views/perms/AssetPermission/AssetPermissionList'),
|
component: () => import('@/views/perms/AssetPermission/AssetPermissionList'),
|
||||||
meta: { title: i18n.t('AssetPermission') }
|
meta: { title: i18n.t('AssetPermission'), permissions: ['perms.view_assetpermission'] }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'create',
|
path: 'create',
|
||||||
component: () => import('@/views/perms/AssetPermission/AssetPermissionCreateUpdate'),
|
component: () => import('@/views/perms/AssetPermission/AssetPermissionCreateUpdate'),
|
||||||
name: 'AssetPermissionCreate',
|
name: 'AssetPermissionCreate',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: { title: i18n.t('AssetPermissionCreate'), action: 'create' }
|
meta: { title: i18n.t('AssetPermissionCreate'), action: 'create', permissions: ['perms.add_assetpermission'] }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':id/update',
|
path: ':id/update',
|
||||||
component: () => import('@/views/perms/AssetPermission/AssetPermissionCreateUpdate.vue'),
|
component: () => import('@/views/perms/AssetPermission/AssetPermissionCreateUpdate.vue'),
|
||||||
name: 'AssetPermissionUpdate',
|
name: 'AssetPermissionUpdate',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: { title: i18n.t('AssetPermissionUpdate'), action: 'update' }
|
meta: { title: i18n.t('AssetPermissionUpdate'), action: 'update', permissions: ['perms.change_assetpermission'] }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':id',
|
path: ':id',
|
||||||
component: () => import('@/views/perms/AssetPermission/AssetPermissionDetail'),
|
component: () => import('@/views/perms/AssetPermission/AssetPermissionDetail'),
|
||||||
name: 'AssetPermissionDetail',
|
name: 'AssetPermissionDetail',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: { title: i18n.t('AssetPermissionDetail') }
|
meta: { title: i18n.t('AssetPermissionDetail'), permissions: ['perms.view_assetpermission'] }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
...ACLRoutes
|
|
||||||
]
|
]
|
||||||
|
@@ -110,13 +110,10 @@ export default {
|
|||||||
hasSearch: true,
|
hasSearch: true,
|
||||||
hasRefresh: true,
|
hasRefresh: true,
|
||||||
hasRightActions: true,
|
hasRightActions: true,
|
||||||
hasLeftActions: true,
|
hasLeftActions: false,
|
||||||
hasMoreActions: false,
|
hasMoreActions: false,
|
||||||
hasExport: false,
|
hasExport: false,
|
||||||
hasImport: false,
|
hasImport: false
|
||||||
hasCreate: false,
|
|
||||||
hasBulkDelete: false,
|
|
||||||
hasBulkUpdate: false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -60,6 +60,9 @@ export default {
|
|||||||
base: {
|
base: {
|
||||||
width: '140px'
|
width: '140px'
|
||||||
},
|
},
|
||||||
|
internal: {
|
||||||
|
width: '100px'
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
canClone: () => vm.$hasPerm('assets.add_platform'),
|
canClone: () => vm.$hasPerm('assets.add_platform'),
|
||||||
|
@@ -55,7 +55,7 @@ export default {
|
|||||||
min: ['name', 'username', 'actions'],
|
min: ['name', 'username', 'actions'],
|
||||||
default: [
|
default: [
|
||||||
'name', 'username', 'email', 'groups', 'system_roles',
|
'name', 'username', 'email', 'groups', 'system_roles',
|
||||||
'org_roles', 'source', 'is_valid', 'actions'
|
'org_roles', 'is_valid', 'actions'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
after
|
after
|
||||||
custom-class="asset-select-dialog"
|
custom-class="asset-select-dialog"
|
||||||
top="15vh"
|
top="15vh"
|
||||||
width="50vw"
|
width="800px"
|
||||||
>
|
>
|
||||||
<GenericCreateUpdateForm
|
<GenericCreateUpdateForm
|
||||||
v-bind="formConfig"
|
v-bind="formConfig"
|
||||||
|
Reference in New Issue
Block a user