Improve hover highlight UI effects for cards in dark mode
In light mode a change in elevation changes the drop shadow, but this is all but invisible in dark mode, so I added a highlight to the cards when hovering to show that the card can be expanded with a click
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
<v-card
|
||||
:hover="hasClickListener"
|
||||
@click="click"
|
||||
@mouseover="hasClickListener ? hovering = true : undefined"
|
||||
@mouseleave="hasClickListener ? hovering = false : undefined"
|
||||
>
|
||||
<div class="layout align-center">
|
||||
<roll-popup
|
||||
@@ -31,6 +33,7 @@
|
||||
{{ model.name }}
|
||||
</v-card-title>
|
||||
</div>
|
||||
<card-highlight :active="hasClickListener && hovering" />
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
@@ -39,10 +42,12 @@
|
||||
import RollPopup from '/imports/ui/components/RollPopup.vue';
|
||||
import doCheck from '/imports/api/engine/actions/doCheck.js';
|
||||
import {snackbar} from '/imports/ui/components/snackbars/SnackbarQueue.js';
|
||||
import CardHighlight from '/imports/ui/components/CardHighlight.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
RollPopup,
|
||||
CardHighlight,
|
||||
},
|
||||
inject: {
|
||||
context: {
|
||||
@@ -57,6 +62,7 @@
|
||||
},
|
||||
data(){return {
|
||||
checkLoading: false,
|
||||
hovering: false,
|
||||
}},
|
||||
computed: {
|
||||
hasClickListener(){
|
||||
|
||||
@@ -43,11 +43,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</v-layout>
|
||||
<card-highlight :active="hover" />
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import CardHighlight from '/imports/ui/components/CardHighlight.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CardHighlight,
|
||||
},
|
||||
inject: {
|
||||
context: { default: {} }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user