mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Fix regression after PR #3046
`dialogHelper.open` has become async and it is not possible to perform any action immediately after calling it.
This commit is contained in:
parent
aa418cbf41
commit
570fa85809
@ -30,8 +30,9 @@ import globalize from '../scripts/globalize';
|
||||
options = text;
|
||||
}
|
||||
|
||||
await appRouter.ready();
|
||||
|
||||
if (useNativeAlert()) {
|
||||
await appRouter.ready();
|
||||
alert(replaceAll(options.text || '', '<br/>', '\n'));
|
||||
return Promise.resolve();
|
||||
} else {
|
||||
|
@ -35,7 +35,7 @@ async function nativeConfirm(options) {
|
||||
}
|
||||
}
|
||||
|
||||
function customConfirm(text, title) {
|
||||
async function customConfirm(text, title) {
|
||||
let options;
|
||||
if (typeof text === 'string') {
|
||||
options = {
|
||||
@ -62,6 +62,8 @@ function customConfirm(text, title) {
|
||||
|
||||
options.buttons = items;
|
||||
|
||||
await appRouter.ready();
|
||||
|
||||
return dialog.show(options).then(result => {
|
||||
if (result === 'ok') {
|
||||
return Promise.resolve();
|
||||
|
@ -184,9 +184,7 @@ import '../../assets/css/scrollstyles.scss';
|
||||
return dlg.getAttribute('data-history') === 'true';
|
||||
}
|
||||
|
||||
export async function open(dlg) {
|
||||
await appRouter.ready();
|
||||
|
||||
export function open(dlg) {
|
||||
if (globalOnOpenCallback) {
|
||||
globalOnOpenCallback(dlg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user