@@ -7,6 +7,7 @@ import Header from '../../components/mobile/Header';
77import IconButton from '../../components/mobile/IconButton' ;
88import PreviewFrame from '../IDE/components/PreviewFrame' ;
99import Screen from '../../components/mobile/MobileScreen' ;
10+ import Console from '../IDE/components/Console' ;
1011import * as ProjectActions from '../IDE/actions/project' ;
1112import * as IDEActions from '../IDE/actions/ide' ;
1213import * as PreferencesActions from '../IDE/actions/preferences' ;
@@ -18,6 +19,7 @@ import { getHTMLFile } from '../IDE/reducers/files';
1819
1920import { ExitIcon } from '../../common/icons' ;
2021import { remSize } from '../../theme' ;
22+ import Footer from '../../components/mobile/Footer' ;
2123
2224
2325const Content = styled . div `
@@ -39,13 +41,16 @@ const MobileSketchView = (props) => {
3941 // Actions
4042 const {
4143 setTextOutput, setGridOutput, setSoundOutput,
42- endSketchRefresh, stopSketch,
44+ endSketchRefresh, stopSketch, console ,
4345 dispatchConsoleEvent, expandConsole, clearConsole,
4446 setBlobUrl,
4547 } = props ;
4648
4749 const { preferences, ide } = props ;
4850
51+ // FIXME:
52+ const collapseConsole = ( ) => { } ;
53+
4954 return (
5055 < Screen fullscreen >
5156 < Header
@@ -82,6 +87,17 @@ const MobileSketchView = (props) => {
8287 clearConsole = { clearConsole }
8388 />
8489 </ Content >
90+ < Footer before = { < Console
91+ fontSize = { preferences . fontSize }
92+ consoleEvents = { console }
93+ isExpanded = { ide . consoleIsExpanded }
94+ clearConsole = { clearConsole }
95+ theme = { preferences . theme }
96+ dispatchConsoleEvent = { dispatchConsoleEvent }
97+ expandConsole = { expandConsole }
98+ collapseConsole = { collapseConsole }
99+ /> }
100+ />
85101 </ Screen > ) ;
86102} ;
87103
@@ -146,7 +162,6 @@ MobileSketchView.propTypes = {
146162 justOpenedProject : PropTypes . bool . isRequired ,
147163 errorType : PropTypes . string ,
148164 runtimeErrorWarningVisible : PropTypes . bool . isRequired ,
149- uploadFileModalVisible : PropTypes . bool . isRequired
150165 } ) . isRequired ,
151166
152167 projectName : PropTypes . string . isRequired ,
@@ -160,6 +175,11 @@ MobileSketchView.propTypes = {
160175 setBlobUrl : PropTypes . func . isRequired ,
161176 expandConsole : PropTypes . func . isRequired ,
162177 clearConsole : PropTypes . func . isRequired ,
178+
179+ console : PropTypes . arrayOf ( PropTypes . shape ( {
180+ method : PropTypes . string . isRequired ,
181+ args : PropTypes . arrayOf ( PropTypes . string )
182+ } ) ) . isRequired ,
163183} ;
164184
165185function mapStateToProps ( state ) {
@@ -169,6 +189,7 @@ function mapStateToProps(state) {
169189 files : state . files ,
170190 ide : state . ide ,
171191 preferences : state . preferences ,
192+ console : state . console ,
172193 selectedFile : state . files . find ( file => file . isSelectedFile ) ||
173194 state . files . find ( file => file . name === 'sketch.js' ) ||
174195 state . files . find ( file => file . name !== 'root' ) ,
0 commit comments