2015-08-28 14:20:07 +02:00
|
|
|
var React = require('react');
|
2015-09-04 12:10:08 +02:00
|
|
|
var Util = require('../../util');
|
2015-08-28 14:20:07 +02:00
|
|
|
var DesktopAppItem = require('./desktop-app-item.jsx');
|
2015-08-30 21:29:19 +02:00
|
|
|
var path = require('path');
|
2015-09-11 16:25:45 +02:00
|
|
|
var debug = require('../../util/debug')('pitaya:desktop-app-list');
|
2015-08-28 14:20:07 +02:00
|
|
|
|
2015-09-11 16:25:45 +02:00
|
|
|
var DesktopAppList = React.createClass({
|
2015-08-28 14:20:07 +02:00
|
|
|
|
|
|
|
render: function() {
|
|
|
|
|
2015-09-03 15:50:23 +02:00
|
|
|
var items = this.props.desktopApps.map(function(desktopApp, i) {
|
|
|
|
var desktopEntry = desktopApp.content['Desktop Entry'];
|
2015-09-11 16:25:45 +02:00
|
|
|
return (
|
|
|
|
<DesktopAppItem theme={this.props.selectedTheme}
|
|
|
|
key={desktopApp.path}
|
|
|
|
desktopEntry={desktopEntry}
|
|
|
|
onItemDropped={this.props.onItemDropped} />
|
|
|
|
);
|
2015-08-31 23:08:56 +02:00
|
|
|
}.bind(this));
|
2015-08-28 14:20:07 +02:00
|
|
|
|
|
|
|
return (
|
2015-09-11 16:25:45 +02:00
|
|
|
<div className="apps-list">
|
|
|
|
<ul className="desktop-apps list-group">
|
2015-08-31 23:08:56 +02:00
|
|
|
{items}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2015-08-28 14:20:07 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2015-09-11 16:25:45 +02:00
|
|
|
|
|
|
|
module.exports = DesktopAppList;
|