import React from 'react';
import superagent from 'superagent';
import {
Segment,
Header,
Image,
Icon,
Button,
Table,
Form,
Label } from 'semantic-ui-react'
// Shows a list of screens in the room, as well as controls to:
// 1. Create and delete screens.
// 2. Add or content on to the screens.
// 3. Alter screen pose states.
export default class Screens extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
async componentDidMount() {
}
// TODO: add a screen
// TODO: remove a screen
// TODO: update a screen
render() {
if (!this.props.room) {
return (
)
}
const anchor = `${this.props.room.roomType}${this.props.roomIndex}`;
const roomTitle = {this.props.room.name} #{this.props.roomIndex + 1} (Participants: {this.props.room.participants.length})
return (
{(this.props.room.screens && this.props.room.screens.length > 0) &&
Name
Type
Playlist
Tools
{this.props.room.participants.map((participant, participantIndex) => {
const isAdmin = _.indexOf(this.props.room.adminUserIds, participant.userId);
const isOwner = participant.userSessionId === this.props.room.owner.userSessionId;
let avatarUrl = "/images/avatar_b.jpg";
const bigscreenUser = participant.bigscreenUser;
const accountProfile = participant.accountProfile;
if (accountProfile && accountProfile.oculusProfile && accountProfile.oculusProfile.oculusImageURL) {
avatarUrl = accountProfile.oculusProfile.oculusImageURL;
} else if (accountProfile && accountProfile.steamProfile && accountProfile.steamProfile.avatarfull) {
avatarUrl = accountProfile.steamProfile.avatarfull;
}
let bigscreenUserHeader = null;
if (accountProfile) {
bigscreenUserHeader = (bigscreenUser.bigscreenAccountId) ? (
) : (
);
} else {
bigscreenUserHeader = (
Missing User Data!!!!
Ghost user! 👻
);
}
const isDevelopment = (window && (window.location.hostname.indexOf("localhost") !== -1
|| window.location.hostname.indexOf("development") !== -1
|| window.location.hostname.indexOf("dev-stable") !== -1));
const ghostUserTest = isDevelopment ? (
Ghostify User
) :
return (
{bigscreenUserHeader}
{isOwner ? Owner : ""}
{isAdmin ? Admin : ""}
{bigscreenUser.systemInfo && (bigscreenUser.systemInfo.deviceName || bigscreenUser.systemInfo.HMD)}
{bigscreenUser.systemInfo && bigscreenUser.systemInfo.GPU}
{bigscreenUser.systemInfo && bigscreenUser.systemInfo.CPU}
{bigscreenUser.systemInfo && bigscreenUser.systemInfo.operatingSystem}
{bigscreenUser.systemInfo && bigscreenUser.systemInfo.version}
Eject
Kick
)
})}
}
);
}
}