mirror of
https://github.com/koel/koel
synced 2025-02-17 13:58:28 +00:00
Various refactor
This commit is contained in:
parent
b058ea5c42
commit
3bd6f574fd
7 changed files with 4 additions and 36 deletions
|
@ -66,8 +66,6 @@ export default {
|
|||
return {
|
||||
sharedState: sharedStore.state,
|
||||
album: albumStore.stub,
|
||||
isPhone: isMobile.phone,
|
||||
showingControls: false,
|
||||
info: {
|
||||
showing: false,
|
||||
loading: true,
|
||||
|
|
|
@ -65,8 +65,6 @@ export default {
|
|||
return {
|
||||
sharedState: sharedStore.state,
|
||||
artist: artistStore.stub,
|
||||
isPhone: isMobile.phone,
|
||||
showingControls: false,
|
||||
info: {
|
||||
showing: false,
|
||||
loading: true,
|
||||
|
|
|
@ -51,19 +51,10 @@ export default {
|
|||
return {
|
||||
state: favoriteStore.state,
|
||||
sharedState: sharedStore.state,
|
||||
isPhone: isMobile.phone,
|
||||
showingControls: false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* Shuffle the current favorite songs.
|
||||
*/
|
||||
shuffle() {
|
||||
playback.queueAndPlay(this.state.songs, true);
|
||||
},
|
||||
|
||||
/**
|
||||
* Download all favorite songs.
|
||||
*/
|
||||
|
@ -79,12 +70,6 @@ export default {
|
|||
@import "../../../../sass/partials/_mixins.scss";
|
||||
|
||||
#favoritesWrapper {
|
||||
button.play-shuffle, button.del {
|
||||
i {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.none {
|
||||
color: $color2ndText;
|
||||
padding: 16px 24px;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</span>
|
||||
|
||||
<song-list-controls
|
||||
v-show="playlist.songs.length && (!isPhone || showingControls)"
|
||||
v-show="!isPhone || showingControls"
|
||||
@shuffleAll="shuffleAll"
|
||||
@shuffleSelected="shuffleSelected"
|
||||
@deletePlaylist="confirmDelete"
|
||||
|
@ -55,9 +55,6 @@ export default {
|
|||
return {
|
||||
playlist: playlistStore.stub,
|
||||
sharedState: sharedStore.state,
|
||||
songListControlConfig: {
|
||||
deletePlaylist: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
@ -47,8 +47,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
state: queueStore.state,
|
||||
showingAddToMenu: false,
|
||||
playlistName: '',
|
||||
songListControlConfig: {
|
||||
clearQueue: true,
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<div class="buttons song-list-controls">
|
||||
<button class="btn btn-orange btn-shuffle-all"
|
||||
@click.prevent="shuffle"
|
||||
v-if="selectedSongs.length < 2">
|
||||
v-if="fullConfig.shuffle && selectedSongs.length < 2">
|
||||
<i class="fa fa-random"></i> All
|
||||
</button>
|
||||
|
||||
<button class="btn btn-orange btn-shuffle-selected"
|
||||
@click.prevent="shuffleSelected"
|
||||
v-if="selectedSongs.length > 1">
|
||||
v-if="fullConfig.shuffle && selectedSongs.length > 1">
|
||||
<i class="fa fa-random"></i> Selected
|
||||
</button>
|
||||
|
||||
|
@ -78,15 +78,10 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
this.mergeConfig();
|
||||
this.$watch('config', this.mergeConfig, { deep: true });
|
||||
assign(this.fullConfig, this.config);
|
||||
},
|
||||
|
||||
methods: {
|
||||
mergeConfig() {
|
||||
this.fullConfig = assign(this.fullConfig, this.config);
|
||||
},
|
||||
|
||||
shuffle() {
|
||||
this.$emit('shuffleAll');
|
||||
},
|
||||
|
|
|
@ -341,11 +341,8 @@ export default {
|
|||
this.gatherSelected();
|
||||
}
|
||||
|
||||
console.log('selected songs before drop:', this.selectedSongs);
|
||||
|
||||
this.$nextTick(() => {
|
||||
const songIds = map(this.selectedSongs, 'id');
|
||||
console.log('dragging', songIds);
|
||||
e.dataTransfer.setData('application/x-koel.text+plain', songIds);
|
||||
e.dataTransfer.effectAllowed = 'move';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue