feat: add Space integration for user authentication and model management with OAuth support

This commit is contained in:
Junyan Qin
2025-12-26 00:35:47 +08:00
parent 7479545339
commit 8caab43b00
27 changed files with 5214 additions and 6156 deletions
+34
View File
@@ -47,6 +47,27 @@ const zhHans = {
test: '测试',
forgotPassword: '忘记密码?',
loading: '加载中...',
or: '或',
loginWithSpace: '通过 Space 登录',
spaceLoginRecommended: '推荐:从 Space 同步模型和点数',
loginLocal: '使用本地账号登录',
spaceLoginTitle: '通过 Space 登录',
spaceLoginDescription: '扫描二维码或访问下方链接进行授权',
spaceLoginUserCode: '您的验证码',
spaceLoginExpires: '验证码将在 {{seconds}} 秒后过期',
spaceLoginWaiting: '等待授权中...',
spaceLoginSuccess: '授权成功',
spaceLoginFailed: 'Space 登录失败',
spaceLoginExpired: '验证码已过期,请重试',
spaceLoginCancel: '取消',
spaceLoginVisitLink: '访问链接',
spaceLoginProcessing: '正在通过 Space 登录',
spaceLoginProcessingDescription: '请稍候,正在完成登录...',
spaceLoginSuccessDescription: '正在跳转到 LangBot...',
spaceLoginError: '登录失败',
spaceLoginNoCode: '缺少授权码',
backToLogin: '返回登录',
spaceAccountCannotChangePassword: 'Space 账户无法在此修改密码',
theme: '主题',
changePassword: '修改密码',
currentPassword: '当前密码',
@@ -149,6 +170,16 @@ const zhHans = {
testSuccess: '测试成功',
testError: '测试失败,请检查模型配置',
llmModels: '对话模型',
localProvider: '本地',
localProviderDescription: '在本地配置和管理的模型',
spaceProviderDescription: '从您的 Space 账户同步的模型',
spaceDisabledForLocalAccount: '使用 Space 登录以使用云端模型',
syncModels: '同步',
syncSuccess: '同步完成:创建 {{created}} 个,更新 {{updated}} 个',
syncError: '同步失败:',
spaceModelReadOnly: 'Space 模型为只读',
noSpaceModels: '暂无 Space 模型。点击同步按钮从 Space 获取模型。',
noLocalModels: '暂无本地模型。点击创建按钮添加模型。',
},
bots: {
title: '机器人',
@@ -616,6 +647,9 @@ const zhHans = {
description: '这是您首次启动 LangBot',
adminAccountNote: '您填写的邮箱和密码将作为初始管理员账号',
register: '注册',
initWithSpace: '通过 Space 初始化',
spaceRecommended: '推荐:从 Space 同步模型和点数',
registerLocal: '注册本地账号',
initSuccess: '初始化成功 请登录',
initFailed: '初始化失败:',
},