Skip to content

Commit

Permalink
Added new introduction videos
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Mar 23, 2016
1 parent d7f6193 commit 2a3ca2d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
5 changes: 3 additions & 2 deletions app/desktop/Toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import hasEntry from '../../computed/hasEntry';
highlightCreateIssue: 'bin.highlightCreateIssue',
isEntry: 'bin.isEntry',
hasEntry: hasEntry,
changedFiles: 'bin.changedFiles'
changedFiles: 'bin.changedFiles',
introductionVideoUrl: 'bin.introductionVideoUrl'
})
class Toolbar extends React.Component {
static propTypes = {
Expand Down Expand Up @@ -155,7 +156,7 @@ class Toolbar extends React.Component {
show={this.props.showInfo}
right>
<div className={styles.info}>
<div className={styles.link} onClick={() => {const win = window.open('http://www.youtube.com/watch?v=LGaJwjVPh9I');win.focus();}}>
<div className={styles.link} onClick={() => {const win = window.open(this.props.introductionVideoUrl);win.focus();}}>
<i className={icons.movie}/> Watch an introduction
</div>
<div className={this.props.highlightCreateIssue ? styles.highlightLink : styles.link} onClick={() => {const win = window.open('https://github.com/christianalfoni/webpack-bin/issues');win.focus();}}>
Expand Down
6 changes: 4 additions & 2 deletions app/desktop/Welcome/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React from 'react';
import {Decorator as Cerebral} from 'cerebral-view-react';
import styles from './styles.css';

@Cerebral()
@Cerebral({
introductionVideoEmbedUrl: 'bin.introductionVideoEmbedUrl'
})
class Welcome extends React.Component {
render() {
return (
Expand All @@ -18,7 +20,7 @@ class Welcome extends React.Component {
</div>
</div>
<div className={styles.column}>
<iframe width="560" height="315" src="https://www.youtube.com/embed/LGaJwjVPh9I" frameBorder="0" allowFullScreen></iframe>
<iframe width="560" height="315" src={this.props.introductionVideoEmbedUrl} frameBorder="0" allowFullScreen></iframe>
</div>
</div>
);
Expand Down
6 changes: 4 additions & 2 deletions app/mobileLandscape/Welcome/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React from 'react';
import {Decorator as Cerebral} from 'cerebral-view-react';
import styles from './styles.css';

@Cerebral()
@Cerebral({
introductionVideoEmbedUrl: 'bin.introductionVideoEmbedUrl'
})
class Welcome extends React.Component {
render() {
return (
Expand All @@ -14,7 +16,7 @@ class Welcome extends React.Component {
</div>
</div>
<div className={styles.column}>
<iframe width="250" height="147" src="https://www.youtube.com/embed/LGaJwjVPh9I" frameBorder="0" allowFullScreen></iframe>
<iframe width="250" height="147" src={this.props.introductionVideoEmbedUrl} frameBorder="0" allowFullScreen></iframe>
</div>
</div>
);
Expand Down
5 changes: 3 additions & 2 deletions app/mobilePortrait/Bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import styles from './styles.css';

@Cerebral({
isInitialized: 'bin.isInitialized',
currentBin: 'bin.currentBin'
currentBin: 'bin.currentBin',
introductionVideoEmbedUrl: 'bin.introductionVideoEmbedUrl'
})
class Bin extends React.Component {
componentDidMount() {
Expand All @@ -29,7 +30,7 @@ class Bin extends React.Component {
<div>
<h3>To start using WebpackBin you need to flip your phone into landscape</h3>
<div>
<iframe width="250" height="147" src="https://www.youtube.com/embed/LGaJwjVPh9I" frameBorder="0" allowFullScreen></iframe>
<iframe width="250" height="147" src={this.props.introductionVideoEmbedUrl} frameBorder="0" allowFullScreen></iframe>
</div>
</div>
);
Expand Down
2 changes: 2 additions & 0 deletions app/modules/Bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export default (options = {}) => {

module.addState({
isInitialized: false,
introductionVideoUrl: 'http://www.youtube.com/watch?v=yf3Jhjw5Btc',
introductionVideoEmbedUrl: 'https://www.youtube.com/embed/yf3Jhjw5Btc',
showWelcome: !Boolean(localStorage && localStorage.getItem('hasVisited')),
snackbar: {
text: '',
Expand Down

0 comments on commit 2a3ca2d

Please sign in to comment.