@@ -7,15 +7,14 @@ namespace GitHub.Unity
7
7
[ Serializable ]
8
8
class AuthenticationView : Subview
9
9
{
10
- const string serverLabel = "Server" ;
11
10
const string usernameLabel = "Username" ;
12
11
const string passwordLabel = "Password" ;
13
- const string twofaLabel = "Authentication code " ;
12
+ const string twofaLabel = "2FA Code " ;
14
13
const string loginButton = "Sign in" ;
15
14
const string backButton = "Back" ;
16
15
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." ;
19
18
const string twofaButton = "Verify" ;
20
19
21
20
[ SerializeField ] private Vector2 scroll ;
@@ -76,6 +75,8 @@ public override void OnGUI()
76
75
{
77
76
HandleEnterPressed ( ) ;
78
77
78
+ EditorGUIUtility . labelWidth = 90f ;
79
+
79
80
scroll = GUILayout . BeginScrollView ( scroll ) ;
80
81
{
81
82
Rect authHeader = EditorGUILayout . BeginHorizontal ( Styles . AuthHeaderBoxStyle ) ;
@@ -114,7 +115,6 @@ public override void OnGUI()
114
115
}
115
116
116
117
GUILayout . EndVertical ( ) ;
117
- GUILayout . Space ( Styles . BaseSpacing ) ;
118
118
}
119
119
GUILayout . EndScrollView ( ) ;
120
120
}
@@ -135,15 +135,15 @@ private void OnGUILogin()
135
135
GUILayout . BeginHorizontal ( ) ;
136
136
{
137
137
if ( busy ) GUI . enabled = false ;
138
- username = EditorGUILayout . TextField ( "Username" , username , Styles . TextFieldStyle ) ;
138
+ username = EditorGUILayout . TextField ( usernameLabel , username , Styles . TextFieldStyle ) ;
139
139
GUI . enabled = true ;
140
140
}
141
141
GUILayout . EndHorizontal ( ) ;
142
142
GUILayout . Space ( Styles . BaseSpacing ) ;
143
143
GUILayout . BeginHorizontal ( ) ;
144
144
{
145
145
if ( busy ) GUI . enabled = false ;
146
- password = EditorGUILayout . PasswordField ( "Password" , password , Styles . TextFieldStyle ) ;
146
+ password = EditorGUILayout . PasswordField ( passwordLabel , password , Styles . TextFieldStyle ) ;
147
147
GUI . enabled = true ;
148
148
}
149
149
GUILayout . EndHorizontal ( ) ;
@@ -196,8 +196,6 @@ private void OnGUI2FA()
196
196
Redraw ( ) ;
197
197
}
198
198
199
- GUILayout . Space ( Styles . BaseSpacing ) ;
200
-
201
199
if ( GUILayout . Button ( twofaButton ) || ( GUI . enabled && enterPressed ) )
202
200
{
203
201
GUI . FocusControl ( null ) ;
@@ -209,7 +207,6 @@ private void OnGUI2FA()
209
207
GUI . enabled = true ;
210
208
GUILayout . Space ( Styles . BaseSpacing ) ;
211
209
GUILayout . EndVertical ( ) ;
212
- GUILayout . Space ( Styles . BaseSpacing ) ;
213
210
}
214
211
215
212
private void DoRequire2fa ( string msg )
0 commit comments