diff --git a/app/main.js b/app/main.js index 7576041b001b3604e2220304bdb6527f46361fd1..15e463779cc42a2fcc5cebbce8fa34acc04ff9a6 100644 --- a/app/main.js +++ b/app/main.js @@ -102,8 +102,7 @@ function createWindow() { if (isDebugMode) { mainWindow.webContents.openDevTools({mode: 'detach'}); - } - else { + } else { mainWindow.setMenu(null); } @@ -144,7 +143,7 @@ function createView() { const windowBounds = mainWindow.getBounds(); mainView.setBounds({ x: 0, - y: 0, + y: 40, width: windowBounds.width, height: windowBounds.height }); @@ -237,8 +236,7 @@ function isFile(path) { try { const stats = fs.statSync(path); return stats.isFile(); - } - catch (error) { + } catch (error) { console.error(error); return false; } @@ -248,8 +246,7 @@ function isDirectory(path) { try { const stats = fs.statSync(path); return stats.isDirectory(); - } - catch (error) { + } catch (error) { console.error(error); return false; } @@ -299,8 +296,7 @@ function removePreviewpic(itemKey) { app.on('ready', async () => { if (await startOcsManager()) { createWindow(); - } - else { + } else { app.quit(); } }); @@ -360,19 +356,15 @@ ipcMain.on('store', (event, key, value) => { ipcMain.on('previewpic', (event, kind, itemKey, url) => { if (kind === 'directory') { event.returnValue = previewpicDirectory; - } - else if (kind === 'path' && itemKey) { + } else if (kind === 'path' && itemKey) { event.returnValue = `${previewpicDirectory}/${previewpicFilename(itemKey)}`; - } - else if (kind === 'download' && itemKey && url) { + } else if (kind === 'download' && itemKey && url) { downloadPreviewpic(itemKey, url); event.returnValue = undefined; - } - else if (kind === 'remove' && itemKey) { + } else if (kind === 'remove' && itemKey) { removePreviewpic(itemKey); event.returnValue = undefined; - } - else { + } else { event.returnValue = false; } }); diff --git a/app/scripts/components/index.js b/app/scripts/components/index.js index 1b8b9d9233559962c6300368fd074793655a280a..382ab7c96c284eff7d71b11ea89d8c000b2c7cc3 100644 --- a/app/scripts/components/index.js +++ b/app/scripts/components/index.js @@ -31,9 +31,6 @@ ToolbarComponent.define('app-toolbar'); import OmniboxComponent from './OmniboxComponent.js'; OmniboxComponent.define('app-omnibox'); -//import WebviewComponent from './WebviewComponent.js'; -//WebviewComponent.define('app-webview'); - import CollectiondialogComponent from './CollectiondialogComponent.js'; CollectiondialogComponent.define('app-collectiondialog');