Merge branch 'table-refactor'
This commit is contained in:
@@ -85,9 +85,8 @@ const TracklistTab = new Vue({
|
||||
{ title: 'Artist' },
|
||||
{ title: '<i class="material-icons">timer</i>', width: '40px' }
|
||||
]
|
||||
if (_.isEmpty(data.tracks)) {
|
||||
console.log('show e lodash ok')
|
||||
|
||||
if (_.isEmpty(data.tracks)) {
|
||||
this.body = null
|
||||
} else {
|
||||
this.body = data.tracks
|
||||
@@ -108,6 +107,7 @@ const TracklistTab = new Vue({
|
||||
{ title: 'Album' },
|
||||
{ title: '<i class="material-icons">timer</i>', width: '40px' }
|
||||
]
|
||||
|
||||
if (_.isEmpty(data.tracks)) {
|
||||
this.body = null
|
||||
} else {
|
||||
|
||||
@@ -18,7 +18,7 @@ function init() {
|
||||
preview_track.addEventListener('canplay', function () {
|
||||
preview_track.play()
|
||||
preview_stopped = false
|
||||
$(preview_track).animate({ volume: vol.preview_max_volume/100 }, 500)
|
||||
$(preview_track).animate({ volume: vol.preview_max_volume / 100 }, 500)
|
||||
})
|
||||
|
||||
// auto fadeout when at the end of the song
|
||||
@@ -67,16 +67,17 @@ function playPausePreview(e) {
|
||||
|
||||
const { currentTarget: obj } = event
|
||||
|
||||
var icon = obj.tagName == 'I' ? $(obj) : $(obj).children('i')
|
||||
var $icon = obj.tagName == 'I' ? $(obj) : $(obj).children('i')
|
||||
|
||||
if ($(obj).attr('playing')) {
|
||||
if (preview_track.paused) {
|
||||
preview_track.play()
|
||||
preview_stopped = false
|
||||
icon.text('pause')
|
||||
$(preview_track).animate({ volume: vol.preview_max_volume/100 }, 500)
|
||||
$icon.text('pause')
|
||||
$(preview_track).animate({ volume: vol.preview_max_volume / 100 }, 500)
|
||||
} else {
|
||||
preview_stopped = true
|
||||
icon.text('play_arrow')
|
||||
$icon.text('play_arrow')
|
||||
$(preview_track).animate({ volume: 0 }, 250, 'swing', () => {
|
||||
preview_track.pause()
|
||||
})
|
||||
@@ -87,8 +88,8 @@ function playPausePreview(e) {
|
||||
$('.preview_controls').text('play_arrow')
|
||||
$('.preview_playlist_controls').text('play_arrow')
|
||||
$('.preview_controls').css({ opacity: 0 })
|
||||
icon.text('pause')
|
||||
icon.css({ opacity: 1 })
|
||||
$icon.text('pause')
|
||||
$icon.css({ opacity: 1 })
|
||||
preview_stopped = false
|
||||
$(preview_track).animate({ volume: 0 }, 250, 'swing', () => {
|
||||
preview_track.pause()
|
||||
|
||||
Reference in New Issue
Block a user