forked from bigbluebutton/bbb-playback
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request bigbluebutton#48 from pedrobmarin/more-button
More button first version
- Loading branch information
Showing
8 changed files
with
280 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import React, { PureComponent } from 'react'; | ||
import { | ||
FormattedDate, | ||
FormattedTime, | ||
} from 'react-intl'; | ||
import Button from 'components/utils/button'; | ||
import './index.scss'; | ||
|
||
export default class More extends PureComponent { | ||
renderDate(metadata) { | ||
const date = <FormattedDate | ||
value={new Date(metadata.start)} | ||
day="numeric" | ||
month="long" | ||
year="numeric" | ||
/>; | ||
|
||
const start = <FormattedTime value={new Date(metadata.start)} /> | ||
const end = <FormattedTime value={new Date(metadata.end)} /> | ||
|
||
return ( | ||
<div className="date"> | ||
<div className="item"> | ||
{date} | ||
</div> | ||
<div className="item"> | ||
{start} | ||
</div> | ||
<div className="item"> | ||
- | ||
</div> | ||
<div className="item"> | ||
{end} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
renderItem(type, value) { | ||
let element; | ||
if (typeof value === 'boolean') { | ||
element = <div className={value ? 'icon-checkmark' : 'icon-close'} />; | ||
} else { | ||
element = value; | ||
} | ||
|
||
return ( | ||
<div className="item"> | ||
<div className={`icon-${type}`} /> | ||
<div className="value"> | ||
{element} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
renderBody(metadata) { | ||
const { | ||
captions, | ||
chat, | ||
screenshare, | ||
} = this.props; | ||
|
||
return ( | ||
<div className="body"> | ||
{this.renderItem('user', metadata.participants)} | ||
{this.renderItem('group-chat', chat)} | ||
{this.renderItem('desktop', screenshare)} | ||
{this.renderItem('closed-caption', captions)} | ||
</div> | ||
); | ||
} | ||
|
||
render() { | ||
const { | ||
metadata, | ||
toggleMore, | ||
} = this.props; | ||
|
||
return ( | ||
<div className="more-wrapper"> | ||
<div className="more"> | ||
<div className="control"> | ||
<Button | ||
handleOnClick={toggleMore} | ||
icon="close" | ||
/> | ||
</div> | ||
<div className="header"> | ||
<div className="name"> | ||
{metadata.name} | ||
</div> | ||
{this.renderDate(metadata)} | ||
</div> | ||
{this.renderBody(metadata)} | ||
<div className="footer"> | ||
{this.renderItem('settings', 'ddfgsdfg')} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
@import 'src/styles/colors'; | ||
@import 'src/styles/fonts'; | ||
@import 'src/styles/icons'; | ||
@import 'src/styles/sizes'; | ||
|
||
.more-wrapper { | ||
align-items: center; | ||
background-color: transparentize($main-background-color, .25); | ||
display: flex; | ||
height: 100%; | ||
justify-content: center; | ||
left: 0; | ||
position: fixed; | ||
top: 0; | ||
width: 100%; | ||
z-index: 2; | ||
} | ||
|
||
.more { | ||
background-color: $section-background-color; | ||
border-radius: $border-radius; | ||
display: flex; | ||
flex-direction: column; | ||
max-width: $modal-max-width; | ||
max-height: 80%; | ||
padding: 0 $padding-small; | ||
width: 80%; | ||
|
||
.control { | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: row-reverse; | ||
height: $modal-bar-height; | ||
padding: $padding-small; | ||
width: 100%; | ||
|
||
.button { | ||
color: $gray-light; | ||
font-weight: $font-weight-semi-bold; | ||
} | ||
} | ||
|
||
.header { | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
font-weight: $font-weight-regular; | ||
padding: 0 0 $padding 0; | ||
width: 100%; | ||
|
||
.name { | ||
box-sizing: border-box; | ||
display: flex; | ||
font-size: larger; | ||
justify-content: center; | ||
overflow: hidden; | ||
padding: 0 0 $padding-extra-small 0; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
|
||
.date { | ||
box-sizing: border-box; | ||
color: $gray-light; | ||
display: flex; | ||
font-size: small; | ||
padding: 0 $padding-small; | ||
|
||
.item { | ||
box-sizing: border-box; | ||
padding: 0 $padding-extra-small; | ||
} | ||
} | ||
} | ||
|
||
.body { | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
padding: 0 $padding; | ||
width: 100%; | ||
|
||
.item { | ||
box-sizing: border-box; | ||
display: flex; | ||
font-size: large; | ||
padding: $padding-small 0; | ||
|
||
.value { | ||
box-sizing: border-box; | ||
padding: 0 $padding; | ||
} | ||
} | ||
} | ||
|
||
.footer { | ||
box-sizing: border-box; | ||
align-items: center; | ||
display: flex; | ||
height: $modal-bar-height; | ||
padding: 0 $padding; | ||
width: 100%; | ||
|
||
.item { | ||
box-sizing: border-box; | ||
color: $gray-light; | ||
display: flex; | ||
font-size: small; | ||
padding: $padding-extra-small 0; | ||
width: 100%; | ||
|
||
.value { | ||
box-sizing: border-box; | ||
padding: 0 $padding-small; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.