Commit 8c9f3f28 authored by Agate's avatar Agate 💬

Added radio card and lit of radios on browse home

parent 725f7fe5
......@@ -12,6 +12,12 @@
<artist-card :artist="artist"></artist-card>
</div>
</div>
<div class="column">
<h2 class="ui header">Radios</h2>
<radio-card :type="'favorites'"></radio-card>
<radio-card :type="'random'"></radio-card>
<radio-card :type="'less-listened'"></radio-card>
</div>
</div>
</div>
</template>
......@@ -22,6 +28,7 @@ import backend from '@/audio/backend'
import logger from '@/logging'
import ArtistCard from '@/components/audio/artist/Card'
import config from '@/config'
import RadioCard from '@/components/radios/Card'
const ARTISTS_URL = config.API_URL + 'artists/'
......@@ -29,7 +36,8 @@ export default {
name: 'browse',
components: {
Search,
ArtistCard
ArtistCard,
RadioCard
},
data () {
return {
......
<template>
<div class="ui card">
<div class="content">
<div class="header">Radio : {{ radio.name }}</div>
<div class="description">
{{ radio.description }}
</div>
</div>
<div class="extra content">
<radio-button class="right floated button" :type="type"></radio-button>
</div>
</div>
</template>
<script>
import radios from '@/radios'
import RadioButton from './Button'
export default {
props: {
type: {type: String, required: true}
},
components: {
RadioButton
},
computed: {
radio () {
return radios.types[this.type]
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
</style>
......@@ -7,6 +7,20 @@ const CREATE_RADIO_URL = config.API_URL + 'radios/sessions/'
const GET_TRACK_URL = config.API_URL + 'radios/tracks/'
var radios = {
types: {
random: {
name: 'Random',
description: "Totally random picks, maybe you'll discover new things?"
},
favorites: {
name: 'Favorites',
description: 'Play your favorites tunes in a never-ending happiness loop.'
},
'less-listened': {
name: 'Less listened',
description: "Listen to tracks you usually don't. It's time to restore some balance."
}
},
start (type, objectId) {
this.current.type = type
this.current.objectId = objectId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment