fixed electron deprecations

This commit is contained in:
antelle 2019-10-26 22:58:48 +02:00
parent 5d1162bd32
commit 12c7313935
2 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ module.exports = function(grunt) {
const dt = date.toISOString().replace(/T.*/, '');
const year = date.getFullYear();
const minElectronVersionForUpdate = '6.0.2';
const minElectronVersionForUpdate = '7.0.0';
const zipCommentPlaceholderPart = 'zip_comment_placeholder_that_will_be_replaced_with_hash';
const zipCommentPlaceholder =
zipCommentPlaceholderPart + '.'.repeat(512 - zipCommentPlaceholderPart.length);

View File

@ -152,8 +152,8 @@ function readAppSettings() {
function setSystemAppearance() {
if (process.platform === 'darwin') {
if (electron.systemPreferences.isDarkMode()) {
electron.systemPreferences.setAppLevelAppearance('dark');
if (electron.nativeTheme.shouldUseDarkColors) {
electron.systemPreferences.appLevelAppearance = 'dark';
}
}
}
@ -323,7 +323,7 @@ function emitRemoteEvent(e, arg) {
function setMenu() {
if (process.platform === 'darwin') {
const name = require('electron').app.getName();
const name = require('electron').app.name;
const template = [
{
label: name,