1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

electron update

This commit is contained in:
Andrew Simachev 2020-04-23 20:11:06 +03:00
parent 7a9249444e
commit 36cf4fe6cb
11 changed files with 300 additions and 221 deletions

View file

@ -12,15 +12,19 @@ autoUpdater.logger = log;
autoUpdater.logger.transports.file.level = 'info';
let win = null;
let csp = [
"default-src 'self'",
"img-src 'self' http://*:* https://*:* data: blob:",
"media-src 'self' http://*:* https://*:* data: blob:",
"style-src 'unsafe-inline'",
"font-src data:",
"connect-src http://localhost:8080 ws://localhost:8080 https://sentry.anytype.io https://anytype.io https://api.amplitude.com/",
"script-src-elem http://localhost:8080 https://sentry.io"
];
let csp = [];
if (app.isPackaged) {
csp = [
"default-src 'self'",
"img-src 'self' http://*:* https://*:* data: blob:",
"media-src 'self' http://*:* https://*:* data: blob:",
"style-src 'unsafe-inline'",
"font-src data:",
"connect-src http://localhost:8080 ws://localhost:8080 https://sentry.anytype.io https://anytype.io https://api.amplitude.com/",
"script-src-elem http://localhost:8080 https://sentry.io"
];
};
function createWindow () {
const { width, height } = electron.screen.getPrimaryDisplay().workAreaSize;