From 8fc75cc06dc616729edf62616096bbd98f6b3f4f Mon Sep 17 00:00:00 2001 From: William Petit Date: Fri, 28 Aug 2015 10:06:25 +0200 Subject: [PATCH] Maj doc + refactoring --- README.md | 9 +++++++-- js/app.jsx | 10 +++++++++- js/{ => util}/fs.js | 0 3 files changed, 16 insertions(+), 3 deletions(-) rename js/{ => util}/fs.js (100%) diff --git a/README.md b/README.md index eb4ef0b..57238a9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Pitaya -Lanceur d'application pour Linux +Lanceur d'application pour GNU/Linux ## Démarrer avec les sources @@ -12,7 +12,7 @@ Lanceur d'application pour Linux ### Initialisation du projet ``` -git clone +git clone https://forge.cadoles.com/wpetit/pitaya.git cd pitaya git checkout develop npm install @@ -23,6 +23,7 @@ npm start ``` --profile= Chemin vers le fichier de profil à charger dans l'application. +--edit Ouvrir l'application en mode édition. ``` ### Passer des options en développement @@ -48,3 +49,7 @@ Un dossier `pitaya---` sera créé dans le répertoire `. ## Comment contribuer Ce projet utilise la méthodologie [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/). + +## Licence + +GPLv3 diff --git a/js/app.jsx b/js/app.jsx index 0341f18..6d76423 100644 --- a/js/app.jsx +++ b/js/app.jsx @@ -10,6 +10,8 @@ var AnimateMixin = require('./mixins/animate'); var DEFAULT_PROFILE = './default-profile.json'; var PROCESS_OPTS = minimist(gui.App.argv); + +// Main component var App = React.createClass({ mixins: [AnimateMixin], @@ -22,11 +24,14 @@ var App = React.createClass({ }, componentDidMount: function() { + + // Load profile on component mount Util.System.loadJSONFile(PROCESS_OPTS.profile || DEFAULT_PROFILE) .then(function(profile) { this.setState({ profile: profile, currentItem: profile, currentItemPath: '' }); }.bind(this)) ; + }, render: function() { @@ -46,7 +51,10 @@ var App = React.createClass({ return (
{header} - +
); diff --git a/js/fs.js b/js/util/fs.js similarity index 100% rename from js/fs.js rename to js/util/fs.js