Skip to content

Commit

Permalink
Modify icon color and dropshadow when button is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
jengu288 committed Jan 26, 2024
1 parent 918f947 commit a1f48c2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
9 changes: 7 additions & 2 deletions client/src/components/endRound/EndRound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
<response-list :selectable="false" :height="45" :player-id="responsesId" />
<player-chooser v-model="selectedId" class="w-50 w-lg-25 fs-4 mb-3" />
<button
class="btn btn-orange w-75 w-lg-50 w-xl-25 fs-4 mb-3 position-relative"
:class="{ 'btn-blue': !pressedVote }"
class="btn btn-blue w-75 w-lg-50 w-xl-25 fs-4 mb-3 position-relative"
:class="{
'text-white shadow': !pressedVote,
'text-white-50 shadow-none': pressedVote
}"
@click="sendVote">
{{ hasNextRound ? $t('startNextRound') : $t('viewResults') }}
<notification-count
Expand Down Expand Up @@ -63,6 +66,8 @@ export default defineComponent({
},
methods: {
sendVote() {
this.pressedVote = !this.pressedVote
new AudioWrap(ClickMp3).play()
socket.emit('pollVote', 'startNextRound')
},
Expand Down
8 changes: 5 additions & 3 deletions client/src/components/promptResponse/VoteSkip.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<a
v-tooltip.right="$t('tooltip.voteSkip')"
class="btn btn-sm btn-orange text-white ratio-1x1 position-relative d-inline-flex justify-content-center align-items-center active"
:class="{ 'btn-blue': !pressedVote }"
class="btn btn-sm btn-blue ratio-1x1 position-relative d-inline-flex justify-content-center align-items-center"
:class="{
'text-white shadow': !pressedVote,
'text-white-50 shadow-none': pressedVote
}"
@click="sendVote">
<i class="bi-hand-thumbs-down fs-3 p-0 lh-sm" />

<notification-count
v-if="skipVoteCount"
:width="22"
Expand Down
9 changes: 7 additions & 2 deletions client/src/components/responseMatching/DisputeIcon.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<template>
<button
v-tooltip="{ title: $t('tooltip.dispute', { response }), placement }"
class="btn btn-sm btn-orange text-white ratio-1x1 position-relative d-inline-flex justify-content-center align-items-center"
:class="{ 'btn-blue': !pressedVote }"
class="btn btn-sm btn-blue ratio-1x1 position-relative d-inline-flex justify-content-center align-items-center"
:class="{
'text-white shadow': !pressedVote,
'text-white-50 shadow-none': pressedVote
}"
:disabled="disabled"
@click="sendVote">
<i class="bi-hand-thumbs-down fs-5 lh-sm" />
Expand Down Expand Up @@ -54,6 +57,8 @@ export default defineComponent({
},
methods: {
sendVote() {
this.pressedVote = !this.pressedVote
new AudioWrap(ClickMp3).play()
socket.emit('pollVote', 'sikeDispute')
}
Expand Down

0 comments on commit a1f48c2

Please sign in to comment.