remove permissions popup window and related stuff
parent
c9fc3be6c3
commit
3df0a425de
@ -1,21 +0,0 @@
|
||||
/* global $, i18n */
|
||||
|
||||
$(document).on('keyup', e => {
|
||||
'use strict';
|
||||
|
||||
if (e.keyCode === 27) {
|
||||
window.closePermissionsPopup();
|
||||
}
|
||||
});
|
||||
|
||||
window.confirmationDialog({
|
||||
title: i18n('audioPermissionNeeded'),
|
||||
okText: i18n('allowAccess'),
|
||||
resolve: () => {
|
||||
'use strict';
|
||||
|
||||
window.setMediaPermissions(true);
|
||||
window.closePermissionsPopup();
|
||||
},
|
||||
onClose: window.closePermissionsPopup,
|
||||
});
|
@ -1,26 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'none';
|
||||
child-src 'self';
|
||||
connect-src 'self' https: wss:;
|
||||
font-src 'self';
|
||||
form-action 'self';
|
||||
frame-src 'none';
|
||||
img-src 'self' blob: data:;
|
||||
media-src 'self' blob:;
|
||||
object-src 'none';
|
||||
script-src 'self';
|
||||
style-src 'self' 'unsafe-inline';"
|
||||
>
|
||||
<link href="stylesheets/manifest.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body class='permissions-popup'>
|
||||
</body>
|
||||
</script>
|
||||
<script type='text/javascript' src='js/components.js'></script>
|
||||
<script type='text/javascript' src='js/views/whisper_view.js'></script>
|
||||
<script type='text/javascript' src='js/permissions_popup_start.js'></script>
|
||||
</html>
|
@ -1,52 +0,0 @@
|
||||
/* global window */
|
||||
|
||||
const { ipcRenderer } = require('electron');
|
||||
const url = require('url');
|
||||
const i18n = require('./js/modules/i18n');
|
||||
|
||||
const config = url.parse(window.location.toString(), true).query;
|
||||
const { locale } = config;
|
||||
const localeMessages = ipcRenderer.sendSync('locale-data');
|
||||
|
||||
global.dcodeIO = global.dcodeIO || {};
|
||||
global.dcodeIO.ByteBuffer = require('bytebuffer');
|
||||
|
||||
window.getVersion = () => config.version;
|
||||
window.theme = config.theme;
|
||||
window.i18n = i18n.setup(locale, localeMessages);
|
||||
|
||||
require('./js/logging');
|
||||
|
||||
window.closePermissionsPopup = () =>
|
||||
ipcRenderer.send('close-permissions-popup');
|
||||
|
||||
window.getMediaPermissions = makeGetter('media-permissions');
|
||||
window.setMediaPermissions = makeSetter('media-permissions');
|
||||
|
||||
function makeGetter(name) {
|
||||
return () =>
|
||||
new Promise((resolve, reject) => {
|
||||
ipcRenderer.once(`get-success-${name}`, (event, error, value) => {
|
||||
if (error) {
|
||||
return reject(error);
|
||||
}
|
||||
|
||||
return resolve(value);
|
||||
});
|
||||
ipcRenderer.send(`get-${name}`);
|
||||
});
|
||||
}
|
||||
|
||||
function makeSetter(name) {
|
||||
return value =>
|
||||
new Promise((resolve, reject) => {
|
||||
ipcRenderer.once(`set-success-${name}`, (event, error) => {
|
||||
if (error) {
|
||||
return reject(error);
|
||||
}
|
||||
|
||||
return resolve();
|
||||
});
|
||||
ipcRenderer.send(`set-${name}`, value);
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue