add download button. fixes #23

This commit is contained in:
Thomas Amland
2021-03-14 13:47:42 +01:00
parent 4e71857e2a
commit 325f642d72
2 changed files with 17 additions and 0 deletions
+6
View File
@@ -12,6 +12,9 @@
<b-dropdown-item-button @click="toggleStarred()">
{{ starred ? 'Unstar' : 'Star' }}
</b-dropdown-item-button>
<b-dropdown-item-button @click="download()">
Download
</b-dropdown-item-button>
<slot :item="track" />
</b-dropdown>
</template>
@@ -35,6 +38,9 @@
}
return this.$api.star('track', this.track.id)
},
download() {
window.location.href = this.$api.getDownloadUrl(this.track.id)
},
setNextInQueue() {
return this.$store.dispatch('player/setNextInQueue', [this.track])
},