feat: 完善 Web UI 细节

新增页面:
- session_detail.html - 会话详情独立页面
- channel_edit.html - 频道配置编辑独立页面
- 错误页面 (401/403/404/500)

功能优化:
- 添加错误处理器支持 HTML 响应
- 更新编辑按钮跳转独立页面
- 完善暗黑主题支持

作者: 小黑 🐶
This commit is contained in:
2026-03-15 07:12:38 +08:00
parent 7b0b3be6c8
commit af487ff71e
9 changed files with 728 additions and 14 deletions

View File

@@ -148,20 +148,9 @@
});
}
// 编辑频道
// 编辑频道 - 跳转到独立编辑页面
function editChannel(id) {
fetch(`/api/web/channels/${id}`)
.then(res => res.json())
.then(data => {
document.getElementById('modal-title').textContent = '编辑配置';
document.getElementById('channel-id').value = data.id;
document.getElementById('channel-name').value = data.name;
document.getElementById('channel-url').value = data.gateway_url;
document.getElementById('channel-reconnect').value = data.reconnect_interval;
document.getElementById('channel-heartbeat').value = data.heartbeat_interval;
document.getElementById('channel-enabled').checked = data.enabled;
showModal('channel-modal');
});
window.location.href = `/web/config/channels/${id}/edit`;
}
// 删除频道