Sha256: b037abe8f6e074bbef917758b3f20adde96f89375d98d5843284ce288e5ccf17

Contents?: true

Size: 1.88 KB

Versions: 29

Compression:

Stored size: 1.88 KB

Contents

var React = require('react');
var Mui = require('material-ui');
var Paper = Mui.Paper;

/**
 * @prop channel
 */
var Channel = React.createClass({

    componentDidMount: function() {

    },

    handleClick: function() {

        // JavaScript to send an action to iOS code
        var appName = 'roomcast';
        var actionType = 'playChannel';
        // TODO generalize
        var actionParameters = {
            'name': this.props.channel.name,
            'url': this.props.channel.url
        };
        var jsonString = (JSON.stringify(actionParameters));
        var escapedJsonParameters = escape(jsonString);
        var url = appName + '://' + actionType + "#" + escapedJsonParameters;
        console.log('launching url: ', url);
        document.location.href = url;

    },

    render: function() {

        var broker = '52.1.142.215', runId = 'RoomQuake', imgType = 'screenshot';

        var style = {
            backgroundImage: 'url(' + 'http://' + broker + ':57880/roomcast/main-interface/assets/channels/' + runId + '/' + imgType + '/' + this.props.channel.screenshot + ')',
            backgroundSize: '100% 100%'
        };

        return (
            <Paper className='channel' style={style} ref='channelRef' onTouchTap={this.handleClick} >

                <div className='channel-div' >

                    <div className='channel-caption'>

                        <div className='icon-name-wrapper'>

                            <img className='channel-icon'> </img>

                            <div className='name-wrapper'>
                                <p className='channel-name'> {this.props.channel.name} </p>
                                <p className='channel-description'> description... </p>
                            </div>

                        </div>

                    </div>

                </div>

            </Paper>);

    }

});

module.exports = Channel;

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
nutella_framework-0.6.18 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.17 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.16 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.15 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.13 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.12 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.11 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.10 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.9 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.8 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.7 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.6 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.5 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.4 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.3 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.2 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.1 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.6.0 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.5.1 framework_components/roomcast-teacher-controls/src/app/components/Channel.js
nutella_framework-0.5.0 framework_components/roomcast-teacher-controls/src/app/components/Channel.js