Add status component

This commit is contained in:
He4eT 2021-03-02 19:29:42 +05:00
commit f02ec6925f
7 changed files with 66 additions and 21 deletions

View file

@ -9,12 +9,13 @@ import CheapGlkOte from 'cheap-glkote'
import TextBuffer from './TextBuffer'
import InputBox from './InputBox'
import Status from './Status'
import './player.css'
const INITIAL_STATUS = {
stage: 'loading',
details: 'Preparing...'
details: ['Preparing']
}
const runMachine = ({ Engine, file, handlers }) => {
@ -104,7 +105,7 @@ export default function ({ vmParts: { file, engine } }) {
}, [vm])
return status.stage !== 'ready'
? (<div>{status.details}</div>)
? (<Status {...status} />)
: (
<section className='ifplayer'>
<TextBuffer {...{