add a diffrent icon, if media is playing #39

Merged
artem merged 1 commits from dev into main 2024-09-24 00:06:52 +02:00
2 changed files with 11 additions and 4 deletions

View File

@ -15,16 +15,17 @@
from year <b>{{ album_year }}</b> </span><br />
<b>{{ album_tracks.length }}</b> Tracks with a duration of
<b>{{ album_duration }}</b>
</span>
<div class="grow"> </div>
<div class="flex-row grow ma-top">
<button class="flat ma-right" title="Favourite" @click="toggleFavourite">
<awesome-icon :icon="['fas', 'star']" size="2x" class="white-text favourite active" v-if="isFavourite" />
<awesome-icon :icon="['far', 'star']" size="2x" class="white-text favourite" v-else />
</button>
<button class="flat ma-right" title="Keep playing" @click="playProgress" v-if="selectedAlbum.progress">
<button class="flat ma-right" title="Keep playing" v-if="selectedAlbum._id == selectedTrackContainer._id && isPlaying">
<awesome-icon icon="compact-disc" size="2x" class="primary-text" />
</button>
<button class="flat ma-right" title="Keep playing" @click="playProgress" v-else-if="selectedAlbum.progress">
<awesome-icon icon="play" size="2x" class="primary-text" />
</button>
<button class="flat ma-right" title="Play" @click="playAlbum" v-else>
@ -245,7 +246,9 @@ export default {
nextAlbum: ["albums/nextAlbum"],
selectedAlbum: ["albums/selectedAlbum"],
selectedTrack: ["tracks/selectedTrack"],
selectedTrackContainer: ["tracks/selectedTrackContainer"],
favourites: ["user/favourites"],
isPlaying: ["player/isPlaying"],
}),
album_title() {
return this.selectedAlbum.title;

View File

@ -17,7 +17,10 @@
<awesome-icon :icon="['fas', 'star']" size="2x" class="white-text favourite active" v-if="isFavourite" />
<awesome-icon :icon="['far', 'star']" size="2x" class="white-text favourite" v-else />
</button>
<button class="flat ma-right" @click="playProgress" title="Keep playing" v-if="selectedArtist.progress">
<button class="flat ma-right" title="Keep playing" v-if="selectedArtist._id == selectedTrackContainer._id && isPlaying">
<awesome-icon icon="compact-disc" size="2x" class="primary-text" />
</button>
<button class="flat ma-right" @click="playProgress" title="Keep playing" v-else-if="selectedArtist.progress">
<awesome-icon icon="play" size="2x" class="primary-text" />
</button>
<button class="flat ma-right" @click="playArtist" title="Play" v-else>
@ -176,6 +179,7 @@ export default {
nextArtist: ["artists/nextArtist"],
selectedArtist: ["artists/selectedArtist"],
selectedTrack: ["tracks/selectedTrack"],
selectedTrackContainer: ["tracks/selectedTrackContainer"],
favourites: ["user/favourites"],
isPlaying: ["player/isPlaying"]
}),