@@ -14,6 +14,10 @@ class PublishView : Subview
14
14
private const string PrivateRepoMessage = "You choose who can see and commit to this repository" ;
15
15
private const string PublicRepoMessage = "Anyone can see this repository. You choose who can commit" ;
16
16
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" ;
17
21
18
22
[ SerializeField ] private string username ;
19
23
[ SerializeField ] private string [ ] owners = { } ;
@@ -23,7 +27,6 @@ class PublishView : Subview
23
27
[ SerializeField ] private bool togglePrivate ;
24
28
25
29
[ NonSerialized ] private IApiClient client ;
26
- [ NonSerialized ] private bool isLoading ;
27
30
[ NonSerialized ] private bool isBusy ;
28
31
[ NonSerialized ] private string error ;
29
32
@@ -66,7 +69,7 @@ private void PopulateView()
66
69
{
67
70
Logger . Trace ( "GetCurrentUser" ) ;
68
71
69
- isLoading = true ;
72
+ isBusy = true ;
70
73
71
74
Client . LoadKeychain ( hasKeys => {
72
75
if ( ! hasKeys )
@@ -85,7 +88,7 @@ private void PopulateView()
85
88
owners = new [ ] { username } . Union ( organizationLogins ) . ToArray ( ) ;
86
89
} ) ;
87
90
} ) . Finally ( task => {
88
- isLoading = false ;
91
+ isBusy = false ;
89
92
} ) ;
90
93
}
91
94
else
@@ -122,13 +125,13 @@ public override void OnGUI()
122
125
123
126
GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
124
127
125
- EditorGUI . BeginDisabledGroup ( isLoading || isBusy ) ;
128
+ EditorGUI . BeginDisabledGroup ( isBusy ) ;
126
129
{
127
130
GUILayout . BeginHorizontal ( ) ;
128
131
{
129
132
GUILayout . BeginVertical ( ) ;
130
133
{
131
- GUILayout . Label ( "Owner" ) ;
134
+ GUILayout . Label ( SelectedOwnerLabel ) ;
132
135
133
136
selectedOwner = EditorGUILayout . Popup ( 0 , owners ) ;
134
137
}
@@ -143,22 +146,22 @@ public override void OnGUI()
143
146
144
147
GUILayout . BeginVertical ( ) ;
145
148
{
146
- GUILayout . Label ( "Repository Name" ) ;
149
+ GUILayout . Label ( RepositoryNameLabel ) ;
147
150
repoName = EditorGUILayout . TextField ( repoName ) ;
148
151
}
149
152
GUILayout . EndVertical ( ) ;
150
153
}
151
154
GUILayout . EndHorizontal ( ) ;
152
155
153
- GUILayout . Label ( "Description" ) ;
156
+ GUILayout . Label ( DescriptionLabel ) ;
154
157
repoDescription = EditorGUILayout . TextField ( repoDescription ) ;
155
158
GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
156
159
157
160
GUILayout . BeginVertical ( ) ;
158
161
{
159
162
GUILayout . BeginHorizontal ( ) ;
160
163
{
161
- togglePrivate = GUILayout . Toggle ( togglePrivate , "Create as a private repository" ) ;
164
+ togglePrivate = GUILayout . Toggle ( togglePrivate , CreatePrivateRepositoryLabel ) ;
162
165
}
163
166
GUILayout . EndHorizontal ( ) ;
164
167
0 commit comments