toggle favorite action test

This commit is contained in:
Jonas Heinrich 2020-10-20 15:09:30 +02:00
parent 6c980e3646
commit f064943f6e
2 changed files with 7 additions and 3 deletions

View File

@ -10,7 +10,8 @@
</Breadcrumbs>
<Table
:station-data="tableData"
@doPlay="doPlay" />
@doPlay="doPlay"
@doFavor="doFavor" />
</AppContent>
</Content>
</template>
@ -45,6 +46,9 @@ export default {
this.scroll()
},
methods: {
doFavor(station) {
console.log(station)
},
doPlay(station) {
if (audioPlayer !== null) {
audioPlayer.fade(100, 0, 500) // FIXME persistent volume state

View File

@ -14,10 +14,10 @@
v-for="(station, idx) in stationData"
:key="idx"
:class="{ selected: idx === activeItem}">
<td @click="doPlay">
<td @click="doPlay(idx, station)">
<div class="stationIcon"
:style="{ backgroundImage: `url('${ station.favicon }')` }">
<span :class="{ 'icon-starred': idx === activeItem}" />
<span :class="{ 'icon-starred': stationsFavored.includes(idx) }" />
</div>
</td>
<td class="filenameColumn" @click="doPlay(idx, station)">