Skip to content

Commit

Permalink
fix: 菜单样式调整
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed Jan 19, 2024
1 parent fb1c34d commit 5933a55
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 41 deletions.
16 changes: 6 additions & 10 deletions web/dashboard/src/business/app-layout/header-components/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="docs">{{ $t('commons.help.ko_docs') }}</el-dropdown-item>
<el-dropdown-item command="support">{{ $t('commons.help.business_support') }}</el-dropdown-item>
<el-dropdown-item class="iconfont iconguanyu" command="about">{{$t("commons.help.about")}}</el-dropdown-item>
</el-dropdown-menu>
<el-dialog class="ko-dialog" :show-close="false" :visible.sync="aboutDialogVisible" width="50%">
<div class="aboutBackground" style="padding: 20px 25px;">
<img style="margin-left: 0;" :src="require('@/assets/KubePi-red.png')" class="sidebar-logo" alt="Sidebar Logo">
<p>{{ $t("commons.personal.introduction") }}</p>
<p>{{ $t("commons.personal.introduction2") }}</p>
<strong>{{ $t("commons.personal.version") }}: v1.1.2</strong>
<strong>{{ $t("commons.personal.version") }}: v1.7.0</strong>
</div>
<div style="padding:15px 20px;box-shadow:rgb(69 70 70) 0 -14px 24px -12px;">
<el-row style="color: #ffffff;text-align: center">
Expand Down Expand Up @@ -50,28 +49,25 @@ export default {
methods: {
handleCommand(command) {
switch (command) {
case "support":
window.open("https://kubeoperator.io/", "_blank")
break
case "docs":
window.open("https://kubeoperator.io/docs/kubepi/", "_blank")
window.open("https://github.com/1Panel-dev/KubePi/wiki", "_blank")
break
default:
this.aboutDialogVisible = true
break
}
},
toGithub() {
window.open("https://github.com/KubeOperator/KubePi", "_blank")
window.open("https://github.com/1Panel-dev/KubePi", "_blank")
},
toIssue() {
window.open("https://github.com/KubeOperator/KubePi/issues", "_blank")
window.open("https://github.com/1Panel-dev/KubePi/issues", "_blank")
},
toTalk() {
window.open("https://kubeoperator.io/#contact", "_blank")
window.open("https://github.com/1Panel-dev/KubePi/issues", "_blank")
},
toGithubStar() {
window.open("https://github.com/KubeOperator/KubePi", "_blank")
window.open("https://github.com/1Panel-dev/KubePi", "_blank")
},
},
}
Expand Down
8 changes: 4 additions & 4 deletions web/dashboard/src/components/detail/detail-key-value.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
</el-link>
<div v-if="showItem">
<div v-for="(value,key,index) in valueObj" v-bind:key="index" class="myTag">
<el-tag type="info" size="small" v-if="value.length < 50">
<el-tag type="info" size="small" v-if="value.length + key.length < 50">
{{ key }} = {{ value }}
</el-tag>
<el-tooltip v-if="value.length > 50" :content="value" placement="top">
<el-tag type="info" size="small" v-if="value.length >= 50">
{{ key }} = {{ value.substring(0, 50) + "..." }}
<el-tooltip v-if="value.length + key.length >= 50" :content="value" placement="top">
<el-tag type="info" size="small">
{{ (key + '=' + value).substring(0, 50) + "..." }}
</el-tag>
</el-tooltip>
</div>
Expand Down
11 changes: 5 additions & 6 deletions web/dashboard/src/components/ko-charts/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default {
},
methods: {
loadColor(index) {
const colors = ['#fee82c','#abcd2c','#db2d45','#cd4d89','#1491d1','#f17f43','#108774','#7c4899','#282a88','#008B8B','#90EE90','#8B0000']
return colors[index]
},
initCharts(index) {
const echarts = require('echarts');
let myChart = echarts.init(document.getElementById(this.chartData.name));
Expand Down Expand Up @@ -46,12 +50,7 @@ export default {
},
data: this.chartData.data,
itemStyle: {
normal: {
color: function () {
const colors = ['#fee82c','#abcd2c','#db2d45','#cd4d89','#1491d1','#f17f43','#108774','#7c4899','#282a88','#008B8B','#90EE90','#8B0000']
return [colors[index]]
}
}
color: this.loadColor(index)
},
}
Expand Down
7 changes: 1 addition & 6 deletions web/dashboard/src/components/layout/sidebar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:default-active="activeMenu"
:collapse="isCollapse"
:collapse-transition="false"
:unique-opened="false"
:unique-opened="true"
mode="vertical"
active-text-color="#FFFFFF"
>
Expand Down Expand Up @@ -222,11 +222,6 @@
text-align: center;
line-height: $menu-height;
}
.el-submenu__title {
//padding-left: 20px !important;
}
.submenu-title-no-dropdown, .el-submenu__title {
max-width: 60px;
text-align: center;
Expand Down
1 change: 0 additions & 1 deletion web/dashboard/src/i18n/lang/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const message = {
help: {
help: "Help",
about: "About",
business_support: "Business Support",
ko_docs: "Official Document",
},
button: {
Expand Down
1 change: 0 additions & 1 deletion web/dashboard/src/i18n/lang/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const message = {
help: {
help: "帮助",
about: "关于",
business_support: "商业支持",
ko_docs: "官方文档",
},
button: {
Expand Down
16 changes: 6 additions & 10 deletions web/kubepi/src/business/app-layout/header-components/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="docs">{{ $t('commons.help.ko_docs') }}</el-dropdown-item>
<el-dropdown-item command="support">{{ $t('commons.help.business_support') }}</el-dropdown-item>
<!-- <el-dropdown-item command="api">API</el-dropdown-item>-->
<el-dropdown-item class="iconfont iconguanyu" command="about">{{$t("commons.help.about")}}</el-dropdown-item>
</el-dropdown-menu>
Expand All @@ -16,7 +15,7 @@
<img style="margin-left: 0;" :src="require('@/assets/KubePi-red.png')" class="sidebar-logo" alt="Sidebar Logo">
<p>{{ $t("commons.personal.introduction") }}</p>
<p>{{ $t("commons.personal.introduction2") }}</p>
<strong>{{ $t("commons.personal.version") }}: v1.1.2</strong>
<strong>{{ $t("commons.personal.version") }}: v1.7.0</strong>
</div>
<div style="padding:15px 20px;box-shadow:rgb(69 70 70) 0 -14px 24px -12px;">
<el-row style="color: #ffffff;text-align: center">
Expand Down Expand Up @@ -51,11 +50,8 @@ export default {
methods: {
handleCommand(command) {
switch (command) {
case "support":
window.open("https://kubeoperator.io/", "_blank")
break
case "docs":
window.open("https://kubeoperator.io/docs/kubepi/", "_blank")
window.open("https://github.com/1Panel-dev/KubePi/wiki", "_blank")
break
case "api":
window.open("/kubepi/swagger/index.html", "_blank");
Expand All @@ -66,16 +62,16 @@ export default {
}
},
toGithub() {
window.open("https://github.com/KubeOperator/KubePi", "_blank")
window.open("https://github.com/1Panel-dev/KubePi", "_blank")
},
toIssue() {
window.open("https://github.com/KubeOperator/KubePi/issues", "_blank")
window.open("https://github.com/1Panel-dev/KubePi/issues", "_blank")
},
toTalk() {
window.open("https://kubeoperator.io/#contact", "_blank")
window.open("https://github.com/1Panel-dev/KubePi/issues", "_blank")
},
toGithubStar() {
window.open("https://github.com/KubeOperator/KubePi")
window.open("https://github.com/1Panel-dev/KubePi", "_blank")
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion web/kubepi/src/components/layout/sidebar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:default-active="activeMenu"
:collapse="isCollapse"
:collapse-transition="false"
:unique-opened="false"
:unique-opened="true"
mode="vertical"
active-text-color="#FFFFFF"
>
Expand Down
1 change: 0 additions & 1 deletion web/kubepi/src/i18n/lang/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const message = {
help: {
help: "Help",
about: "About",
business_support: "Business Support",
ko_docs: "Official Document",
},
button: {
Expand Down
1 change: 0 additions & 1 deletion web/kubepi/src/i18n/lang/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const message = {
help: {
help: "帮助",
about: "关于",
business_support: "商业支持",
ko_docs: "官方文档",
},
button: {
Expand Down

0 comments on commit 5933a55

Please sign in to comment.