Maj doc + refactoring

Este commit está contenido en:
wpetit 2015-08-28 10:06:25 +02:00
padre 7fc7f9d10e
commit 8fc75cc06d
Se han modificado 3 ficheros con 16 adiciones y 3 borrados

Ver fichero

@ -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 <repo>
git clone https://forge.cadoles.com/wpetit/pitaya.git
cd pitaya
git checkout develop
npm install
@ -23,6 +23,7 @@ npm start
```
--profile=<chemin_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-<version>-<target>-<arch>` 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

Ver fichero

@ -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 (
<div className="launcher">
{header}
<AppList ref="appList" items={items} parentPath={currentItemPath} onItemClick={this.onItemClick} />
<AppList ref="appList"
items={items}
parentPath={currentItemPath}
onItemClick={this.onItemClick} />
</div>
);