signal-desktop/js/settings_start.js
Scott Nonnenberg 43a44793c5 Remove jshint - move everything over to eslint
Also removed all hints of previous linters
2018-07-17 15:54:32 -07:00

39 lines
943 B
JavaScript

/* global $, Whisper */
$(document).on('keyup', e => {
'use strict';
if (e.keyCode === 27) {
window.closeSettings();
}
});
const $body = $(document.body);
$body.addClass(`${window.theme}-theme`);
// eslint-disable-next-line strict
const getInitialData = async () => ({
deviceName: await window.getDeviceName(),
themeSetting: await window.getThemeSetting(),
hideMenuBar: await window.getHideMenuBar(),
notificationSetting: await window.getNotificationSetting(),
audioNotification: await window.getAudioNotification(),
mediaPermissions: await window.getMediaPermissions(),
isPrimary: await window.isPrimary(),
lastSyncTime: await window.getLastSyncTime(),
});
window.initialRequest = getInitialData();
// eslint-disable-next-line more/no-then
window.initialRequest.then(data => {
'use strict';
window.initialData = data;
window.view = new Whisper.SettingsView();
window.view.$el.appendTo($body);
});