@@ -131,41 +131,34 @@ private void HandleEnterPressed()
131
131
132
132
private void OnGUILogin ( )
133
133
{
134
- GUILayout . Space ( 3 ) ;
135
- GUILayout . BeginHorizontal ( ) ;
134
+ EditorGUI . BeginDisabledGroup ( isBusy ) ;
136
135
{
137
- EditorGUI . BeginDisabledGroup ( isBusy ) ;
136
+ GUILayout . Space ( 3 ) ;
137
+ GUILayout . BeginHorizontal ( ) ;
138
138
{
139
139
username = EditorGUILayout . TextField ( usernameLabel , username , Styles . TextFieldStyle ) ;
140
140
}
141
- EditorGUI . EndDisabledGroup ( ) ;
142
- }
143
- GUILayout . EndHorizontal ( ) ;
144
- GUILayout . Space ( Styles . BaseSpacing ) ;
145
- GUILayout . BeginHorizontal ( ) ;
146
- {
147
- EditorGUI . BeginDisabledGroup ( isBusy ) ;
141
+ GUILayout . EndHorizontal ( ) ;
142
+
143
+ GUILayout . Space ( Styles . BaseSpacing ) ;
144
+ GUILayout . BeginHorizontal ( ) ;
148
145
{
149
146
password = EditorGUILayout . PasswordField ( passwordLabel , password , Styles . TextFieldStyle ) ;
150
147
}
151
- EditorGUI . EndDisabledGroup ( ) ;
152
- }
153
- GUILayout . EndHorizontal ( ) ;
154
-
155
- ShowErrorMessage ( ) ;
156
-
157
- GUILayout . Space ( Styles . BaseSpacing + 3 ) ;
148
+ GUILayout . EndHorizontal ( ) ;
158
149
150
+ ShowErrorMessage ( ) ;
159
151
160
- EditorGUI . BeginDisabledGroup ( isBusy ) ;
161
- {
152
+ GUILayout . Space ( Styles . BaseSpacing + 3 ) ;
162
153
GUILayout . BeginHorizontal ( ) ;
163
- GUILayout . FlexibleSpace ( ) ;
164
- if ( GUILayout . Button ( loginButton ) || ( GUI . enabled && enterPressed ) )
165
154
{
166
- GUI . FocusControl ( null ) ;
167
- isBusy = true ;
168
- AuthenticationService . Login ( username , password , DoRequire2fa , DoResult ) ;
155
+ GUILayout . FlexibleSpace ( ) ;
156
+ if ( GUILayout . Button ( loginButton ) || ( GUI . enabled && enterPressed ) )
157
+ {
158
+ GUI . FocusControl ( null ) ;
159
+ isBusy = true ;
160
+ AuthenticationService . Login ( username , password , DoRequire2fa , DoResult ) ;
161
+ }
169
162
}
170
163
GUILayout . EndHorizontal ( ) ;
171
164
}
@@ -175,48 +168,46 @@ private void OnGUILogin()
175
168
private void OnGUI2FA ( )
176
169
{
177
170
GUILayout . BeginVertical ( ) ;
178
- GUILayout . Label ( twofaTitle , EditorStyles . boldLabel ) ;
179
- GUILayout . Label ( twofaDescription , EditorStyles . wordWrappedLabel ) ;
180
-
181
- GUILayout . Space ( Styles . BaseSpacing ) ;
182
-
183
- GUILayout . BeginHorizontal ( ) ;
184
171
{
172
+ GUILayout . Label ( twofaTitle , EditorStyles . boldLabel ) ;
173
+ GUILayout . Label ( twofaDescription , EditorStyles . wordWrappedLabel ) ;
174
+
185
175
EditorGUI . BeginDisabledGroup ( isBusy ) ;
186
176
{
187
- two2fa = EditorGUILayout . TextField ( twofaLabel , two2fa , Styles . TextFieldStyle ) ;
188
- }
189
- EditorGUI . EndDisabledGroup ( ) ;
190
- }
191
- GUILayout . EndHorizontal ( ) ;
192
- GUILayout . Space ( Styles . BaseSpacing ) ;
193
-
194
- ShowErrorMessage ( ) ;
177
+ GUILayout . Space ( Styles . BaseSpacing ) ;
178
+ GUILayout . BeginHorizontal ( ) ;
179
+ {
180
+ two2fa = EditorGUILayout . TextField ( twofaLabel , two2fa , Styles . TextFieldStyle ) ;
181
+ }
182
+ GUILayout . EndHorizontal ( ) ;
195
183
196
- GUILayout . Space ( Styles . BaseSpacing ) ;
184
+ GUILayout . Space ( Styles . BaseSpacing ) ;
185
+ ShowErrorMessage ( ) ;
197
186
198
- EditorGUI . BeginDisabledGroup ( isBusy ) ;
199
- {
200
- GUILayout . BeginHorizontal ( ) ;
201
- GUILayout . FlexibleSpace ( ) ;
202
- if ( GUILayout . Button ( backButton ) )
203
- {
204
- GUI . FocusControl ( null ) ;
205
- need2fa = false ;
206
- Redraw ( ) ;
207
- }
187
+ GUILayout . Space ( Styles . BaseSpacing ) ;
188
+ GUILayout . BeginHorizontal ( ) ;
189
+ {
190
+ GUILayout . FlexibleSpace ( ) ;
191
+ if ( GUILayout . Button ( backButton ) )
192
+ {
193
+ GUI . FocusControl ( null ) ;
194
+ need2fa = false ;
195
+ Redraw ( ) ;
196
+ }
197
+
198
+ if ( GUILayout . Button ( twofaButton ) || ( GUI . enabled && enterPressed ) )
199
+ {
200
+ GUI . FocusControl ( null ) ;
201
+ isBusy = true ;
202
+ AuthenticationService . LoginWith2fa ( two2fa ) ;
203
+ }
204
+ }
205
+ GUILayout . EndHorizontal ( ) ;
208
206
209
- if ( GUILayout . Button ( twofaButton ) || ( GUI . enabled && enterPressed ) )
210
- {
211
- GUI . FocusControl ( null ) ;
212
- isBusy = true ;
213
- AuthenticationService . LoginWith2fa ( two2fa ) ;
207
+ GUILayout . Space ( Styles . BaseSpacing ) ;
214
208
}
215
- GUILayout . EndHorizontal ( ) ;
209
+ EditorGUI . EndDisabledGroup ( ) ;
216
210
}
217
- EditorGUI . EndDisabledGroup ( ) ;
218
-
219
- GUILayout . Space ( Styles . BaseSpacing ) ;
220
211
GUILayout . EndVertical ( ) ;
221
212
}
222
213
0 commit comments