2016-05-20 21:37:19 +08:00
|
|
|
import React, { Component, PropTypes } from 'react';
|
|
|
|
import styles from './styles.scss';
|
2016-07-11 20:34:58 +08:00
|
|
|
import Chats from '/imports/api/chat';
|
|
|
|
|
|
|
|
import ChatsService from '/imports/ui/components/chat/service';
|
2016-05-20 21:37:19 +08:00
|
|
|
|
|
|
|
import Button from '../button/component';
|
|
|
|
|
|
|
|
export default class ActionsBar extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
handleClick() {
|
2016-07-11 20:34:58 +08:00
|
|
|
const SYSTEM_CHAT_TYPE = 'SYSTEM_MESSAGE';
|
|
|
|
const PUBLIC_CHAT_TYPE = 'PUBLIC_CHAT';
|
|
|
|
const PRIVATE_CHAT_TYPE = 'PRIVATE_CHAT';
|
|
|
|
|
|
|
|
console.log(Chats.find({
|
|
|
|
'message.chat_type': { $in: [PUBLIC_CHAT_TYPE, SYSTEM_CHAT_TYPE] },
|
|
|
|
}, {
|
|
|
|
sort: ['message.from_time'],
|
|
|
|
})
|
|
|
|
.fetch());
|
|
|
|
}
|
|
|
|
|
|
|
|
handleClick2() {
|
|
|
|
console.log(ChatsService.getPublicMessages());
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div className={styles.actionsbar}>
|
2016-05-21 00:17:21 +08:00
|
|
|
<div className={styles.left}>
|
|
|
|
<Button
|
|
|
|
onClick={this.handleClick}
|
|
|
|
label={'Actions'}
|
|
|
|
color={'primary'}
|
|
|
|
icon={'circle-add'}
|
|
|
|
size={'lg'}
|
|
|
|
circle={true}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className={styles.center}>
|
|
|
|
<Button
|
|
|
|
onClick={this.handleClick}
|
|
|
|
label={'Mute'}
|
|
|
|
color={'primary'}
|
|
|
|
icon={'audio'}
|
|
|
|
size={'lg'}
|
|
|
|
circle={true}
|
|
|
|
/>
|
|
|
|
<Button
|
2016-07-11 20:34:58 +08:00
|
|
|
onClick={this.handleClick2}
|
2016-05-21 00:17:21 +08:00
|
|
|
label={'Cam Off'}
|
|
|
|
color={'primary'}
|
|
|
|
icon={'video-off'}
|
|
|
|
size={'lg'}
|
|
|
|
circle={true}
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
onClick={this.handleClick}
|
|
|
|
label={'Raise'}
|
|
|
|
color={'primary'}
|
|
|
|
icon={'hand'}
|
|
|
|
size={'lg'}
|
|
|
|
circle={true}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className={styles.right}>
|
|
|
|
</div>
|
2016-05-20 21:37:19 +08:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|