fix: voting misc

This commit is contained in:
Mateusz Pstrucha committed 2021-09-11 14:23:01 +02:00
1 parent 96a448b566
commit eaa3212250
4 files changed
+13 -4

No files matched your search

+1
View File
@@ -17,6 +17,7 @@ class Track {
setVote(value) {
return new Promise((resolve, reject) => {
if (value === this.votes.set) return
ky.get(`/api/vote/${this.id}/${value}`)
.json()
.then((ok) => {
+1
View File
@@ -70,6 +70,7 @@
.info-list > .buttons > i[data-set='true'] {
background-color: var(--light);
color: var(--main);
cursor: default;
}
.info-list > div > i:hover {
+4 -3
View File
@@ -67,12 +67,12 @@ function Info() {
<div className="buttons">
<i
className="icon-thumbs-up"
data-set={track.votes.set == 'up'}
data-set={track.votes.set === 'up'}
onClick={(e) => vote('up')}
></i>
<i
className="icon-thumbs-down"
data-set={track.votes.set == 'down'}
data-set={track.votes.set === 'down'}
onClick={(e) => vote('down')}
></i>
</div>
@@ -97,7 +97,8 @@ function Info() {
<i
className="icon-flag"
onClick={(e) => {
let rly = window.confirm(`Napewno chcesz zgłosić ten utwór?`)
window.confirm(`Napewno chcesz zgłosić ten utwór?`) &&
track.setVote('report')
}}
></i>
</div>
+7 -1
View File
@@ -68,12 +68,12 @@
.track-icons {
float: right;
padding: 0 0.5em;
margin: auto;
}
.track-icons > i {
cursor: pointer;
padding: 0.5em;
}
.track-more {
@@ -112,6 +112,12 @@
width: 100%;
}
.track-more-button > i[data-set='true'] {
background-color: var(--dark);
color: var(--main);
cursor: default;
}
.track-more-button:hover {
background-color: #fff2;
}