prevent type coercion

- remove unused imports
- minor refactors and cleanups
This commit is contained in:
geoffrey45
2022-02-16 15:06:29 +03:00
parent 9972caf7d3
commit 5446b1fe4b
26 changed files with 190 additions and 206 deletions
+4 -3
View File
@@ -36,13 +36,14 @@ export default {
height: 7em;
border-radius: 50%;
margin-bottom: $small;
background: url("../../assets/images/null.webp");
background-size: 7rem 7rem;
background: url("../../assets/images/null.webp");
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
background-position: top;
transition: all 0.5s ease-in-out;
border: solid 1px rgba(5, 5, 5, 0.055);
box-shadow: 0px 0px 80px rgb(0, 0, 0);
box-shadow: 0 0 80px rgb(0, 0, 0);
}
&:hover {
+3 -3
View File
@@ -1,5 +1,5 @@
<template>
<tr class="songlist-item" :class="{ current: current.track_id == song.track_id }">
<tr class="songlist-item" :class="{ current: current.track_id === song.track_id }">
<td class="index">{{ index }}</td>
<td class="flex" @click="emitUpdate(song)">
<div
@@ -8,7 +8,7 @@
>
<div
class="now-playing-track image"
v-if="current.track_id == song.track_id"
v-if="current.track_id === song.track_id"
:class="{ active: is_playing, not_active: !is_playing }"
></div>
</div>
@@ -22,7 +22,7 @@
</div>
</td>
<td class="song-artists">
<div class="ellip" v-if="song.artists[0] != ''">
<div class="ellip" v-if="song.artists[0] !== ''">
<span
class="artist"
v-for="artist in putCommas(song.artists)"
+4 -5
View File
@@ -3,7 +3,7 @@
class="track-item h-1"
@click="playThis(props.track)"
:class="{
currentInQueue: current.track_id == props.track.track_id,
currentInQueue: current.track_id === props.track.track_id,
}"
>
<div
@@ -14,7 +14,7 @@
>
<div
class="now-playing-track image"
v-if="current.track_id == props.track.track_id"
v-if="current.track_id === props.track.track_id"
:class="{ active: is_playing, not_active: !is_playing }"
></div>
</div>
@@ -44,7 +44,7 @@ const putCommas = perks.putCommas;
const is_playing = ref(playAudio.playing);
const playThis = (song) => {
playAudio.playAudio(song.filepath);
playAudio.playAudio(song.track_id);
perks.current.value = song;
};
@@ -58,11 +58,10 @@ const playThis = (song) => {
.track-item {
display: flex;
align-items: center;
padding: 0.5rem;
border-radius: 0.5rem;
position: relative;
height: 4rem;
padding-left: 4rem;
padding: 0.5rem 0.5rem 0.5rem 4rem;
&:hover {
cursor: pointer;