mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
feat: 添加 OAuth 认证支持及相关改进
- 新增 OAuth 模块,支持 LinuxDo/GitHub/Google 等第三方登录 - 用户邮箱改为可选字段,支持无邮箱注册 - 新增模块配置验证状态 (config_validated/config_error) - 系统设置界面改为分块独立保存 - 用户设置新增 OAuth 绑定管理和首次密码设置 - 登录界面支持 OAuth 按钮展示 - 邮箱验证设置移至邮件设置页面
This commit is contained in:
@@ -52,6 +52,7 @@ export const useModuleStore = defineStore('modules', () => {
|
||||
|
||||
/**
|
||||
* 设置模块启用状态
|
||||
* @throws 如果设置失败会抛出错误
|
||||
*/
|
||||
async function setEnabled(moduleName: string, enabled: boolean) {
|
||||
try {
|
||||
@@ -62,7 +63,8 @@ export const useModuleStore = defineStore('modules', () => {
|
||||
} catch (err: any) {
|
||||
log.error(`Failed to set module ${moduleName} enabled=${enabled}`, err)
|
||||
error.value = err.response?.data?.detail || '设置模块状态失败'
|
||||
return false
|
||||
// 重新抛出错误,让调用方可以获取详细错误信息
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user