@@ -14,6 +14,10 @@ class PublishView : Subview
1414 private const string PrivateRepoMessage = "You choose who can see and commit to this repository" ;
1515 private const string PublicRepoMessage = "Anyone can see this repository. You choose who can commit" ;
1616 private const string PublishViewCreateButton = "Create" ;
17+ private const string SelectedOwnerLabel = "Owner" ;
18+ private const string RepositoryNameLabel = "Repository Name" ;
19+ private const string DescriptionLabel = "Description" ;
20+ private const string CreatePrivateRepositoryLabel = "Create as a private repository" ;
1721
1822 [ SerializeField ] private string username ;
1923 [ SerializeField ] private string [ ] owners = { } ;
@@ -23,7 +27,6 @@ class PublishView : Subview
2327 [ SerializeField ] private bool togglePrivate ;
2428
2529 [ NonSerialized ] private IApiClient client ;
26- [ NonSerialized ] private bool isLoading ;
2730 [ NonSerialized ] private bool isBusy ;
2831 [ NonSerialized ] private string error ;
2932
@@ -66,7 +69,7 @@ private void PopulateView()
6669 {
6770 Logger . Trace ( "GetCurrentUser" ) ;
6871
69- isLoading = true ;
72+ isBusy = true ;
7073
7174 Client . LoadKeychain ( hasKeys => {
7275 if ( ! hasKeys )
@@ -85,7 +88,7 @@ private void PopulateView()
8588 owners = new [ ] { username } . Union ( organizationLogins ) . ToArray ( ) ;
8689 } ) ;
8790 } ) . Finally ( task => {
88- isLoading = false ;
91+ isBusy = false ;
8992 } ) ;
9093 }
9194 else
@@ -122,13 +125,13 @@ public override void OnGUI()
122125
123126 GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
124127
125- EditorGUI . BeginDisabledGroup ( isLoading || isBusy ) ;
128+ EditorGUI . BeginDisabledGroup ( isBusy ) ;
126129 {
127130 GUILayout . BeginHorizontal ( ) ;
128131 {
129132 GUILayout . BeginVertical ( ) ;
130133 {
131- GUILayout . Label ( "Owner" ) ;
134+ GUILayout . Label ( SelectedOwnerLabel ) ;
132135
133136 selectedOwner = EditorGUILayout . Popup ( 0 , owners ) ;
134137 }
@@ -143,22 +146,22 @@ public override void OnGUI()
143146
144147 GUILayout . BeginVertical ( ) ;
145148 {
146- GUILayout . Label ( "Repository Name" ) ;
149+ GUILayout . Label ( RepositoryNameLabel ) ;
147150 repoName = EditorGUILayout . TextField ( repoName ) ;
148151 }
149152 GUILayout . EndVertical ( ) ;
150153 }
151154 GUILayout . EndHorizontal ( ) ;
152155
153- GUILayout . Label ( "Description" ) ;
156+ GUILayout . Label ( DescriptionLabel ) ;
154157 repoDescription = EditorGUILayout . TextField ( repoDescription ) ;
155158 GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
156159
157160 GUILayout . BeginVertical ( ) ;
158161 {
159162 GUILayout . BeginHorizontal ( ) ;
160163 {
161- togglePrivate = GUILayout . Toggle ( togglePrivate , "Create as a private repository" ) ;
164+ togglePrivate = GUILayout . Toggle ( togglePrivate , CreatePrivateRepositoryLabel ) ;
162165 }
163166 GUILayout . EndHorizontal ( ) ;
164167
0 commit comments