Skip to content

Commit

Permalink
Modify btn position and fix hover style (project-chip#1177)
Browse files Browse the repository at this point in the history
* Modify btn position and fix hover style
  • Loading branch information
tbrkollar authored Oct 26, 2023
1 parent 4084573 commit a358035
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 8 deletions.
32 changes: 24 additions & 8 deletions src/components/ZclDomainClusterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ limitations under the License.

<template>
<div class="row justify-center">
<q-btn
v-if="showEnableAllClustersButton"
@click="showEnableAllClustersDialog = true"
label="Enable All Clusters"
color="primary"
class="full-height"
flat
rounded
/>

<q-table
:rows="clusters"
:columns="columns"
Expand Down Expand Up @@ -180,14 +190,7 @@ limitations under the License.
</q-tr>
</template>
</q-table>
<q-btn
v-if="this.$store.state.zap.showDevTools"
@click="showEnableAllClustersDialog = true"
label="Enable All Clusters"
color="primary"
class="col-3"
rounded
/>

<q-dialog
v-model="showEnableAllClustersDialog"
class="background-color:transparent"
Expand Down Expand Up @@ -258,6 +261,19 @@ export default {
}
return names
},
showEnableAllClustersButton: function () {
let hasNotEnabled = false
if (this.clusters && this.clusters.length > 0) {
this.clusters.forEach((singleCluster) => {
if (!this.isClusterEnabled(singleCluster.id)) {
hasNotEnabled = true
return
}
})
}
return hasNotEnabled && this.$store.state.zap.showDevTools
},
},
methods: {
enableAllClusters() {
Expand Down
32 changes: 32 additions & 0 deletions src/css/quasar.variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ $warning: #f2c037;
.q-focus-helper {
opacity: 0 !important;
}
.q-btn {
&.q-hoverable:hover {
.q-focus-helper {
background: currentColor;
opacity: 0.15 !important;
}
}
}
.q-expansion-item__container {
.q-item {
transition: all 0.4s ease-out;
Expand Down Expand Up @@ -175,6 +183,14 @@ $warning: #f2c037;
.q-focus-helper {
opacity: 0 !important;
}
.q-btn {
&.q-hoverable:hover {
.q-focus-helper {
background: currentColor;
opacity: 0.15 !important;
}
}
}
.q-expansion-item__container {
.q-item {
transition: all 0.4s ease-out;
Expand Down Expand Up @@ -316,6 +332,14 @@ $warning: #f2c037;
.q-focus-helper {
opacity: 0 !important;
}
.q-btn {
&.q-hoverable:hover {
.q-focus-helper {
background: currentColor;
opacity: 0.15 !important;
}
}
}
.q-expansion-item__container {
.q-item {
transition: all 0.4s ease-out;
Expand Down Expand Up @@ -397,6 +421,14 @@ $warning: #f2c037;
.q-focus-helper {
opacity: 0 !important;
}
.q-btn {
&.q-hoverable:hover {
.q-focus-helper {
background: currentColor;
opacity: 0.15 !important;
}
}
}
.q-expansion-item__container {
.q-item {
transition: all 0.4s ease-out;
Expand Down

0 comments on commit a358035

Please sign in to comment.