diff --git a/app/server/public/css/style.css b/app/server/public/css/style.css index 70fa529..c66c705 100644 --- a/app/server/public/css/style.css +++ b/app/server/public/css/style.css @@ -30,7 +30,7 @@ body { gap: 8px; } .header-left { display: flex; align-items: center; gap: 8px; flex: 1; } -.header h2 { font-size: 17px; font-weight: 600; white-space: nowrap; } +.header h2 { font-size: 17px; font-weight: 600; white-space: nowrap; cursor: pointer; } .chat-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/app/server/public/index.html b/app/server/public/index.html index 75ecba6..16a404c 100644 --- a/app/server/public/index.html +++ b/app/server/public/index.html @@ -15,17 +15,13 @@
-
+

Agent 任务台

- - diff --git a/app/server/public/login.html b/app/server/public/login.html index f3b1432..8cabac5 100644 --- a/app/server/public/login.html +++ b/app/server/public/login.html @@ -32,7 +32,7 @@

Agent 任务台

- +
diff --git a/docker-compose.yml b/docker-compose.yml index 503d11e..e8bb24e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: volumes: - ./data:/workspace/tasks # 持久化:任务目录 + SQLite(.agent.db 在此目录内) - ./config.yml:/app/config.yml:ro + - ./app/server:/app/server environment: - PORT=8080 - AGENT_CONFIG=/app/config.yml diff --git a/docs/auth.js b/docs/auth.js deleted file mode 100644 index ec45a48..0000000 --- a/docs/auth.js +++ /dev/null @@ -1,23 +0,0 @@ -// 认证与授权中间件 -const jwt = require('jsonwebtoken'); -const JWT_SECRET = process.env.JWT_SECRET || 'xiaocai-secret-2024'; - -function authMiddleware(req, res, next) { - const authHeader = req.headers.authorization; - if (!authHeader) return res.status(401).json({ error: '未登录' }); - const token = authHeader.split(' ')[1]; - try { - const decoded = jwt.verify(token, JWT_SECRET); - req.user = decoded; - next(); - } catch (e) { - res.status(401).json({ error: '登录已过期' }); - } -} - -function adminOnly(req, res, next) { - if (!req.user.isAdmin) return res.status(403).json({ error: '仅管理员可执行此操作' }); - next(); -} - -module.exports = { authMiddleware, adminOnly, JWT_SECRET }; diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 3ae6277..0000000 --- a/docs/index.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - 小财记账 - - - - - - - -
- - - - - - - - - - - - - - - - -
- - - - - - - - -