mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 09:36:27 +00:00
wire up firmware flash progress
Also turn off logging and longer checksum interval to improve performance 94K movehub fw flashes in about 1:45
This commit is contained in:
committed by
David Lechner
parent
7ba99d62bb
commit
3ae2fb2eef
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import ProgressBar from 'react-bootstrap/ProgressBar';
|
||||
import { connect } from 'react-redux';
|
||||
import { RootState } from '../reducers';
|
||||
|
||||
type StateProps = { progress: number };
|
||||
|
||||
type StatusProps = StateProps;
|
||||
|
||||
class StatusBar extends React.Component<StatusProps> {
|
||||
render(): JSX.Element {
|
||||
return (
|
||||
<div className="bg-info p-2">
|
||||
<ProgressBar className="w-25" now={this.props.progress} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = (state: RootState): StateProps => ({
|
||||
progress: state.status.progress,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(StatusBar);
|
||||
Reference in New Issue
Block a user