1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix error dialog history

This commit is contained in:
Dmitry Lyzo 2021-10-03 21:51:06 +03:00
parent 2af0b91dad
commit 3567b9783d
4 changed files with 41 additions and 14 deletions

View file

@ -1,4 +1,4 @@
import { appRouter } from './appRouter';
import browser from '../scripts/browser';
import dialog from './dialog/dialog';
import globalize from '../scripts/globalize';
@ -10,7 +10,7 @@ import globalize from '../scripts/globalize';
return originalString.replace(reg, strWith);
}
export default function (text, title) {
export default async function (text, title) {
let options;
if (typeof text === 'string') {
options = {
@ -22,7 +22,9 @@ import globalize from '../scripts/globalize';
}
if (browser.tv && window.alert) {
await appRouter.ready();
alert(replaceAll(options.text || '', '<br/>', '\n'));
return Promise.resolve();
} else {
const items = [];
@ -35,8 +37,6 @@ import globalize from '../scripts/globalize';
options.buttons = items;
return dialog.show(options);
}
return Promise.resolve();
}
/* eslint-enable indent */