feat: v1.1.0 迭代更新

Server:
- 添加房间密码验证 POST /rooms/:id/join
- 添加玩家踢出 POST /rooms/:id/kick/:playerId
- 添加房间过期自动清理(30分钟无活动)
- 添加流量统计 GET /traffic
- 添加token认证中间件保护写操作API
- 房间详情返回玩家列表

Client:
- 添加设置持久化(electron-store)
- 添加设置页面(玩家名、本地端口、自动重连、托盘最小化)
- 添加系统托盘支持(最小化到托盘、右键菜单)
- 添加最近连接服务器记录
- 连接成功自动保存服务器地址
- 加入房间自动填充默认端口
This commit is contained in:
FunMC
2026-02-22 23:38:41 +08:00
parent b17679cec6
commit 9649519745
9 changed files with 411 additions and 3 deletions

View File

@@ -420,6 +420,57 @@ select.input { cursor: pointer; }
.step strong { font-size: 13px; display: block; margin-bottom: 3px; }
.step p { font-size: 12px; color: var(--text-dim); }
/* Settings */
.toggle-label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: 13px;
}
.toggle-label input[type="checkbox"] {
width: 18px;
height: 18px;
accent-color: var(--green);
cursor: pointer;
}
.recent-servers {
margin-top: 6px;
background: var(--bg-dark);
border: 1px solid var(--border);
border-radius: 6px;
max-height: 120px;
overflow-y: auto;
}
.recent-item {
padding: 8px 12px;
font-size: 12px;
color: var(--text-dim);
cursor: pointer;
transition: background 0.15s;
border-bottom: 1px solid var(--border);
}
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: rgba(76, 175, 80, 0.1); color: var(--text); }
.recent-list {
display: flex;
flex-direction: column;
gap: 4px;
margin-top: 6px;
}
.recent-list-item {
display: flex;
justify-content: space-between;
align-items: center;
background: var(--bg-dark);
border-radius: 6px;
padding: 8px 12px;
font-size: 12px;
color: var(--text-dim);
}
.recent-list-item .url { flex: 1; }
.recent-list-empty { font-size: 12px; color: #555; padding: 8px 0; }
/* Utility */
.hidden { display: none !important; }