feat: 更好的认证配置报错

This commit is contained in:
Chenx Dust
2026-02-02 14:35:03 +08:00
parent f23a9047cf
commit 22df9db903
6 changed files with 11 additions and 11 deletions

View File

@@ -37,10 +37,10 @@
<img src="docs/proxy_setting.png" width="400px">
</div>
3. 在 “文件”-“设置”-“登录” 页面中,选择对应的服务器类型,输入账号(一般为学号)和密码,保存登录信息;
3. 在 “文件”-“设置”-“认证” 页面中,选择对应的服务器类型,配置认证信息;
> ![!NOTE]
> aTrust 服务器支持多种登录方式,如需选择请点击“获取认证方式”按钮。
> aTrust 服务器支持多种认证方式,如需选择请点击“获取认证方式”按钮。
<div align="center">
<img src="docs/auth_method.png" width="400px">

View File

@@ -207,14 +207,6 @@ Line 2
<enum>QAction::MenuRole::PreferencesRole</enum>
</property>
</action>
<action name="webLoginAction">
<property name="text">
<string>SSO 登录</string>
</property>
<property name="toolTip">
<string>打开校园网 SSO 登录窗口</string>
</property>
</action>
<action name="disableProxyAction">
<property name="text">
<string>禁用系统代理</string>

View File

@@ -223,7 +223,7 @@
</widget>
<widget class="QWidget" name="loginTab">
<attribute name="title">
<string>登录</string>
<string>认证</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_9">
<item row="2" column="0">

View File

@@ -74,6 +74,10 @@ ZjuConnectController::ZjuConnectController(QWidget* parent) : QObject(parent)
{
emit error(ZJU_ERROR::INTERACTIVE_ERROR);
}
else if (output.contains("auth type/login domain combination not found"))
{
emit error(ZJU_ERROR::AUTH_NOT_AVAILABLE);
}
else if (output.contains("client setup error"))
{
emit error(ZJU_ERROR::CLIENT_FAILED);

View File

@@ -15,6 +15,7 @@ enum class ZJU_ERROR
CAPTCHA_FAILED,
PROGRAM_NOT_FOUND,
INTERACTIVE_ERROR,
AUTH_NOT_AVAILABLE,
OTHER,
};

View File

@@ -136,6 +136,9 @@ void MainWindow::initZjuConnect()
case ZJU_ERROR::INTERACTIVE_ERROR:
QMessageBox::critical(this, "错误", "登录失败!\n请检查您的输入是否正确,检查是否完成 SSO 登录。");
break;
case ZJU_ERROR::AUTH_NOT_AVAILABLE:
QMessageBox::critical(this, "错误", "认证方式/登录域不可用!\n请通过“获取认证方式”按钮配置认证方式。");
break;
case ZJU_ERROR::OTHER:
QMessageBox::critical(this, "错误", "其它错误!\n未知原因,可将日志反馈给开发者以便调查。");
break;