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:
parent
7a9249444e
commit
36cf4fe6cb
11 changed files with 300 additions and 221 deletions
22
electron.js
22
electron.js
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue