From 5946e066938cee05362181d837cc5298466c7a60 Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Mon, 31 Jul 2023 17:45:22 +0800 Subject: [PATCH] :bug: fix #212 --- detach/src/App.vue | 9 +++++---- detach/src/assets/var.less | 25 +++++++++++++++++++++++++ detach/src/main.ts | 7 ++++--- feature/src/App.vue | 24 +++++++++++++++--------- feature/src/assets/ant-reset.less | 5 ----- feature/src/views/settings/index.vue | 3 ++- package.json | 2 +- src/common/constans/defaultConfig.ts | 6 +++--- src/main/browsers/detach.ts | 6 ++++++ 9 files changed, 61 insertions(+), 26 deletions(-) create mode 100644 detach/src/assets/var.less diff --git a/detach/src/App.vue b/detach/src/App.vue index 450f9c5..ca70e6b 100644 --- a/detach/src/App.vue +++ b/detach/src/App.vue @@ -79,10 +79,11 @@ html, body { .detach { width: 100%; - height: 56px; + height: 60px; display: flex; align-items: center; - background: #eee; + background: var(--color-body-bg); + color: var(--color-text-primary); } .detach { @@ -112,8 +113,8 @@ html, body { } .detach input { - background-color: #FFFFFF; - color: #333333; + background-color: var(--color-body-bg); + color: var(--color-text-primary); width: 360px; height: 36px; line-height: 36px; diff --git a/detach/src/assets/var.less b/detach/src/assets/var.less new file mode 100644 index 0000000..9435b0d --- /dev/null +++ b/detach/src/assets/var.less @@ -0,0 +1,25 @@ +:root { + --color-text-primary: rgba(0, 0, 0, 0.85); + --color-text-content: #141414; + --color-text-desc: rgba(0, 0, 0, 0.45); + // 背景色 + --color-body-bg: #fff; + --color-menu-bg: #f3efef; + --color-list-hover: #e2e2e2; + --color-input-hover: #fff; + // 边框 + --color-border-light: #f0f0f0; +} + +.dark { + --color-text-primary: #e8e8f0; + --color-text-content: #ccccd8; + --color-text-desc: #8f8fa6; + // 背景色 + --color-body-bg: #1c1c28; + --color-menu-bg: #1c1c28; + --color-list-hover: #33333d; + --color-input-hover: #33333d; + // 边框 + --color-border-light: #33333d; +} diff --git a/detach/src/main.ts b/detach/src/main.ts index b670de8..8bd5232 100644 --- a/detach/src/main.ts +++ b/detach/src/main.ts @@ -1,4 +1,5 @@ -import { createApp } from "vue"; -import App from "./App.vue"; +import { createApp } from 'vue'; +import App from './App.vue'; +import './assets/var.less'; -createApp(App).mount("#app"); +createApp(App).mount('#app'); diff --git a/feature/src/App.vue b/feature/src/App.vue index f7e4069..aee3bae 100644 --- a/feature/src/App.vue +++ b/feature/src/App.vue @@ -1,5 +1,5 @@