From 439b83dfe78984640dec8d3861cb759611f88770 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com>
Date: Thu, 11 Apr 2024 23:38:31 +0800
Subject: [PATCH] =?UTF-8?q?feature:=20=E6=B7=B1=E8=89=B2=E6=A8=A1=E5=BC=8F?=
=?UTF-8?q?=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/core/src/config/index.js | 1 +
packages/gui/public/logo/logo-lang-light.svg | 68 +++++++
packages/gui/src/view/App.vue | 29 +--
.../gui/src/view/components/container.vue | 171 ++++++++++++++++++
packages/gui/src/view/index.js | 2 +-
packages/gui/src/view/mixins/plugin.js | 4 +-
packages/gui/src/view/pages/server.vue | 101 ++++++-----
packages/gui/src/view/pages/setting.vue | 22 ++-
8 files changed, 333 insertions(+), 65 deletions(-)
create mode 100644 packages/gui/public/logo/logo-lang-light.svg
diff --git a/packages/core/src/config/index.js b/packages/core/src/config/index.js
index e4853b5..d21a634 100644
--- a/packages/core/src/config/index.js
+++ b/packages/core/src/config/index.js
@@ -23,6 +23,7 @@ module.exports = {
enabled: true,
url: 'https://github.com/docmirror/dev-sidecar/raw/master/packages/core/src/config/remote_config.json5'
},
+ theme: 'light', // 主题:light=亮色/白色, dark=暗色/黑色
dock: {
hideWhenWinClose: false
},
diff --git a/packages/gui/public/logo/logo-lang-light.svg b/packages/gui/public/logo/logo-lang-light.svg
new file mode 100644
index 0000000..c8fa505
--- /dev/null
+++ b/packages/gui/public/logo/logo-lang-light.svg
@@ -0,0 +1,68 @@
+
diff --git a/packages/gui/src/view/App.vue b/packages/gui/src/view/App.vue
index da84f47..d3820af 100644
--- a/packages/gui/src/view/App.vue
+++ b/packages/gui/src/view/App.vue
@@ -1,11 +1,9 @@
-
+
-
-
-

-
+
+
-
+
{{item.title}}
-
+
{{ sub.title }}
@@ -54,13 +52,21 @@ export default {
return {
locale: zhCN,
info: {},
- menus: undefined
+ menus: undefined,
+ config: undefined
}
},
computed: {
+ themeClass () {
+ return 'theme-' + this.config.app.theme
+ },
+ theme () {
+ return this.config.app.theme
+ }
},
created () {
this.menus = createMenus(this)
+ this.config = this.$global.config
this.$api.info.get().then(ret => {
this.info = ret
})
@@ -112,9 +118,10 @@ body{
padding:5px;
border-bottom: #eee solid 1px;
height:60px;
- img{
- height:100%
- }
+ background-image: url("/logo/logo-lang.svg");
+ background-size: auto 50px;
+ background-repeat: no-repeat;
+ background-position: 5px center;
}
.ant-layout-footer{
padding:10px;
diff --git a/packages/gui/src/view/components/container.vue b/packages/gui/src/view/components/container.vue
index f1a7437..31f6cb7 100644
--- a/packages/gui/src/view/components/container.vue
+++ b/packages/gui/src/view/components/container.vue
@@ -15,6 +15,177 @@ export default {