Skip to content

Commit

Permalink
feat(playlist): Fixed lint issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianCArnold committed Nov 28, 2022
1 parent 226a3d0 commit 0d6e643
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions frontend/components/Buttons/QueueButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
<v-card-text v-if="creatingPlaylist" class="py-1">
<v-form @submit.prevent="handleSubmit">
<v-text-field
single-line
v-model="playlistName"
single-line
:label="$t('name')"
append-outer-icon="mdi-content-save"
hide-details="auto"
prepend-icon="mdi-cancel"
class="py-1"
@click:append-outer="saveQueueAsPlaylist"
@click:prepend="cancelSaveQueue"
class="py-1"
/>
</v-form>
</v-card-text>
Expand Down Expand Up @@ -228,14 +228,16 @@ export default Vue.extend({
askForPlaylistName() {
this.creatingPlaylist = true;
},
saveQueueAsPlaylist() {
this.$nuxt.$api.playlists
.createPlaylist({
async saveQueueAsPlaylist() {
try {
await this.$nuxt.$api.playlists.createPlaylist({
name: this.playlistName as string,
ids: this.playbackManager.queue,
userId: this.auth.currentUserId
})
.then(() => (this.creatingPlaylist = false));
});
} finally {
this.creatingPlaylist = false;
}
},
cancelSaveQueue() {
this.creatingPlaylist = false;
Expand Down

0 comments on commit 0d6e643

Please sign in to comment.