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

34 lines
822 B
JavaScript
Raw Normal View History

2015-08-28 14:20:07 +02:00
var React = require('react');
var Util = require('../../util');
var DesktopAppItem = require('./desktop-app-item.js');
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 (
2015-09-16 17:26:56 +02:00
<DesktopAppItem theme={this.props.theme}
2015-09-11 16:25:45 +02:00
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;