mirror of
https://github.com/mtan93/homebridge.git
synced 2026-04-04 06:13:13 +01:00
Convert to ES5, add web server
* No compilation step * Beginnings of web interface * Simple express server; React-based frontend * CommonJS style across codebase; auto-converts to RequireJS for browser * Using diffsync for realtime UI * "Provider" -> "Plugin" * Plugins expose one or more Providers
This commit is contained in:
19
public/js/notifications.jsx
Normal file
19
public/js/notifications.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
module.exports.NotificationCenter = React.createClass({
|
||||
render: function() {
|
||||
|
||||
var notifications = this.props.notifications;
|
||||
|
||||
if (!notifications || notifications.length == 0) return (
|
||||
<div style={{color:"#999"}}>No Notifications</div>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
{ notifications.map(function(notification, index) {
|
||||
return <div key={index}>{notification.message}</div>;
|
||||
}) }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user