Skip to content

Commit e68efea

Browse files
committed
Fixed lint issues.
1 parent 226a3d0 commit e68efea

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

frontend/components/Buttons/QueueButton.vue

+9-7
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@
7878
<v-card-text v-if="creatingPlaylist" class="py-1">
7979
<v-form @submit.prevent="handleSubmit">
8080
<v-text-field
81-
single-line
8281
v-model="playlistName"
82+
single-line
8383
:label="$t('name')"
8484
append-outer-icon="mdi-content-save"
8585
hide-details="auto"
8686
prepend-icon="mdi-cancel"
87+
class="py-1"
8788
@click:append-outer="saveQueueAsPlaylist"
8889
@click:prepend="cancelSaveQueue"
89-
class="py-1"
9090
/>
9191
</v-form>
9292
</v-card-text>
@@ -228,14 +228,16 @@ export default Vue.extend({
228228
askForPlaylistName() {
229229
this.creatingPlaylist = true;
230230
},
231-
saveQueueAsPlaylist() {
232-
this.$nuxt.$api.playlists
233-
.createPlaylist({
231+
async saveQueueAsPlaylist() {
232+
try {
233+
await this.$nuxt.$api.playlists.createPlaylist({
234234
name: this.playlistName as string,
235235
ids: this.playbackManager.queue,
236236
userId: this.auth.currentUserId
237-
})
238-
.then(() => (this.creatingPlaylist = false));
237+
});
238+
} finally {
239+
this.creatingPlaylist = false;
240+
}
239241
},
240242
cancelSaveQueue() {
241243
this.creatingPlaylist = false;

0 commit comments

Comments
 (0)