refactor track list components

This commit is contained in:
Thomas Amland
2021-03-20 13:11:06 +01:00
parent cddb6fe85e
commit 9ab8c444ef
20 changed files with 236 additions and 222 deletions
+2
View File
@@ -290,6 +290,7 @@ export class API {
async getRadioStations(): Promise<RadioStation[]> {
const response = await this.get('rest/getInternetRadioStations')
return (response?.internetRadioStations?.internetRadioStation || [])
.map((item: any, idx: number) => ({ ...item, track: idx + 1 }))
.map(this.normalizeRadioStation, this)
}
@@ -345,6 +346,7 @@ export class API {
id: `radio-${item.id}`,
title: item.name,
description: item.homePageUrl,
track: item.track,
url: item.streamUrl,
duration: 0,
starred: false,
+12 -2
View File
@@ -1,5 +1,11 @@
<template>
<b-dropdown variant="link" boundary="window" no-caret toggle-class="p-0">
<b-dropdown
variant="link"
boundary="window"
no-caret
toggle-class="p-0"
:disabled="disabled"
>
<template #button-content>
<Icon icon="three-dots-vertical" />
</template>
@@ -9,5 +15,9 @@
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({})
export default Vue.extend({
props: {
disabled: { type: Boolean, default: false }
}
})
</script>