Contributed by
diff --git a/src/frontend/components/Header/index.jsx b/src/frontend/components/Header/index.jsx
index c122337f260c56685b2d7083ce799662a7b2a28f..4004637fdba106ed62378829bce1fee43edcfc9a 100644
--- a/src/frontend/components/Header/index.jsx
+++ b/src/frontend/components/Header/index.jsx
@@ -1,6 +1,5 @@
import React from 'react';
import { connect } from 'react-redux';
-import InputRange from 'react-input-range';
import AutosizeInput from 'react-input-autosize';
import screenfull from 'screenfull';
import Promise from 'bluebird';
@@ -8,9 +7,6 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import faAngleRight from '@fortawesome/fontawesome-free-solid/faAngleRight';
import faCaretDown from '@fortawesome/fontawesome-free-solid/faCaretDown';
import faCaretRight from '@fortawesome/fontawesome-free-solid/faCaretRight';
-import faPlay from '@fortawesome/fontawesome-free-solid/faPlay';
-import faChevronLeft from '@fortawesome/fontawesome-free-solid/faChevronLeft';
-import faPause from '@fortawesome/fontawesome-free-solid/faPause';
import faExpandArrowsAlt from '@fortawesome/fontawesome-free-solid/faExpandArrowsAlt';
import faGithub from '@fortawesome/fontawesome-free-brands/faGithub';
import faTrashAlt from '@fortawesome/fontawesome-free-solid/faTrashAlt';
@@ -21,29 +17,11 @@ import { GitHubApi } from '/apis';
import { classes, refineGist } from '/common/util';
import { actions } from '/reducers';
import { languages } from '/common/config';
-import { Button, Ellipsis, ListItem } from '/components';
-import { tracerManager } from '/core';
+import { Button, Ellipsis, ListItem, Player } from '/components';
import styles from './stylesheet.scss';
@connect(({ current, env }) => ({ current, env }), actions)
class Header extends React.Component {
- constructor(props) {
- super(props);
-
- const { interval, paused, started } = tracerManager;
- this.state = {
- interval, paused, started,
- };
- }
-
- componentDidMount() {
- tracerManager.setOnUpdateStatus(update => this.setState(update));
- }
-
- componentWillUnmount() {
- tracerManager.setOnUpdateStatus(null);
- }
-
handleClickFullScreen() {
if (screenfull.enabled) {
if (screenfull.isFullscreen) {
@@ -97,12 +75,10 @@ class Header extends React.Component {
}
render() {
- const { interval, paused, started } = this.state;
- const { className, onClickTitleBar, navigatorOpened, onAction, gistSaved } = this.props;
+ const { className, onClickTitleBar, navigatorOpened, gistSaved, file } = this.props;
const { gistId, titles } = this.props.current;
const { ext, user } = this.props.env;
- // TODO: remove the 'run' button and add 'build' and 'play' buttons
return (
-