From 41f2c1d564cc0fabae12d6743819f51a49963a1d Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Sun, 6 May 2018 18:04:25 +0200 Subject: [PATCH] show button toggle value as primary text color when single project is selected --- .../components/gke_project_id_dropdown.vue | 5 ++++- app/assets/stylesheets/framework/dropdowns.scss | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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" />