Move confirmation_dialog_view to ts and React

* Moves confirmation_dialog_view to ts and React

* showConfirmationDialog API
This commit is contained in:
Josh Perez 2021-01-04 13:47:14 -05:00 committed by Scott Nonnenberg
parent 031a1fcc3d
commit 2529e208c1
16 changed files with 154 additions and 254 deletions

View file

@ -1,7 +1,7 @@
// Copyright 2018-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* global $, Whisper, i18n */
/* global $, i18n */
$(document).on('keydown', e => {
if (e.keyCode === 27) {
@ -35,7 +35,8 @@ if (window.forCalling) {
message = i18n('audioPermissionNeeded');
}
window.view = new Whisper.ConfirmationDialogView({
window.showConfirmationDialog({
confirmStyle: 'affirmative',
message,
okText: i18n('allowAccess'),
resolve: () => {
@ -48,5 +49,3 @@ window.view = new Whisper.ConfirmationDialogView({
},
reject: window.closePermissionsPopup,
});
window.view.$el.appendTo($body);