Browse Source

electron: Add missing semicolons.

pull/3202/head
TheGoddessInari 7 years ago
parent
commit
2761e5a748
  1. 16
      electron/main.js
  2. 8
      electron/menu.js

16
electron/main.js

@ -49,8 +49,8 @@ const config = new Config({
// Fix issues with HiDPI scaling on Windows platform // Fix issues with HiDPI scaling on Windows platform
if (config.get('enable_hidpi_support') && (process.platform === 'win32')) { if (config.get('enable_hidpi_support') && (process.platform === 'win32')) {
app.commandLine.appendSwitch('high-dpi-support', 'true') app.commandLine.appendSwitch('high-dpi-support', 'true');
app.commandLine.appendSwitch('force-device-scale-factor', '1') app.commandLine.appendSwitch('force-device-scale-factor', '1');
} }
// This must match the package name in package.json // This must match the package name in package.json
@ -205,7 +205,7 @@ function createMasterPasswordWindow() {
if ( isDev ) mainMasterPasswordWindow.webContents.openDevTools(); if ( isDev ) mainMasterPasswordWindow.webContents.openDevTools();
mainMasterPasswordWindow.loadURL('file://' + __dirname + '/../masterpassword.html'); mainMasterPasswordWindow.loadURL('file://' + __dirname + '/../masterpassword.html');
mainMasterPasswordWindow.on('close', function() { mainMasterPasswordWindow = null }); mainMasterPasswordWindow.on('close', function() { mainMasterPasswordWindow = null; });
} }
function updateBadge(title) { function updateBadge(title) {
@ -284,13 +284,13 @@ ipcMain.on('validateMasterPassword', function(event, pass) {
ipcMain.on('setServiceNotifications', function(event, partition, op) { ipcMain.on('setServiceNotifications', function(event, partition, op) {
session.fromPartition(partition).setPermissionRequestHandler(function(webContents, permission, callback) { session.fromPartition(partition).setPermissionRequestHandler(function(webContents, permission, callback) {
if (permission === 'notifications') return callback(op); if (permission === 'notifications') return callback(op);
callback(true) callback(true);
}); });
}); });
ipcMain.on('setDontDisturb', function(event, arg) { ipcMain.on('setDontDisturb', function(event, arg) {
config.set('dont_disturb', arg); config.set('dont_disturb', arg);
}) });
// Reload app // Reload app
ipcMain.on('reloadApp', function(event) { ipcMain.on('reloadApp', function(event) {
@ -407,9 +407,9 @@ if ( config.get('proxy') ) {
if(!authInfo.isProxy) if(!authInfo.isProxy)
return; return;
event.preventDefault() event.preventDefault();
callback(config.get('proxyLogin'), config.get('proxyPassword')) callback(config.get('proxyLogin'), config.get('proxyPassword'));
}) });
} }
// Disable GPU Acceleration for Linux // Disable GPU Acceleration for Linux

8
electron/menu.js

@ -211,7 +211,7 @@ module.exports = function(config) {
{ {
label: locale['preferences[0]'], label: locale['preferences[0]'],
click() { click() {
sendAction('showPreferences') sendAction('showPreferences');
} }
}, },
{ {
@ -226,7 +226,7 @@ module.exports = function(config) {
{ {
label: locale['menu.help[6]'], label: locale['menu.help[6]'],
click() { click() {
sendAction('showAbout') sendAction('showAbout');
} }
}, },
{ {
@ -270,7 +270,7 @@ module.exports = function(config) {
{ {
label: locale['preferences[0]'], label: locale['preferences[0]'],
click() { click() {
sendAction('showPreferences') sendAction('showPreferences');
} }
}, },
{ {
@ -297,7 +297,7 @@ module.exports = function(config) {
helpSubmenu.push({ helpSubmenu.push({
label: `&`+locale['menu.help[6]'], label: `&`+locale['menu.help[6]'],
click() { click() {
sendAction('showAbout') sendAction('showAbout');
} }
}); });
} }

Loading…
Cancel
Save