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

Migrate to ES6

This commit is contained in:
Matt Montgomery 2020-07-26 23:57:28 -05:00
parent e5f0d77c30
commit ae5fa9d304
13 changed files with 220 additions and 227 deletions

View file

@ -163,11 +163,7 @@ import 'emby-checkbox';
apiClient.getJSON(url)
.then(json => {
if (!json.Secret || !json.Code) {
Dashboard.alert({
message: json.Error,
title: 'Error'
});
console.error('Malformed quick connect response', json);
return false;
}
@ -215,10 +211,17 @@ import 'emby-checkbox';
return true;
}).catch((e) => {
console.error('Unable to initiate quick connect login request. Error:', e);
Dashboard.alert({
message: Globalize.translate('QuickConnectNotActive'),
title: 'Error'
});
console.error('Quick connect error: ', e);
return false;
});
}
view.querySelector('#divUsers').addEventListener('click', function (e) {
const card = dom.parentWithClass(e.target, 'card');
const cardContent = card ? card.querySelector('.cardContent') : null;