@@ -7,15 +7,14 @@ namespace GitHub.Unity
77 [ Serializable ]
88 class AuthenticationView : Subview
99 {
10- const string serverLabel = "Server" ;
1110 const string usernameLabel = "Username" ;
1211 const string passwordLabel = "Password" ;
13- const string twofaLabel = "Authentication code " ;
12+ const string twofaLabel = "2FA Code " ;
1413 const string loginButton = "Sign in" ;
1514 const string backButton = "Back" ;
1615 const string authTitle = "Sign in to GitHub" ;
17- const string twofaTitle = "Two-factor authentication " ;
18- const string twofaDescription = "Open the two-factor authentication app on your device to view your authentication code and verify your identity." ;
16+ const string twofaTitle = "Two-Factor Authentication " ;
17+ const string twofaDescription = "Open the two-factor authentication app on your device to view your 2FA code and verify your identity." ;
1918 const string twofaButton = "Verify" ;
2019
2120 [ SerializeField ] private Vector2 scroll ;
@@ -76,6 +75,8 @@ public override void OnGUI()
7675 {
7776 HandleEnterPressed ( ) ;
7877
78+ EditorGUIUtility . labelWidth = 90f ;
79+
7980 scroll = GUILayout . BeginScrollView ( scroll ) ;
8081 {
8182 Rect authHeader = EditorGUILayout . BeginHorizontal ( Styles . AuthHeaderBoxStyle ) ;
@@ -114,7 +115,6 @@ public override void OnGUI()
114115 }
115116
116117 GUILayout . EndVertical ( ) ;
117- GUILayout . Space ( Styles . BaseSpacing ) ;
118118 }
119119 GUILayout . EndScrollView ( ) ;
120120 }
@@ -135,15 +135,15 @@ private void OnGUILogin()
135135 GUILayout . BeginHorizontal ( ) ;
136136 {
137137 if ( busy ) GUI . enabled = false ;
138- username = EditorGUILayout . TextField ( "Username" , username , Styles . TextFieldStyle ) ;
138+ username = EditorGUILayout . TextField ( usernameLabel , username , Styles . TextFieldStyle ) ;
139139 GUI . enabled = true ;
140140 }
141141 GUILayout . EndHorizontal ( ) ;
142142 GUILayout . Space ( Styles . BaseSpacing ) ;
143143 GUILayout . BeginHorizontal ( ) ;
144144 {
145145 if ( busy ) GUI . enabled = false ;
146- password = EditorGUILayout . PasswordField ( "Password" , password , Styles . TextFieldStyle ) ;
146+ password = EditorGUILayout . PasswordField ( passwordLabel , password , Styles . TextFieldStyle ) ;
147147 GUI . enabled = true ;
148148 }
149149 GUILayout . EndHorizontal ( ) ;
@@ -196,8 +196,6 @@ private void OnGUI2FA()
196196 Redraw ( ) ;
197197 }
198198
199- GUILayout . Space ( Styles . BaseSpacing ) ;
200-
201199 if ( GUILayout . Button ( twofaButton ) || ( GUI . enabled && enterPressed ) )
202200 {
203201 GUI . FocusControl ( null ) ;
@@ -209,7 +207,6 @@ private void OnGUI2FA()
209207 GUI . enabled = true ;
210208 GUILayout . Space ( Styles . BaseSpacing ) ;
211209 GUILayout . EndVertical ( ) ;
212- GUILayout . Space ( Styles . BaseSpacing ) ;
213210 }
214211
215212 private void DoRequire2fa ( string msg )
0 commit comments