This commit is contained in:
Vortrex
2023-02-08 18:04:27 -06:00
parent 77114a14a3
commit bacdc063d4
62 changed files with 645 additions and 645 deletions

View File

@@ -20,7 +20,7 @@ let twoFactorAuth = {
// ===========================================================================
function initTwoFactorAuthenticationGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating two factor auth GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating two factor auth GUI ...`);
twoFactorAuth.window = mexui.window(game.width / 2 - 150, game.height / 2 - 129, 300, 258, 'LOGIN', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
@@ -94,14 +94,14 @@ function initTwoFactorAuthenticationGUI() {
},
}, checkTwoFactorAuth);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created two factor auth GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created two factor auth GUI`);
}
// ===========================================================================
function showTwoFactorAuthGUI() {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing two-factor authentication window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing two-factor authentication window`);
setChatWindowEnabled(false);
mexui.setInput(true);
twoFactorAuth.window.shown = true;
@@ -112,7 +112,7 @@ function showTwoFactorAuthGUI() {
// ===========================================================================
function twoFactorAuthFailed(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
twoFactorAuth.messageLabel.text = errorMessage;
twoFactorAuth.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
twoFactorAuth.codeInput.text = "";
@@ -121,14 +121,14 @@ function twoFactorAuthFailed(errorMessage) {
// ===========================================================================
function twoFactorAuthSuccess() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication was successful`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports two-factor authentication was successful`);
closeAllWindows();
}
// ===========================================================================
function checkTwoFactorAuth() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking two-factor authentication with server ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking two-factor authentication with server ...`);
sendNetworkEventToServer("v.rp.2fa", twoFactorAuth.codeInput.lines[0]);
}