feat: support fetch auth info

This commit is contained in:
Chenx Dust
2025-10-07 23:05:26 +08:00
parent 7ddde74b10
commit df60db116b
13 changed files with 237 additions and 18 deletions

View File

@@ -116,6 +116,23 @@ SettingWindow::SettingWindow(QWidget *parent, QSettings *inputSettings) :
{
ui->totpSecretLineEdit->setEchoMode(state == Qt::Checked ? QLineEdit::Normal : QLineEdit::Password);
});
connect(ui->authSelectPushButton, &QPushButton::clicked, this, [&]() {
authInfoWindow = new AuthInfoWindow(this);
connect(authInfoWindow, &AuthInfoWindow::finishAuthInfo, this,
[&](const QString &authType, const QString &loginDomain, const QString &loginUrl) {
if (authType == "auth/cas")
{
ui->casRadioButton->setChecked(true);
ui->casLoginUrlLineEdit->setText(loginUrl);
}
else
ui->pswRadioButton->setChecked(true);
ui->loginDomainLineEdit->setText(loginDomain);
});
authInfoWindow->fetchAuthInfo(ui->serverAddressLineEdit->text());
authInfoWindow->show();
});
}
SettingWindow::~SettingWindow()