diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-05-06 18:04:25 +0200 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-05-06 18:04:25 +0200 |
commit | 41f2c1d564cc0fabae12d6743819f51a49963a1d (patch) | |
tree | 8b79f0ad77824359df8d765af7969bbb4bfc9d55 /app/assets/javascripts/projects | |
parent | b53e544c8e7966d1b97c11e249ace68962b21bcc (diff) | |
download | gitlab-ce-41f2c1d564cc0fabae12d6743819f51a49963a1d.tar.gz |
show button toggle value as primary text color when single project is selected
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r-- | app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue index 7efb038566d..bd63bfbd5ba 100644 --- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue +++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue @@ -56,6 +56,9 @@ export default { computed: { ...mapState(['selectedProject']), ...mapGetters(['hasProject']), + hasOneProject() { + return this.items.length === 1; + }, isDisabled() { return this.items.length < 2; }, @@ -158,7 +161,7 @@ export default { :value="selectedProject.projectId" /> <dropdown-button - :class="{ 'gl-field-error-outline': hasErrors }" + :class="{ 'gl-field-error-outline': hasErrors, 'read-only': hasOneProject }" :is-disabled="isDisabled" :is-loading="isLoading" :toggle-text="toggleText" |