Skip to content

Commit

Permalink
Update to electron 13
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxa committed Aug 21, 2021
1 parent 8db44d6 commit deef0bb
Show file tree
Hide file tree
Showing 6 changed files with 600 additions and 564 deletions.
1 change: 1 addition & 0 deletions app/views/history_window.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class HistoryWindow {
allowRunningInsecureContent: true,
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
}
});

Expand Down
1 change: 1 addition & 0 deletions app/views/snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class SnippetsWindow {
allowRunningInsecureContent: true,
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
}
});

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
document.body.classList.add('unfocused');
}
document.body.classList.add("platform-" + process.platform);
if (electron.systemPreferences && electron.systemPreferences.isDarkMode()) {
if (electron.nativeTheme && electron.nativeTheme.shouldUseDarkColors) {
document.body.classList.add("dark-mode");
}
})();
Expand Down
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var urlsToOpen = [];

if (electron.systemPreferences && electron.systemPreferences.subscribeNotification) {
var checkDarkMode = () => {
if (electron.systemPreferences.isDarkMode()) {
if (electron.nativeTheme.shouldUseDarkColors) {
electron.systemPreferences.setAppLevelAppearance('dark');
} else {
electron.systemPreferences.setAppLevelAppearance('light');
Expand Down Expand Up @@ -70,6 +70,7 @@ app.on('ready', () => {
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
},
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/mousetrap": "^1.6.4",
"@types/pg": "^7.14.5",
"@types/semver": "~7.3.8",
"electron": "^10.4.0",
"electron": "^13.2.0",
"electron-builder": "^22.11.7",
"electron-mocha": "^9.2.0",
"eslint": "^7.32.0",
Expand Down
Loading

0 comments on commit deef0bb

Please sign in to comment.