signal-desktop/js/permissions_popup_start.js
Scott Nonnenberg ad4387803b New media permission, show dialog when not enabled for voice msg
UI now in separate renderer:
  - the permissions popup
  - settings dialog
  - debug log dialog
  - about window

Couple bug fixes:
  - About Window: Fix 'escape' to close window
  - Remove outdated dist/copy tasks from Gruntfile

Eslintified settings_view.js
2018-07-03 16:04:21 -07:00

19 lines
442 B
JavaScript

$(document).on('keyup', function(e) {
if (e.keyCode === 27) {
window.closePermissionsPopup();
}
});
const $body = $(document.body);
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);