signal-desktop/js/permissions_popup_start.js

20 lines
472 B
JavaScript

$(document).on('keyup', function(e) {
if (e.keyCode === 27) {
window.closePermissionsPopup();
}
});
const $body = $(document.body);
$body.addClass(window.theme);
window.view = new Whisper.ConfirmationDialogView({
message: i18n('audioPermissionNeeded'),
okText: i18n('allowAccess'),
resolve: () => {
window.setMediaPermissions(true);
window.closePermissionsPopup();
},
reject: window.closePermissionsPopup,
});
window.view.$el.appendTo($body);