From 335d8efd2827f6bf96a090ac6f7fb2dae8729f00 Mon Sep 17 00:00:00 2001 From: HerrHase Date: Mon, 5 Sep 2022 22:24:08 +0200 Subject: [PATCH] adding --- README.md | 12 +++++++ extensions/pouchdb/stores/apps.js | 4 +-- neutralino.config.json | 2 +- src/js/forms/apps.riot | 52 ++++++++++++++++++++----------- 4 files changed, 49 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e69de29..25d546f 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,12 @@ +# Potato launcher + +I know there a many Launcher on the Market, and they are all damn Beautiful, this +App is not Beautiful, it's only starts App, it is really simple, no fancy dancy Functions. + +And it is not finish! + +## Next Goals + +* Change Format of Images +* Adding Function to Filter Results +* Keyboard- and Controller-Control diff --git a/extensions/pouchdb/stores/apps.js b/extensions/pouchdb/stores/apps.js index e11c1e8..4595786 100644 --- a/extensions/pouchdb/stores/apps.js +++ b/extensions/pouchdb/stores/apps.js @@ -32,7 +32,7 @@ class AppsStore extends PouchdbHandler { .then((response) => { return this.findOneById(response._id) }).catch((error) => { - console.log(error) + console.error(error) }) } @@ -47,7 +47,7 @@ class AppsStore extends PouchdbHandler { .then((response) => { return this.findOneById(response._id) }).catch((error) => { - console.log(error) + console.error(error) }) } diff --git a/neutralino.config.json b/neutralino.config.json index 196b27f..31159f6 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -28,7 +28,7 @@ "fullScreen": false, "alwaysOnTop": false, "icon": "/resources/icons/appIcon.png", - "enableInspector": true, + "enableInspector": false, "borderless": true, "maximize": true, "hidden": false, diff --git a/src/js/forms/apps.riot b/src/js/forms/apps.riot index b71f930..8f5eb8c 100644 --- a/src/js/forms/apps.riot +++ b/src/js/forms/apps.riot @@ -194,36 +194,27 @@ }, - /** + * choose a file for command * * + * @param {object} event * */ async handleSelectProgram(event) { event.preventDefault() - let entry = await Neutralino.os.showOpenDialog('', { + // open dialog to choose a file that starts a programm + const entry = await Neutralino.os.showOpenDialog('Choose a File', { 'multiSelections': false, - 'defaultPath': '/home/' + 'defaultPath': NL_CWD }) + // adding path to command in current this.state.current.command = entry this.update() }, - /** - * - * - * - */ - handleRemoveThumbnail(event) { - event.preventDefault() - - this.state.current.thumbnail = null - this.update() - }, - /** * * @@ -248,6 +239,7 @@ }, /** + * * * * @param object event @@ -255,12 +247,18 @@ */ async handleSelectThumbnail(event) { - const entry = await Neutralino.os.showOpenDialog('', { + const entry = await Neutralino.os.showOpenDialog('Choose a Thumbnail for App', { 'multiSelections': false, - 'defaultPath': '/home/', + 'defaultPath': NL_CWD, 'filters': [{ 'name': 'Images', - 'extensions': ['jpg', 'png', 'jpeg', 'webp', 'gif', 'md'] + 'extensions': [ + 'jpg', + 'png', + 'jpeg', + 'webp', + 'gif' + ] }] }) @@ -273,6 +271,20 @@ this.update() }, + /** + * remove current thumbnail for App + * + * + * @param {object} event + * + */ + handleRemoveThumbnail(event) { + event.preventDefault() + + this.state.current.thumbnail = null + this.update() + }, + /** * * @@ -283,6 +295,10 @@ return 'data:image/png;base64,' + media }, + /** + * reset data of current form + * + */ reset() { this.state.current = {