feat(ui): update common settings btn

This commit is contained in:
songlh
2024-08-07 14:40:54 +08:00
parent 3e4c385d91
commit e7cbd0caa9
11 changed files with 1095 additions and 12 deletions

View File

@@ -5,12 +5,12 @@
<span
v-if="hasBackendPermission"
@click="handleClick"
class="action"
style="width: 40px; display: flex; justify-content: center"
class="common-settings-btn"
>
<a-icon type="setting" />
<ops-icon class="common-settings-btn-icon" type="veops-setting" />
<span class="common-settings-btn-text">{{ $t('settings') }}</span>
</span>
<span class="locale" @click="changeLang">{{ locale === 'zh' ? 'English' : '中文' }}</span>
<span class="locale" @click="changeLang">{{ locale === 'zh' ? '简中' : 'EN' }}</span>
<a-popover
trigger="click"
:overlayStyle="{ width: '150px' }"
@@ -123,3 +123,30 @@ export default {
}
}
</style>
<style lang="less" scoped>
.user-wrapper {
.common-settings-btn {
cursor: pointer;
padding: 0px 18px;
background-color: #F0F5FF;
border-radius: 22px;
height: 26px;
display: flex;
align-items: center;
justify-content: center;
&-icon {
font-size: 12px;
color: #2F54EB;
}
&-text {
margin-left: 4px;
font-size: 12px;
font-weight: 400;
color: #4E5969;
}
}
}
</style>

View File

@@ -10,6 +10,7 @@ export default {
resourceType: 'Resource Types',
trigger: 'Triggers',
},
settings: 'Common Settings',
screen: 'Big Screen',
dashboard: 'Dashboard',
admin: 'Admin',

View File

@@ -10,6 +10,7 @@ export default {
resourceType: '资源类型',
trigger: '触发器',
},
settings: '通用设置',
screen: '大屏',
dashboard: '仪表盘',
admin: '管理员',

View File

@@ -102,7 +102,7 @@ const genCmdbRoutes = async () => {
name: 'cmdb_ci_type',
component: RouteView,
redirect: '/cmdb/ci_type',
meta: { title: 'cmdb.menu.backendManage', icon: 'setting', permission: ['cmdb_admin', 'OneOPS_Application_Admin', 'admin'], },
meta: { title: 'cmdb.menu.backendManage', icon: 'veops-setting2', permission: ['cmdb_admin', 'OneOPS_Application_Admin', 'admin'], },
children: [
{
path: '/cmdb/customdashboard',