From a90a9fce5455089dbd4d0239c735c64844b70895 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Tue, 31 Jan 2023 18:52:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components.d.ts | 2 - .../src/components/app-layout/menu/index.scss | 91 +++++- .../src/components/app-layout/menu/index.vue | 5 +- frontend/src/layout/layout-content.vue | 10 +- frontend/src/styles/var.scss | 2 + frontend/src/views/app-store/apps/index.vue | 2 +- .../file-management/change-role/index.vue | 1 + .../host/file-management/create/index.vue | 1 + .../src/views/login/components/login-form.vue | 2 +- .../views/setting/backup-account/index.vue | 6 +- .../views/website/ssl/acme-account/index.vue | 1 + .../src/views/website/ssl/create/index.vue | 1 + .../src/views/website/ssl/detail/index.vue | 1 + .../views/website/ssl/dns-account/index.vue | 1 + frontend/src/views/website/ssl/index.vue | 140 +++++---- .../views/website/website/backup/index.vue | 1 + .../config/basic/domain/create/index.vue | 33 +- .../website/config/basic/limit-conn/index.vue | 8 +- .../views/website/website/create/index.vue | 1 + .../views/website/website/default/index.vue | 1 + frontend/src/views/website/website/index.vue | 281 +++++++++--------- 21 files changed, 342 insertions(+), 249 deletions(-) diff --git a/frontend/components.d.ts b/frontend/components.d.ts index dad9fe68a..a2be18cd0 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -36,7 +36,6 @@ declare module 'vue' { ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] - ElDraw: typeof import('element-plus/es')['ElDraw'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] @@ -44,7 +43,6 @@ declare module 'vue' { ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElFooter: typeof import('element-plus/es')['ElFooter'] ElForm: typeof import('element-plus/es')['ElForm'] - ElFormColumn: typeof import('element-plus/es')['ElFormColumn'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] diff --git a/frontend/src/components/app-layout/menu/index.scss b/frontend/src/components/app-layout/menu/index.scss index cca63c1c2..ce0a75fa7 100644 --- a/frontend/src/components/app-layout/menu/index.scss +++ b/frontend/src/components/app-layout/menu/index.scss @@ -3,17 +3,16 @@ display: flex; flex-direction: column; height: 100%; - background-color: #191a20; + background-color: $menu-backgroup-color; + transition: all 0.3s ease; .logo { box-sizing: border-box; height: 55px; - border-bottom: 1px solid #282a35; - box-shadow: 2px 0 6px rgb(0 21 41 / 35%); span { font-size: 22px; font-weight: bold; - color: #dadada; + color: $primary-color; white-space: nowrap; } img { @@ -37,27 +36,89 @@ text-align: center; } } + .el-menu, .el-menu--popup { + padding: 4px; + background: none !important; + .el-menu-item { + border-radius: 4px !important; + background-color: $menu-item-backgroup-color; + margin: 10px; + height: 44px !important; + + span { + color: rgba(31, 35, 41, 1); + } + .el-icon { + color: rgba(31, 35, 41, 1); + } + &.is-active { - background-color: #060708; + background-color: #ffffff; + + border: 2px solid $primary-color; + + span { + color: $primary-color; + } + + .el-icon { + color: $primary-color; + } + &::before { position: absolute; - top: 0; - bottom: 0; - left: 0; + border-radius: 4px; + top: 13px; + bottom: 15px; + left: 12px; width: 4px; + height: 14px; content: ''; background: $primary-color; } } } -} -.menu-href { - display: inline-block; - width: 100%; - height: 100%; - color: #bdbdc0; - text-decoration: none; + + :deep .el-sub-menu { + margin: 10px; + + span { + color: rgba(31, 35, 41, 1); + } + .el-icon { + color: rgba(31, 35, 41, 1); + } + + .el-sub-menu__title { + background-color: $menu-item-backgroup-color !important; + height: 44px; + border-radius: 4px !important; + } + + &.is-opened, + &.is-active { + .el-sub-menu__title { + span { + color: $primary-color; + } + + .el-icon { + color: $primary-color; + } + } + } + + .el-menu { + background-color: $menu-item-backgroup-color; + } + .el-menu-item { + border-radius: 4px !important; + margin-left: 0px !important; + min-width: 100% !important; + height: 44px; + } + } } diff --git a/frontend/src/components/app-layout/menu/index.vue b/frontend/src/components/app-layout/menu/index.vue index fd6167059..4a4b98249 100644 --- a/frontend/src/components/app-layout/menu/index.vue +++ b/frontend/src/components/app-layout/menu/index.vue @@ -48,10 +48,9 @@ import { GlobalStore } from '@/store'; const route = useRoute(); const menuStore = MenuStore(); const globalStore = GlobalStore(); -// const activeMenu = computed((): string => route.path); -const activeMenu = computed(() => { +const activeMenu = computed((): string => { const { meta, path } = route; - if (meta.activeMenu) { + if (typeof meta.activeMenu === 'string') { return meta.activeMenu; } return path; diff --git a/frontend/src/layout/layout-content.vue b/frontend/src/layout/layout-content.vue index 26aa74221..867b36d1a 100644 --- a/frontend/src/layout/layout-content.vue +++ b/frontend/src/layout/layout-content.vue @@ -57,8 +57,9 @@
- - +
+ +
@@ -99,7 +100,6 @@ const showBack = computed(() => { } .content-container__toolbar { - // @include flex-row(space-between, center); margin-top: 30px; } @@ -116,6 +116,10 @@ const showBack = computed(() => { margin-top: 20px; } +.main { + margin-top: 20px; +} + .divider { margin-top: 20px; border: 0; diff --git a/frontend/src/styles/var.scss b/frontend/src/styles/var.scss index 1bcd46a96..87bf1e149 100644 --- a/frontend/src/styles/var.scss +++ b/frontend/src/styles/var.scss @@ -1,4 +1,6 @@ $primary-color: #005eeb; +$menu-backgroup-color: rgba(0, 94, 235, 0.1); +$menu-item-backgroup-color: rgba(255, 255, 255, 0.3); @forward 'element-plus/theme-chalk/src/common/var.scss' with ( $colors: ( 'primary': ( diff --git a/frontend/src/views/app-store/apps/index.vue b/frontend/src/views/app-store/apps/index.vue index f75caea05..aed3edf86 100644 --- a/frontend/src/views/app-store/apps/index.vue +++ b/frontend/src/views/app-store/apps/index.vue @@ -33,7 +33,7 @@