mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
More work
* Refactored code out of common/ into servatrice/ * added smtp client library * disable registration when connected * validate email address * send activation token via email
This commit is contained in:
parent
8cf4461616
commit
471f6371b5
38 changed files with 2699 additions and 146 deletions
|
|
@ -104,11 +104,13 @@ void MainWindow::statusChanged(ClientStatus _status)
|
|||
tabSupervisor->stop();
|
||||
aSinglePlayer->setEnabled(true);
|
||||
aConnect->setEnabled(true);
|
||||
aRegister->setEnabled(true);
|
||||
aDisconnect->setEnabled(false);
|
||||
break;
|
||||
case StatusLoggingIn:
|
||||
aSinglePlayer->setEnabled(false);
|
||||
aConnect->setEnabled(false);
|
||||
aRegister->setEnabled(false);
|
||||
aDisconnect->setEnabled(true);
|
||||
break;
|
||||
case StatusConnecting:
|
||||
|
|
@ -179,6 +181,7 @@ void MainWindow::actSinglePlayer()
|
|||
return;
|
||||
|
||||
aConnect->setEnabled(false);
|
||||
aRegister->setEnabled(false);
|
||||
aSinglePlayer->setEnabled(false);
|
||||
|
||||
localServer = new LocalServer(this);
|
||||
|
|
@ -226,6 +229,7 @@ void MainWindow::localGameEnded()
|
|||
localServer = 0;
|
||||
|
||||
aConnect->setEnabled(true);
|
||||
aRegister->setEnabled(true);
|
||||
aSinglePlayer->setEnabled(true);
|
||||
}
|
||||
|
||||
|
|
@ -336,7 +340,7 @@ void MainWindow::registerError(Response::ResponseCode r, QString reasonStr, quin
|
|||
QMessageBox::critical(this, tr("Registration denied"), tr("There is already an existing account with the same user name."));
|
||||
break;
|
||||
case Response::RespEmailRequiredToRegister:
|
||||
QMessageBox::critical(this, tr("Registration denied"), tr("It's mandatory to specify an email when registering."));
|
||||
QMessageBox::critical(this, tr("Registration denied"), tr("It's mandatory to specify a valid email address when registering."));
|
||||
break;
|
||||
case Response::RespTooManyRequests:
|
||||
QMessageBox::critical(this, tr("Registration denied"), tr("Too many registration attempts from your IP address."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue