mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Add comment about enum hijinks
This commit is contained in:
parent
ce809e16d9
commit
d91c7f5e54
@ -23,7 +23,7 @@ import AccessibleButton from '../../../components/views/elements/AccessibleButto
|
|||||||
|
|
||||||
export default React.createClass({
|
export default React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
status: React.PropTypes.string, // oneOf(Object.values(updateCheckStatusEnum)).isRequired,
|
status: React.PropTypes.string.isRequired,
|
||||||
// Currently for error detail but will be usable for download progress
|
// Currently for error detail but will be usable for download progress
|
||||||
// once that is a thing that squirrel passes through electron.
|
// once that is a thing that squirrel passes through electron.
|
||||||
detail: React.PropTypes.string,
|
detail: React.PropTypes.string,
|
||||||
@ -36,6 +36,8 @@ export default React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getStatusText: function() {
|
getStatusText: function() {
|
||||||
|
// we can't import the enum from riot-web as we don't want matrix-react-sdk
|
||||||
|
// to depend on riot-web. so we grab it as a normal object via API instead.
|
||||||
const updateCheckStatusEnum = PlatformPeg.get().getUpdateCheckStatusEnum();
|
const updateCheckStatusEnum = PlatformPeg.get().getUpdateCheckStatusEnum();
|
||||||
switch(this.props.status) {
|
switch(this.props.status) {
|
||||||
case updateCheckStatusEnum.ERROR:
|
case updateCheckStatusEnum.ERROR:
|
||||||
|
Loading…
Reference in New Issue
Block a user