save-and-restore-progress-for-audio fix #10 #16

Merged
artem merged 8 commits from save-and-restore-progress-for-audio into main 2023-09-19 16:34:57 +02:00
3 changed files with 14 additions and 4 deletions
Showing only changes of commit 159935d949 - Show all commits

View File

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

View File

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

View File

@ -6,7 +6,8 @@
<div class="grow z1 center flex-column">
<img class="glow ma24" :src="cover" @dblclick="dblclick" />
</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">
<DropDown v-if="$store.getters['user/isAdministrator']">
<button class="flat center" :title="visibility_text">
@ -68,8 +69,6 @@
</DropDown>
</div>
</div>
<p v-if="selectedAlbum.progress" @click="playProgress">Progress</p>
<ul id="trackList" class="tracks">
<li v-for="track in selectedAlbum.tracks" :key="track._id">
<TrackItem :track="track" :showCover="false" />
@ -217,7 +216,9 @@ export default {
this.$store.dispatch("albums/shareDisable", this.selectedAlbum);
},
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: {