"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "js/permissions_popup_start.js" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

permissions_popup_start.js  (Signal-Desktop-1.35.2):permissions_popup_start.js  (Signal-Desktop-1.36.1)
/* global $, Whisper, i18n */ /* global $, Whisper, i18n */
$(document).on('keydown', e => { $(document).on('keydown', e => {
'use strict';
if (e.keyCode === 27) { if (e.keyCode === 27) {
window.closePermissionsPopup(); window.closePermissionsPopup();
} }
}); });
const $body = $(document.body); const $body = $(document.body);
async function applyTheme() { async function applyTheme() {
'use strict';
const theme = await window.getThemeSetting(); const theme = await window.getThemeSetting();
$body.removeClass('light-theme'); $body.removeClass('light-theme');
$body.removeClass('dark-theme'); $body.removeClass('dark-theme');
$body.addClass(`${theme === 'system' ? window.systemTheme : theme}-theme`); $body.addClass(`${theme === 'system' ? window.systemTheme : theme}-theme`);
} }
applyTheme(); applyTheme();
window.subscribeToSystemThemeChange(() => { window.subscribeToSystemThemeChange(() => {
'use strict';
applyTheme(); applyTheme();
}); });
let message; let message;
if (window.forCalling) { if (window.forCalling) {
if (window.forCamera) { if (window.forCamera) {
message = i18n('videoCallingPermissionNeeded'); message = i18n('videoCallingPermissionNeeded');
} else { } else {
message = i18n('audioCallingPermissionNeeded'); message = i18n('audioCallingPermissionNeeded');
} }
} else { } else {
message = i18n('audioPermissionNeeded'); message = i18n('audioPermissionNeeded');
} }
window.view = new Whisper.ConfirmationDialogView({ window.view = new Whisper.ConfirmationDialogView({
message, message,
okText: i18n('allowAccess'), okText: i18n('allowAccess'),
resolve: () => { resolve: () => {
'use strict';
if (!window.forCamera) { if (!window.forCamera) {
window.setMediaPermissions(true); window.setMediaPermissions(true);
} else { } else {
window.setMediaCameraPermissions(true); window.setMediaCameraPermissions(true);
} }
window.closePermissionsPopup(); window.closePermissionsPopup();
}, },
reject: window.closePermissionsPopup, reject: window.closePermissionsPopup,
}); });
 End of changes. 4 change blocks. 
8 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)