solved imports for alert, toast and confirm
This commit is contained in:
@@ -10,6 +10,7 @@ import '../../../components/cardbuilder/card.css';
|
||||
import '../../../elements/emby-checkbox/emby-checkbox';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import ServerConnections from '../../../components/ServerConnections';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
@@ -29,10 +30,8 @@ import ServerConnections from '../../../components/ServerConnections';
|
||||
|
||||
const UnauthorizedOrForbidden = [401, 403];
|
||||
if (UnauthorizedOrForbidden.includes(response.status)) {
|
||||
import('../../../components/toast/toast').then((toast) => {
|
||||
const messageKey = response.status === 401 ? 'MessageInvalidUser' : 'MessageUnauthorizedUser';
|
||||
toast(globalize.translate(messageKey));
|
||||
});
|
||||
const messageKey = response.status === 401 ? 'MessageInvalidUser' : 'MessageUnauthorizedUser';
|
||||
toast(globalize.translate(messageKey));
|
||||
} else {
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('MessageUnableToConnectToServer'),
|
||||
|
||||
@@ -16,6 +16,7 @@ import '../../../components/cardbuilder/card.css';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import ServerConnections from '../../../components/ServerConnections';
|
||||
import alert from '../../../components/alert';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
@@ -102,9 +103,7 @@ import ServerConnections from '../../../components/ServerConnections';
|
||||
}
|
||||
|
||||
function alertTextWithOptions(options) {
|
||||
import('../../../components/alert').then(({default: alert}) => {
|
||||
alert(options);
|
||||
});
|
||||
alert(options);
|
||||
}
|
||||
|
||||
function showServerConnectionFailure() {
|
||||
|
||||
Reference in New Issue
Block a user