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

solved imports for alert, toast and confirm

This commit is contained in:
vitorsemeano 2020-10-18 15:18:15 +01:00
parent 4b42afcd7a
commit 86a9f4e36f
49 changed files with 417 additions and 550 deletions

View file

@ -3,19 +3,18 @@ import loading from '../../components/loading/loading';
import dom from '../../scripts/dom';
import globalize from '../../scripts/globalize';
import '../../elements/emby-button/emby-button';
import confirm from '../../components/confirm/confirm';
/* eslint-disable indent */
function revoke(page, key) {
import('../../components/confirm/confirm').then(({default: confirm}) => {
confirm(globalize.translate('MessageConfirmRevokeApiKey'), globalize.translate('HeaderConfirmRevokeApiKey')).then(function () {
loading.show();
ApiClient.ajax({
type: 'DELETE',
url: ApiClient.getUrl('Auth/Keys/' + key)
}).then(function () {
loadData(page);
});
confirm(globalize.translate('MessageConfirmRevokeApiKey'), globalize.translate('HeaderConfirmRevokeApiKey')).then(function () {
loading.show();
ApiClient.ajax({
type: 'DELETE',
url: ApiClient.getUrl('Auth/Keys/' + key)
}).then(function () {
loadData(page);
});
});
}