File tree 1 file changed +9
-7
lines changed
frontend/components/Buttons
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 78
78
<v-card-text v-if =" creatingPlaylist" class =" py-1" >
79
79
<v-form @submit.prevent =" handleSubmit" >
80
80
<v-text-field
81
- single-line
82
81
v-model =" playlistName"
82
+ single-line
83
83
:label =" $t('name')"
84
84
append-outer-icon =" mdi-content-save"
85
85
hide-details =" auto"
86
86
prepend-icon =" mdi-cancel"
87
+ class =" py-1"
87
88
@click:append-outer =" saveQueueAsPlaylist"
88
89
@click:prepend =" cancelSaveQueue"
89
- class =" py-1"
90
90
/>
91
91
</v-form >
92
92
</v-card-text >
@@ -228,14 +228,16 @@ export default Vue.extend({
228
228
askForPlaylistName() {
229
229
this .creatingPlaylist = true ;
230
230
},
231
- saveQueueAsPlaylist() {
232
- this . $nuxt . $api . playlists
233
- .createPlaylist ({
231
+ async saveQueueAsPlaylist() {
232
+ try {
233
+ await this . $nuxt . $api . playlists .createPlaylist ({
234
234
name: this .playlistName as string ,
235
235
ids: this .playbackManager .queue ,
236
236
userId: this .auth .currentUserId
237
- })
238
- .then (() => (this .creatingPlaylist = false ));
237
+ });
238
+ } finally {
239
+ this .creatingPlaylist = false ;
240
+ }
239
241
},
240
242
cancelSaveQueue() {
241
243
this .creatingPlaylist = false ;
You can’t perform that action at this time.
0 commit comments