chore: switched to v1.5.2; chore: removed default export for sendAddToQueue utility

This commit is contained in:
Roberto Tonino 2020-11-28 20:18:35 +01:00
parent 919498f31c
commit cb756747bd
5 changed files with 18 additions and 14 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "deemix-webui", "name": "deemix-webui",
"version": "1.5.1", "version": "1.5.2",
"scripts": { "scripts": {
"clean": "rimraf public/js/bundle.js public/js/bundle.temp.js public/js/bundle.js.map", "clean": "rimraf public/js/bundle.js public/js/bundle.temp.js public/js/bundle.js.map",
"clean-temp": "rimraf public/js/bundle.temp.js", "clean-temp": "rimraf public/js/bundle.temp.js",

File diff suppressed because one or more lines are too long

View File

@ -60,7 +60,7 @@
} }
</style> </style>
<script> <script>
import Downloads from '@/utils/downloads' import { sendAddToQueue } from '@/utils/downloads'
export default { export default {
data: () => ({ data: () => ({
@ -80,7 +80,7 @@ export default {
// If true, the click did not happen on a button but outside // If true, the click did not happen on a button but outside
if (!target.matches('.quality-button')) return if (!target.matches('.quality-button')) return
Downloads.sendAddToQueue(this.url, target.dataset.qualityValue) sendAddToQueue(this.url, target.dataset.qualityValue)
}, },
openModal(link) { openModal(link) {
this.url = link this.url = link

View File

@ -153,7 +153,7 @@
<script> <script>
import { isEmpty } from 'lodash-es' import { isEmpty } from 'lodash-es'
import { socket } from '@/utils/socket' import { socket } from '@/utils/socket'
import Downloads from '@/utils/downloads' import { sendAddToQueue } from '@/utils/downloads'
import Utils from '@/utils/utils' import Utils from '@/utils/utils'
import { playPausePreview } from '@components/globals/TheTrackPreview.vue' import { playPausePreview } from '@components/globals/TheTrackPreview.vue'
@ -189,7 +189,7 @@ export default {
this.body = [] this.body = []
}, },
addToQueue(e) { addToQueue(e) {
Downloads.sendAddToQueue(e.currentTarget.dataset.link) sendAddToQueue(e.currentTarget.dataset.link)
}, },
toggleAll(e) { toggleAll(e) {
this.body.forEach(item => { this.body.forEach(item => {

View File

@ -1,5 +1,9 @@
import { socket } from '@/utils/socket' import { socket } from '@/utils/socket'
/**
* @param {string} url
* @param {number} bitrate
*/
export function sendAddToQueue(url, bitrate = null) { export function sendAddToQueue(url, bitrate = null) {
if (!url) throw new Error('No URL given to sendAddToQueue function!') if (!url) throw new Error('No URL given to sendAddToQueue function!')
@ -16,6 +20,6 @@ export function aggregateDownloadLinks(releases) {
return links.join(';') return links.join(';')
} }
export default { // export default {
sendAddToQueue // sendAddToQueue
} // }