diff --git a/.dockerignore b/.dockerignore index 6a33ae9e..26d30488 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,4 +8,6 @@ tmp/ data/ LICENSE README.md -README_en.md \ No newline at end of file +README_en.md +manager/static +manager/static/webui/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f19d7a22..5ae890f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ # 第一阶段:前端构建 -FROM node:18 as frontend-builder +FROM node:18 AS frontend-builder WORKDIR /app/ZhiKongTaiWeb +# 配置npm使用淘宝源 +RUN npm config set registry https://registry.npmmirror.com + COPY ZhiKongTaiWeb/package*.json ./ RUN npm install @@ -12,7 +15,7 @@ COPY ZhiKongTaiWeb . RUN npm run build # 第二阶段:构建Python依赖 -FROM python:3.10-slim as builder +FROM python:3.10-slim AS builder WORKDIR /app @@ -58,8 +61,7 @@ RUN rm -rf /etc/apt/sources.list.d/* && \ # 从构建阶段复制虚拟环境和前端构建产物 COPY --from=builder /opt/venv /opt/venv -COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /opt/xiaozhi-esp32-server/manager/static - +COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /opt/xiaozhi-esp32-server/manager/static/webui # 设置虚拟环境路径 ENV PATH="/opt/venv/bin:$PATH" diff --git a/ZhiKongTaiWeb/package.json b/ZhiKongTaiWeb/package.json index a0bc4158..f67f2ffe 100644 --- a/ZhiKongTaiWeb/package.json +++ b/ZhiKongTaiWeb/package.json @@ -9,7 +9,8 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.5.10" + "vue": "^3.5.10", + "vue-router": "^4.0.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", diff --git a/ZhiKongTaiWeb/src/App.vue b/ZhiKongTaiWeb/src/App.vue index de9472b9..52081e2b 100644 --- a/ZhiKongTaiWeb/src/App.vue +++ b/ZhiKongTaiWeb/src/App.vue @@ -1,64 +1,19 @@ @@ -69,17 +24,16 @@ export default { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #2c3e50; - width: 100%; - height: 100%; + min-height: 100vh; display: flex; flex-direction: column; } .app-content { flex: 1; - width: 100%; display: flex; flex-direction: column; + min-height: 0; /* 允许内容区域收缩 */ } /* 登录注册页面的布局 */ @@ -92,8 +46,28 @@ export default { /* 主要页面的布局 */ .main-layout { flex: 1; - width: 100%; display: flex; flex-direction: column; + min-height: 0; /* 允许内容区域收缩 */ +} + +/* 添加全局滚动条样式 */ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 4px; +} + +::-webkit-scrollbar-thumb { + background: #ccc; + border-radius: 4px; +} + +::-webkit-scrollbar-thumb:hover { + background: #999; } \ No newline at end of file diff --git a/ZhiKongTaiWeb/src/components/Login.vue b/ZhiKongTaiWeb/src/components/Login.vue index 575d2539..4fddaec3 100644 --- a/ZhiKongTaiWeb/src/components/Login.vue +++ b/ZhiKongTaiWeb/src/components/Login.vue @@ -12,148 +12,146 @@ -

还没注册账户? 点击注册

+

还没注册账户? 点击注册

- - - \ No newline at end of file +}; + + + \ No newline at end of file diff --git a/ZhiKongTaiWeb/src/components/Main.vue b/ZhiKongTaiWeb/src/components/Main.vue index b73478ee..3a0ab876 100644 --- a/ZhiKongTaiWeb/src/components/Main.vue +++ b/ZhiKongTaiWeb/src/components/Main.vue @@ -21,6 +21,10 @@ + +