Skip to content
Snippets Groups Projects
Verified Commit e559abe1 authored by azubieta's avatar azubieta
Browse files

Allow toolbox to be visible

parent 36c66fad
No related branches found
No related tags found
No related merge requests found
...@@ -102,8 +102,7 @@ function createWindow() { ...@@ -102,8 +102,7 @@ function createWindow() {
if (isDebugMode) { if (isDebugMode) {
mainWindow.webContents.openDevTools({mode: 'detach'}); mainWindow.webContents.openDevTools({mode: 'detach'});
} } else {
else {
mainWindow.setMenu(null); mainWindow.setMenu(null);
} }
...@@ -144,7 +143,7 @@ function createView() { ...@@ -144,7 +143,7 @@ function createView() {
const windowBounds = mainWindow.getBounds(); const windowBounds = mainWindow.getBounds();
mainView.setBounds({ mainView.setBounds({
x: 0, x: 0,
y: 0, y: 40,
width: windowBounds.width, width: windowBounds.width,
height: windowBounds.height height: windowBounds.height
}); });
...@@ -237,8 +236,7 @@ function isFile(path) { ...@@ -237,8 +236,7 @@ function isFile(path) {
try { try {
const stats = fs.statSync(path); const stats = fs.statSync(path);
return stats.isFile(); return stats.isFile();
} } catch (error) {
catch (error) {
console.error(error); console.error(error);
return false; return false;
} }
...@@ -248,8 +246,7 @@ function isDirectory(path) { ...@@ -248,8 +246,7 @@ function isDirectory(path) {
try { try {
const stats = fs.statSync(path); const stats = fs.statSync(path);
return stats.isDirectory(); return stats.isDirectory();
} } catch (error) {
catch (error) {
console.error(error); console.error(error);
return false; return false;
} }
...@@ -299,8 +296,7 @@ function removePreviewpic(itemKey) { ...@@ -299,8 +296,7 @@ function removePreviewpic(itemKey) {
app.on('ready', async () => { app.on('ready', async () => {
if (await startOcsManager()) { if (await startOcsManager()) {
createWindow(); createWindow();
} } else {
else {
app.quit(); app.quit();
} }
}); });
...@@ -360,19 +356,15 @@ ipcMain.on('store', (event, key, value) => { ...@@ -360,19 +356,15 @@ ipcMain.on('store', (event, key, value) => {
ipcMain.on('previewpic', (event, kind, itemKey, url) => { ipcMain.on('previewpic', (event, kind, itemKey, url) => {
if (kind === 'directory') { if (kind === 'directory') {
event.returnValue = previewpicDirectory; event.returnValue = previewpicDirectory;
} } else if (kind === 'path' && itemKey) {
else if (kind === 'path' && itemKey) {
event.returnValue = `${previewpicDirectory}/${previewpicFilename(itemKey)}`; event.returnValue = `${previewpicDirectory}/${previewpicFilename(itemKey)}`;
} } else if (kind === 'download' && itemKey && url) {
else if (kind === 'download' && itemKey && url) {
downloadPreviewpic(itemKey, url); downloadPreviewpic(itemKey, url);
event.returnValue = undefined; event.returnValue = undefined;
} } else if (kind === 'remove' && itemKey) {
else if (kind === 'remove' && itemKey) {
removePreviewpic(itemKey); removePreviewpic(itemKey);
event.returnValue = undefined; event.returnValue = undefined;
} } else {
else {
event.returnValue = false; event.returnValue = false;
} }
}); });
...@@ -31,9 +31,6 @@ ToolbarComponent.define('app-toolbar'); ...@@ -31,9 +31,6 @@ ToolbarComponent.define('app-toolbar');
import OmniboxComponent from './OmniboxComponent.js'; import OmniboxComponent from './OmniboxComponent.js';
OmniboxComponent.define('app-omnibox'); OmniboxComponent.define('app-omnibox');
//import WebviewComponent from './WebviewComponent.js';
//WebviewComponent.define('app-webview');
import CollectiondialogComponent from './CollectiondialogComponent.js'; import CollectiondialogComponent from './CollectiondialogComponent.js';
CollectiondialogComponent.define('app-collectiondialog'); CollectiondialogComponent.define('app-collectiondialog');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment