pitaya-launcher/js/components/edit/desktop-app-list.js

34 lines
822 B
JavaScript

var React = require('react');
var Util = require('../../util');
var DesktopAppItem = require('./desktop-app-item.js');
var path = require('path');
var debug = require('../../util/debug')('pitaya:desktop-app-list');
var DesktopAppList = React.createClass({
render: function() {
var items = this.props.desktopApps.map(function(desktopApp, i) {
var desktopEntry = desktopApp.content['Desktop Entry'];
return (
<DesktopAppItem theme={this.props.theme}
key={desktopApp.path}
desktopEntry={desktopEntry}
onItemDropped={this.props.onItemDropped} />
);
}.bind(this));
return (
<div className="apps-list">
<ul className="desktop-apps list-group">
{items}
</ul>
</div>
);
}
});
module.exports = DesktopAppList;