added a play button and work on behavior
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Artem Anufrij 2023-09-19 12:03:00 +02:00
parent 239b538c4b
commit 159935d949
3 changed files with 14 additions and 4 deletions

View File

@ -95,6 +95,14 @@ td.fillCell>* {
color: var(--yellow); color: var(--yellow);
} }
.keepPlaying {
z-index: 1;
position: absolute;
cursor: pointer;
right: 0;
}
/* /*
DIALOGS DIALOGS
*/ */

View File

@ -147,6 +147,7 @@ export default {
if (this.selectedTrack.parent.progress) { if (this.selectedTrack.parent.progress) {
this.skipToSecond(this.selectedTrack.parent.progress.progress); this.skipToSecond(this.selectedTrack.parent.progress.progress);
this.selectedTrack.parent.progress = undefined;
} else { } else {
// Try to fix SAFARI // Try to fix SAFARI
this.audio.play(); this.audio.play();

View File

@ -6,7 +6,8 @@
<div class="grow z1 center flex-column"> <div class="grow z1 center flex-column">
<img class="glow ma24" :src="cover" @dblclick="dblclick" /> <img class="glow ma24" :src="cover" @dblclick="dblclick" />
</div> </div>
<awesome-icon icon="star" size="2x" class="favourite ma4" :class="{ active: isFavourite }" @click="toggleFavourite" /> <awesome-icon icon="star" size="2x" class="favourite ma4" :class="{ active: isFavourite }" @click="toggleFavourite" title="Favourite" />
<awesome-icon icon="play" size="2x" class="keepPlaying ma4 primary-text" @click="playProgress" v-if="selectedAlbum.progress" title="Keep playing" />
<div id="stats" class="flex-row z1"> <div id="stats" class="flex-row z1">
<DropDown v-if="$store.getters['user/isAdministrator']"> <DropDown v-if="$store.getters['user/isAdministrator']">
<button class="flat center" :title="visibility_text"> <button class="flat center" :title="visibility_text">
@ -68,8 +69,6 @@
</DropDown> </DropDown>
</div> </div>
</div> </div>
<p v-if="selectedAlbum.progress" @click="playProgress">Progress</p>
<ul id="trackList" class="tracks"> <ul id="trackList" class="tracks">
<li v-for="track in selectedAlbum.tracks" :key="track._id"> <li v-for="track in selectedAlbum.tracks" :key="track._id">
<TrackItem :track="track" :showCover="false" /> <TrackItem :track="track" :showCover="false" />
@ -217,7 +216,9 @@ export default {
this.$store.dispatch("albums/shareDisable", this.selectedAlbum); this.$store.dispatch("albums/shareDisable", this.selectedAlbum);
}, },
loadUserProgress() { loadUserProgress() {
this.$store.dispatch("user/getProgress", this.selectedAlbum); console.log(this.selectedTrack);
if (this.selectedTrack.parent._id != this.selectedAlbum._id)
this.$store.dispatch("user/getProgress", this.selectedAlbum);
} }
}, },
computed: { computed: {