From aa71968a91f8f8c93fb4853fdbe266d226a3fb95 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Sat, 15 Feb 2025 18:54:29 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=8B=86=E5=88=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/static/css/common.css | 66 +++++++++++++++++++++ manager/static/images/favicon.ico | Bin 0 -> 1150 bytes manager/static/index.html | 70 +++-------------------- manager/static/js/common.js | 28 +++++++++ manager/static/login.html | 92 ++++-------------------------- 5 files changed, 115 insertions(+), 141 deletions(-) create mode 100644 manager/static/css/common.css create mode 100644 manager/static/images/favicon.ico diff --git a/manager/static/css/common.css b/manager/static/css/common.css new file mode 100644 index 00000000..ac0a6498 --- /dev/null +++ b/manager/static/css/common.css @@ -0,0 +1,66 @@ +/* common.css */ +/* 基础样式 */ +body { + margin: 0; + padding: 0; + background: linear-gradient(135deg, #1a1f25 0%, #0d1117 100%); + min-height: 100vh; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; +} + +/* 头部组件 */ +.app-header { + background: rgba(13, 17, 23, 0.8); + backdrop-filter: blur(10px); + color: #fff; + padding: 1.5rem 2rem; + font-size: 1.4rem; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + display: flex; + align-items: center; + gap: 1rem; + position: relative; + z-index: 1; +} + +.header-logo { + width: 32px; + height: 32px; + background: linear-gradient(45deg, #00c6fb 0%, #005bea 100%); + border-radius: 8px; + display: flex; + align-items: center; + justify-content: center; + font-weight: bold; +} + +/* 页脚组件 */ +.app-footer { + text-align: center; + color: rgba(255, 255, 255, 0.6); + font-size: 13px; + padding: 20px; + position: fixed; + bottom: 0; + width: 100%; + z-index: 1; +} + +/* 背景动画 */ +.animated-bg { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; + background: linear-gradient(-45deg, #1a1f25, #0d1117, #162030, #1c1c1c); + background-size: 400% 400%; + animation: gradient 15s ease infinite; +} + +@keyframes gradient { + 0% { background-position: 0% 50% } + 50% { background-position: 100% 50% } + 100% { background-position: 0% 50% } +} \ No newline at end of file diff --git a/manager/static/images/favicon.ico b/manager/static/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..2e4ba64eab3093e6d7394eeda180acafbaccf02e GIT binary patch literal 1150 zcmb7^+e;L29K|Q-4^Ve^_Tu#^iqKy2#e$%Rs2-!o!k``sq6jV0u6ENdR%V%%Wh$1T zW~*stmIn1uBtfPbfl5KJ*V*0Kon7~KI&(=&=%HDDvpc_;&+nY?cg}AGVF^DO83NA* z!tSMlAPR!8oP$%G(dYRk2)wuWP=*Si4CX`W&qt&$50NK%2zTcq+?flxBL{MO4nl3& z2;I*{@U8>FI}QXI?Fii9sJ9zzE+WosM0&Cje*6dffNZNBp=K*tJA$`u2;3COS~XUx zvr#t>(UJ9tz1s=p<)#H)m2Km?Pd7su-U0bh2}13~hzyj{*9J&+c1V|Pnr>`tKafr! z>3L7@E9lvw>B=32NP0g3$rvKfN}-G%gnG#Kf5$GC4ED%xsd!}o&VYk|0O&8=dF6Ly7G~j>C*0{6&F(SEK;Faq!qXR{CG3{ zTDW$Fem&)c|AHO9bE01FLp!2x_OON|(sMz?r~5eik&cI{KZkJdHb}LZP+l4Q7bkqx zHuz49#yfJ*$7-a4(@00X^uG>r_eQQ2VoxRzxV4hCnh+T__(}3-Z17fD{(8UhsaDOO zGFnDI$F$$E4-M3|vR3jh41U51?K?Oon>lGILee*>aY)6H_&Eltei{5VBK>9|JZSLaPI!)r@Kl%= zWzvS&$41S!dWycSg}>UO_1RlRen97ADqktWeaK|wnVD{2o~|*cEhVh8oLP^&6URf*8K - + + @@ -8,39 +8,11 @@ + + 小智-server
-
- - xiaozhi-esp32-server -
+ xiaozhi-esp32-server
配置角色:
@@ -123,9 +73,7 @@
注意:保存配置后,需要重启设备,新的配置才会生效。
- +
diff --git a/manager/static/js/common.js b/manager/static/js/common.js index 0f888e11..790e6b43 100644 --- a/manager/static/js/common.js +++ b/manager/static/js/common.js @@ -37,4 +37,32 @@ function get(api, fn) { } fn(data); }); +} + +// 注册全局组件 +const AppHeader = { + template: ` +
+ + xiaozhi-esp32-server +
+ ` +}; + +const AppFooter = { + template: ` +
+ © 2025 xiaozhi-esp32-server +
+ ` +}; + +// 初始化Vue应用的通用配置 +function createVueApp(options) { + const app = Vue.createApp({ + ...options, + components: { AppHeader, AppFooter } + }); + app.use(ElementPlus); + return app; } \ No newline at end of file diff --git a/manager/static/login.html b/manager/static/login.html index 0a622146..6621a134 100644 --- a/manager/static/login.html +++ b/manager/static/login.html @@ -1,46 +1,18 @@ - - + + + + 小智-server
-
- - xiaozhi-esp32-server -
+ xiaozhi-esp32-server + - + +
+