|
@@ -133,6 +133,7 @@ void QMLHandler::handleJSON(string buffer) {
|
|
} else {
|
|
} else {
|
|
emit ipPopupSetStatus(root["error"].asString().c_str());
|
|
emit ipPopupSetStatus(root["error"].asString().c_str());
|
|
closeCLI();
|
|
closeCLI();
|
|
|
|
+ emit ipPopupEnableConnectButton();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -145,6 +146,7 @@ void QMLHandler::handleJSON(string buffer) {
|
|
string("Version mismatch: \nClient: " + root["clientversion"].asString() + "\nServer: " + root["serverversion"].asString()));
|
|
string("Version mismatch: \nClient: " + root["clientversion"].asString() + "\nServer: " + root["serverversion"].asString()));
|
|
emit ipPopupSetStatus(errorMessage);
|
|
emit ipPopupSetStatus(errorMessage);
|
|
reopenCLI(_IP);
|
|
reopenCLI(_IP);
|
|
|
|
+ emit ipPopupEnableConnectButton();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -154,6 +156,7 @@ void QMLHandler::handleJSON(string buffer) {
|
|
} else {
|
|
} else {
|
|
emit loginSetStatus(root["error"].asString().c_str());
|
|
emit loginSetStatus(root["error"].asString().c_str());
|
|
reopenCLI(_IP);
|
|
reopenCLI(_IP);
|
|
|
|
+ emit loginEnableLoginButton();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -163,6 +166,7 @@ void QMLHandler::handleJSON(string buffer) {
|
|
} else {
|
|
} else {
|
|
emit loginSetStatus(root["error"].asString().c_str());
|
|
emit loginSetStatus(root["error"].asString().c_str());
|
|
reopenCLI(_IP);
|
|
reopenCLI(_IP);
|
|
|
|
+ emit signupEnableRegisterButton();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -287,12 +291,16 @@ void QMLHandler::onMessagesSendButton(QString msg) { emit message(msg); }
|
|
void QMLHandler::onSettingsDeleteMeButton() { write(outpipefd[1], "deleteme\n", strlen("deleteme\n")); }
|
|
void QMLHandler::onSettingsDeleteMeButton() { write(outpipefd[1], "deleteme\n", strlen("deleteme\n")); }
|
|
|
|
|
|
|
|
|
|
-void QMLHandler::onIpPopupConnectButton(QString ip) { reopenCLI(ip); }
|
|
+void QMLHandler::onIpPopupConnectButton(QString ip) {
|
|
|
|
+ reopenCLI(ip);
|
|
|
|
+ emit ipPopupDisableConnectButton();
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
void QMLHandler::onLoginLoginButton(QString username, QString password) {
|
|
void QMLHandler::onLoginLoginButton(QString username, QString password) {
|
|
QString command = "login " + username + " " + password + "\n";
|
|
QString command = "login " + username + " " + password + "\n";
|
|
write(outpipefd[1], command.toUtf8().constData(), strlen(command.toUtf8().constData()));
|
|
write(outpipefd[1], command.toUtf8().constData(), strlen(command.toUtf8().constData()));
|
|
|
|
+ emit loginDisableLoginButton();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -303,6 +311,7 @@ void QMLHandler::onSignupRegisterButton(QString username, QString passwordOne, Q
|
|
}
|
|
}
|
|
QString command = "signup " + username + " " + passwordOne + "\n";
|
|
QString command = "signup " + username + " " + passwordOne + "\n";
|
|
write(outpipefd[1], command.toUtf8().constData(), strlen(command.toUtf8().constData()));
|
|
write(outpipefd[1], command.toUtf8().constData(), strlen(command.toUtf8().constData()));
|
|
|
|
+ emit signupDisableRegisterButton();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|