From fda52f7160280af604f6ace292f126d0204eea54 Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 30 Oct 2017 12:17:12 -0500 Subject: [PATCH] Moves login state of dialog to be first, to be the initial state. By default impromptu uses the first state as the default one to show. --- modules/UI/authentication/LoginDialog.js | 46 ++++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/UI/authentication/LoginDialog.js b/modules/UI/authentication/LoginDialog.js index 1547fbaab..5ef5b1472 100644 --- a/modules/UI/authentication/LoginDialog.js +++ b/modules/UI/authentication/LoginDialog.js @@ -62,29 +62,6 @@ function LoginDialog(successCallback, cancelCallback) { } const states = { - connecting: { - buttons: [], - defaultButton: 0, - html: '
', - titleKey: 'dialog.connecting' - }, - finished: { - buttons: finishedButtons, - defaultButton: 0, - html: '
', - titleKey: 'dialog.error', - - submit(e, v) { - e.preventDefault(); - if (v === 'retry') { - // eslint-disable-next-line no-use-before-define - connDialog.goToState('login'); - } else { - // User cancelled - cancelCallback(); - } - } - }, login: { buttons: loginButtons, focus: ':input:first', @@ -107,6 +84,29 @@ function LoginDialog(successCallback, cancelCallback) { cancelCallback(); } } + }, + connecting: { + buttons: [], + defaultButton: 0, + html: '
', + titleKey: 'dialog.connecting' + }, + finished: { + buttons: finishedButtons, + defaultButton: 0, + html: '
', + titleKey: 'dialog.error', + + submit(e, v) { + e.preventDefault(); + if (v === 'retry') { + // eslint-disable-next-line no-use-before-define + connDialog.goToState('login'); + } else { + // User cancelled + cancelCallback(); + } + } } }; const connDialog = APP.UI.messageHandler.openDialogWithStates(