mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Ensure loading indicator is hidden
This commit is contained in:
parent
05e03970f3
commit
2ab12bc932
1 changed files with 5 additions and 3 deletions
|
@ -50,13 +50,13 @@ function onSubmit(this: HTMLElement, e: Event) {
|
|||
if (playlistId) {
|
||||
userSettings.set('playlisteditor-lastplaylistid', playlistId);
|
||||
addToPlaylist(panel, playlistId)
|
||||
?.catch(err => {
|
||||
.catch(err => {
|
||||
console.error('[PlaylistEditor] Failed to add to playlist %s', playlistId, err);
|
||||
})
|
||||
.finally(loading.hide);
|
||||
} else {
|
||||
createPlaylist(panel)
|
||||
?.catch(err => {
|
||||
.catch(err => {
|
||||
console.error('[PlaylistEditor] Failed to create playlist', err);
|
||||
})
|
||||
.finally(loading.hide);
|
||||
|
@ -105,7 +105,7 @@ function addToPlaylist(dlg: DialogElement, id: string) {
|
|||
});
|
||||
dlg.submitted = true;
|
||||
dialogHelper.close(dlg);
|
||||
return;
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return getPlaylistsApi(api)
|
||||
|
@ -131,6 +131,8 @@ function populatePlaylists(editorOptions: PlaylistEditorOptions, panel: DialogEl
|
|||
return Promise.reject(new Error('Playlist <select> element is missing'));
|
||||
}
|
||||
|
||||
loading.show();
|
||||
|
||||
panel.querySelector('.newPlaylistInfo')?.classList.add('hide');
|
||||
|
||||
const apiClient = ServerConnections.getApiClient(currentServerId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue