Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ docker compose -f docker-compose.prebuilt.yml ps
1. 打开 `http://<服务器地址>:8080`。
2. 在服务器的 `logs/initial-admin-password.txt` 读取初始密码,以 `admin` 登录并修改密码。
3. 在“系统配置”填写 TeamSpeak 地址、频道和音乐源配置,点击“应用配置”,确认机器人进入频道。
首次登录改密后也可跟随“部署向导”完成配置,使用“应用并检查”分别检查 Voice、TeamSpeak 和音乐接口。
首次登录改密后进入设置,按“TeamSpeak 连接”“音乐账号登录”等分类完成配置;每类均附用途说明。
4. 在 Web 搜索并加入一首歌曲,或在 TeamSpeak 发送 `帮助` 查看聊天指令。

网易云功能需要自行部署 `NeteaseCloudMusicApi`;QQ 音乐和 B 站适配已内建。部分播放和账号功能需要对应平台登录态,实际可播放内容受账号权限及平台限制影响。
Expand Down
6 changes: 3 additions & 3 deletions docs/DEMO.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ npm --prefix web run preview:demo

访问终端显示的地址,并保留 `/NeteaseTSBot/` 子目录。演示默认使用哈希路由,例如 `/NeteaseTSBot/#/queue`,直接打开或刷新子页面都不需要服务器路由重写。

演示支持三平台模拟搜索、添加/移除/重排队列、模拟播放暂停和进度、歌词、示例歌单、历史记录、本地收藏和部署向导。队列与配置只保存在当前页面内存中,刷新即重置;收藏、搜索历史和主题使用浏览器本地存储。
演示支持三平台模拟搜索、添加/移除/重排队列、模拟播放暂停和进度、歌词、示例歌单、历史记录、本地收藏和分类设置。队列与配置只保存在当前页面内存中,刷新即重置;收藏、搜索历史和主题使用浏览器本地存储。

界面明确标注模拟数据,不播放真实音频,不连接音乐平台或 TeamSpeak。演示构建中的 API 只调用本地适配器;未实现的接口会明确报错,不会回退到真实请求。平台登录界面不展示,也不接收 Cookie、密码或上传文件。

Expand All @@ -33,9 +33,9 @@ npm --prefix web run preview:demo

`VITE_DEMO_MODE` 是构建时开关,不能用 URL 参数打开或关闭。不要给演示构建配置真实 API Token、Cookie 或平台凭据;公开前端构建不应包含这些信息。

## 部署向导与连接诊断
## 分类设置与连接诊断

真实部署首次登录改密后进入“设置 → 部署向导”(`/settings?group=setup`),已有管理员可以在设置内切换到部署向导。旧 `/setup` 地址自动跳转到该分类。前两步只保存 TeamSpeak 与网易云 API 配置,最后一步应用所有已保存的配置,等待 Voice 确认配置版本后检查连接。
真实部署首次登录改密后进入设置。常用设置包含 TeamSpeak 连接、音乐账号登录、音乐接口与缓存、界面外观;高级设置包含服务与日志、外部 API、ServerQuery 兼容。每类均显示用途说明,原有 `/setup` 地址兼容跳转到 TeamSpeak 连接。修改后保存配置,再点击“应用配置”使其生效。

`GET /admin/diagnostics` 仅管理员会话可访问,分别检查数据库、待应用配置、Voice gRPC、TeamSpeak 会话和可选的网易云 API。Voice 检查最多等待 3 秒;音乐 API 使用 4 秒 HTTP 超时,两者并发执行。错误响应不会包含上游异常文本、地址中的凭据或 Cookie。

Expand Down
131 changes: 0 additions & 131 deletions web/src/components/SetupWizard.vue

This file was deleted.

2 changes: 1 addition & 1 deletion web/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const router = createRouter({
{ path: '/login', name: 'login', component: LoginView, meta: { authPage: true } },
{ path: '/change-password', name: 'change-password', component: ChangePasswordView, meta: { authPage: true, requiresAuth: true } },
{ path: '/settings', component: SettingsView, meta: { requiresAuth: true } },
{ path: '/setup', redirect: { path: '/settings', query: { group: 'setup' } } },
{ path: '/setup', redirect: { path: '/settings', query: { group: 'teamspeak' } } },
{ path: '/cookie', redirect: { path: '/settings', query: { group: 'authorization' } } },
{ path: '/lyrics', component: LyricsView },
],
Expand Down
4 changes: 2 additions & 2 deletions web/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ body.theme-dark .demo-banner {
}

body.theme-dark .demo-banner a,
body.theme-dark .theme-setup-shell .text-blue-600,
body.theme-dark .theme-setup-shell .text-blue-700 {
body.theme-dark .theme-settings-shell .text-blue-600,
body.theme-dark .theme-settings-shell .text-blue-700 {
color: #93c5fd !important;
}
17 changes: 0 additions & 17 deletions web/src/types/settings.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
export interface SetupField {
key: string
label: string
type: string
value: unknown
sensitive: boolean
configured: boolean
minimum: number | null
maximum: number | null
help: string
}
export interface SetupSettings {
fields: SetupField[]
apply_pending: boolean
voice_restart_requested?: boolean
voice_config_revision?: string
}
export interface DiagnosticCheck {
id: string
label: string
Expand Down
3 changes: 1 addition & 2 deletions web/src/views/ChangePasswordView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ async function submit() {
}
submitting.value = true
try {
const firstLogin = authState.must_change_password
await changePassword(currentPassword.value, newPassword.value)
await router.replace(firstLogin ? '/settings?group=setup' : '/settings')
await router.replace('/settings')
} catch (e: any) {
error.value = String(e?.message || e)
} finally {
Expand Down
Loading
Loading