1.1.3 - Autocompletion fixes, crossfade fixes, more languages
This commit is contained in:
@ -134,8 +134,9 @@ export default {
|
||||
});
|
||||
this.$emit('clicked')
|
||||
},
|
||||
addLibrary() {
|
||||
this.$axios.put(`/library/album?id=${this.album.id}`);
|
||||
async addLibrary() {
|
||||
await this.$axios.put(`/library/album?id=${this.album.id}`);
|
||||
this.$root.globalSnackbar = this.$t('Added to library!');
|
||||
},
|
||||
//Add to downloads
|
||||
async download() {
|
||||
|
@ -67,8 +67,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addLibrary() {
|
||||
this.$axios.put(`/library/artist&id=${this.artist.id}`);
|
||||
async addLibrary() {
|
||||
await this.$axios.put(`/library/artist&id=${this.artist.id}`);
|
||||
this.$root.globalSnackbar = this.$t('Added to library!');
|
||||
},
|
||||
click() {
|
||||
//Navigate to details
|
||||
|
@ -96,12 +96,9 @@ export default {
|
||||
if (this.currentLyricIndex == this.currentLyric()) return;
|
||||
this.currentLyricIndex = this.currentLyric();
|
||||
|
||||
//Roughly middle
|
||||
let offset = window.innerHeight / 2 - 500;
|
||||
|
||||
if (!this.$refs["l"+this.currentLyricIndex]) return;
|
||||
this.$refs.content.scrollTo({
|
||||
top: this.$refs["l"+this.currentLyricIndex][0].offsetTop + offset,
|
||||
top: this.$refs["l"+this.currentLyricIndex][0].offsetTop - (window.innerHeight / 2.42),
|
||||
behavior: 'smooth'
|
||||
});
|
||||
},
|
||||
|
@ -42,6 +42,7 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -58,7 +59,7 @@ export default {
|
||||
type: 'Private',
|
||||
types: ['Private', 'Public'],
|
||||
createLoading: false,
|
||||
|
||||
|
||||
loading: false,
|
||||
playlists: []
|
||||
}
|
||||
@ -84,11 +85,13 @@ export default {
|
||||
this.createLoading = false;
|
||||
this.$emit('created');
|
||||
this.$emit('close');
|
||||
this.$root.globalSnackbar = this.$t('Added to playlist!');
|
||||
},
|
||||
//Add track to playlist
|
||||
async addTrack(playlist) {
|
||||
await this.$axios.post(`/playlist/${playlist.id}/tracks`, {track: this.track.id});
|
||||
this.$emit('close');
|
||||
this.$root.globalSnackbar = this.$t('Added to playlist!');
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
@ -140,11 +140,13 @@ export default {
|
||||
//Delete own playlist
|
||||
if (this.playlist.user.id == this.$root.profile.id) {
|
||||
await this.$axios.delete(`/playlist/${this.playlist.id}`);
|
||||
this.$root.globalSnackbar = this.$t('Playlist deleted!');
|
||||
} else {
|
||||
//Remove from library
|
||||
await this.$axios.get('/library/playlist&id=' + this.playlist.id);
|
||||
this.$root.globalSnackbar = this.$t('Removed from library!');
|
||||
}
|
||||
|
||||
|
||||
this.$emit('remove');
|
||||
},
|
||||
async download() {
|
||||
|
@ -187,6 +187,7 @@ export default {
|
||||
this.isLibrary = true;
|
||||
this.$root.libraryTracks.push(this.track.id);
|
||||
this.$axios.put(`/library/track?id=${this.track.id}`);
|
||||
this.$root.globalSnackbar = this.$t('Added to library!');
|
||||
},
|
||||
goAlbum() {
|
||||
this.$emit('redirect')
|
||||
@ -206,6 +207,7 @@ export default {
|
||||
this.isLibrary = false;
|
||||
this.$root.libraryTracks.splice(this.$root.libraryTracks.indexOf(this.track.id), 1);
|
||||
await this.$axios.delete(`/library/track?id=${this.track.id}`);
|
||||
this.$root.globalSnackbar = this.$t('Removed from library!');
|
||||
this.$emit('remove');
|
||||
},
|
||||
//Remove from playlist
|
||||
@ -213,6 +215,7 @@ export default {
|
||||
await this.$axios.delete(`/playlist/${this.playlistId}/tracks`, {
|
||||
data: {track: this.track.id}
|
||||
});
|
||||
this.$root.globalSnackbar = this.$t('Removed from playlist!');
|
||||
this.$emit('remove');
|
||||
},
|
||||
//Download track
|
||||
|
Reference in New Issue
Block a user