Faster preferences window

This commit is contained in:
Josh Perez 2021-08-18 16:08:14 -04:00 committed by GitHub
parent ac55b8d643
commit 91af0dad78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 3567 additions and 2093 deletions

View file

@ -12,7 +12,7 @@ $(document).on('keydown', e => {
const $body = $(document.body);
async function applyTheme() {
const theme = await window.getThemeSetting();
const theme = await window.Settings.themeSetting.getValue();
$body.removeClass('light-theme');
$body.removeClass('dark-theme');
$body.addClass(`${theme === 'system' ? window.systemTheme : theme}-theme`);
@ -41,9 +41,9 @@ window.showConfirmationDialog({
okText: i18n('allowAccess'),
resolve: () => {
if (!window.forCamera) {
window.setMediaPermissions(true);
window.Settings.mediaPermissions.setValue(true);
} else {
window.setMediaCameraPermissions(true);
window.Settings.mediaCameraPermissions.setValue(true);
}
window.closePermissionsPopup();
},