toggle favorite action test
This commit is contained in:
parent
6c980e3646
commit
f064943f6e
@ -10,7 +10,8 @@
|
|||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<Table
|
<Table
|
||||||
:station-data="tableData"
|
:station-data="tableData"
|
||||||
@doPlay="doPlay" />
|
@doPlay="doPlay"
|
||||||
|
@doFavor="doFavor" />
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</Content>
|
</Content>
|
||||||
</template>
|
</template>
|
||||||
@ -45,6 +46,9 @@ export default {
|
|||||||
this.scroll()
|
this.scroll()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
doFavor(station) {
|
||||||
|
console.log(station)
|
||||||
|
},
|
||||||
doPlay(station) {
|
doPlay(station) {
|
||||||
if (audioPlayer !== null) {
|
if (audioPlayer !== null) {
|
||||||
audioPlayer.fade(100, 0, 500) // FIXME persistent volume state
|
audioPlayer.fade(100, 0, 500) // FIXME persistent volume state
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
v-for="(station, idx) in stationData"
|
v-for="(station, idx) in stationData"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
:class="{ selected: idx === activeItem}">
|
:class="{ selected: idx === activeItem}">
|
||||||
<td @click="doPlay">
|
<td @click="doPlay(idx, station)">
|
||||||
<div class="stationIcon"
|
<div class="stationIcon"
|
||||||
:style="{ backgroundImage: `url('${ station.favicon }')` }">
|
:style="{ backgroundImage: `url('${ station.favicon }')` }">
|
||||||
<span :class="{ 'icon-starred': idx === activeItem}" />
|
<span :class="{ 'icon-starred': stationsFavored.includes(idx) }" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="filenameColumn" @click="doPlay(idx, station)">
|
<td class="filenameColumn" @click="doPlay(idx, station)">
|
||||||
|
Loading…
Reference in New Issue
Block a user