-
-
TSBot 部署向导
-
让机器人加入你的频道
+
+
+
让机器人加入你的频道
准备好 TeamSpeak 地址,按顺序配置并检查连接。
@@ -86,7 +89,7 @@ async function applyAndCheck() {
{{ message }}
正在加载配置…
- {{ steps[step] }}
+ {{ steps[step] }}
填写语音服务器端口(通常为 9987)。频道 ID 或路径选填其一;都留空则使用默认频道。
@@ -107,7 +110,7 @@ async function applyAndCheck() {
- {{ report.demo ? '模拟检查结果' : report.ready ? '必要连接已就绪' : '还有连接需要处理' }}
+ {{ report.demo ? '模拟检查结果' : report.ready ? '必要连接已就绪' : '还有连接需要处理' }}
-
@@ -124,5 +127,5 @@ async function applyAndCheck() {
-
+
diff --git a/web/src/router.ts b/web/src/router.ts
index dfad1f5..693ceeb 100644
--- a/web/src/router.ts
+++ b/web/src/router.ts
@@ -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', component: () => import('./views/SetupView.vue'), meta: { requiresAuth: true } },
+ { path: '/setup', redirect: { path: '/settings', query: { group: 'setup' } } },
{ path: '/cookie', redirect: { path: '/settings', query: { group: 'authorization' } } },
{ path: '/lyrics', component: LyricsView },
],
diff --git a/web/src/views/ChangePasswordView.vue b/web/src/views/ChangePasswordView.vue
index 087ee2d..321f948 100644
--- a/web/src/views/ChangePasswordView.vue
+++ b/web/src/views/ChangePasswordView.vue
@@ -22,7 +22,7 @@ async function submit() {
try {
const firstLogin = authState.must_change_password
await changePassword(currentPassword.value, newPassword.value)
- await router.replace(firstLogin ? '/setup' : '/settings')
+ await router.replace(firstLogin ? '/settings?group=setup' : '/settings')
} catch (e: any) {
error.value = String(e?.message || e)
} finally {
diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue
index 1651cdf..d160b64 100644
--- a/web/src/views/SettingsView.vue
+++ b/web/src/views/SettingsView.vue
@@ -7,6 +7,7 @@ import { logout } from '../auth'
import { loadAppBranding } from '../appConfig'
import FloatingToast from '../components/FloatingToast.vue'
import CookieView from './CookieView.vue'
+import SetupWizard from '../components/SetupWizard.vue'
import { DEMO_MODE } from '../demoMode'
interface SettingField {
@@ -49,6 +50,7 @@ interface ManagedAsset {
}
const GROUPS = [
+ ['setup', '部署向导'],
['web', 'Web 配置'],
['backend', 'Voice 服务'],
['music', '音乐接口配置'],
@@ -245,6 +247,14 @@ function clearSecret(field: SettingField) {
field.configured = false
}
+async function refreshAfterSetup() {
+ try {
+ hydrate(await apiGet
('/admin/settings'))
+ } catch (e: any) {
+ showToast(String(e?.message || e), 'error', 8000)
+ }
+}
+
function selectGroup(group: string) {
activeGroup.value = group
error.value = ''
@@ -273,7 +283,7 @@ onBeforeUnmount(() => {
运行配置与服务连接