style: address some lgtm alerts for code styling

上级 f495c56b
...@@ -5,7 +5,7 @@ if (cluster.isMaster) { ...@@ -5,7 +5,7 @@ if (cluster.isMaster) {
const ipc = electron.ipcMain; const ipc = electron.ipcMain;
const signale = require("signale"); const signale = require("signale");
// Also, leave a core available for the renderer process // Also, leave a core available for the renderer process
const osCPUs = require("os").cpus().length - 1 const osCPUs = require("os").cpus().length - 1;
// See #904 // See #904
const numCPUs = (osCPUs > 7) ? 7 : osCPUs; const numCPUs = (osCPUs > 7) ? 7 : osCPUs;
......
...@@ -816,7 +816,7 @@ window.writeFile = (path) => { ...@@ -816,7 +816,7 @@ window.writeFile = (path) => {
fs.writeFile(path, document.getElementById("fileEdit").value, "utf-8", () => { fs.writeFile(path, document.getElementById("fileEdit").value, "utf-8", () => {
document.getElementById("fedit-status").innerHTML = "<i>File saved.</i>"; document.getElementById("fedit-status").innerHTML = "<i>File saved.</i>";
}); });
} };
window.writeSettingsFile = () => { window.writeSettingsFile = () => {
window.settings = { window.settings = {
......
...@@ -347,7 +347,7 @@ class FilesystemDisplay { ...@@ -347,7 +347,7 @@ class FilesystemDisplay {
} }
if (e.type === "file") { if (e.type === "file") {
cmd = `window.fsDisp.openFile(${blockIndex})` cmd = `window.fsDisp.openFile(${blockIndex})`;
} }
if (e.type === "system") { if (e.type === "system") {
...@@ -554,7 +554,7 @@ class FilesystemDisplay { ...@@ -554,7 +554,7 @@ class FilesystemDisplay {
name = block.name; name = block.name;
} }
let mime = require("mime-types") let mime = require("mime-types");
block.path = block.path.replace(/\\/g, "/"); block.path = block.path.replace(/\\/g, "/");
...@@ -632,7 +632,7 @@ class FilesystemDisplay { ...@@ -632,7 +632,7 @@ class FilesystemDisplay {
break; break;
} }
} }
} };
this.openMedia = (name, path, type) => { this.openMedia = (name, path, type) => {
let block, html; let block, html;
......
class MediaPlayer { class MediaPlayer {
constructor(opts) { constructor(opts) {
const modalElementId = "modal_" + opts.modalId; const modalElementId = "modal_" + opts.modalId;
const path = opts.path;
const type = opts.type; const type = opts.type;
const icons = require("./assets/icons/file-icons.json"); const icons = require("./assets/icons/file-icons.json");
const iconcolor = `rgb(${window.theme.r}, ${window.theme.g}, ${window.theme.b})`; const iconcolor = `rgb(${window.theme.r}, ${window.theme.g}, ${window.theme.b})`;
......
...@@ -54,7 +54,7 @@ class Netstat { ...@@ -54,7 +54,7 @@ class Netstat {
this.geoLookup = lookup; this.geoLookup = lookup;
this.lastconn.finished = true; this.lastconn.finished = true;
}); });
}) });
} }
updateInfo() { updateInfo() {
window.si.networkInterfaces().then(async data => { window.si.networkInterfaces().then(async data => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册