@@ -39,15 +39,14 @@ import vmListenerHOC from '../lib/vm-listener-hoc.jsx';
3939import vmManagerHOC from '../lib/vm-manager-hoc.jsx' ;
4040import cloudManagerHOC from '../lib/cloud-manager-hoc.jsx' ;
4141import systemPreferencesHOC from '../lib/system-preferences-hoc.jsx' ;
42+ import { PLATFORM } from '../lib/platform.js' ;
4243
4344import GUIComponent from '../components/gui/gui.jsx' ;
44- import { setIsScratchDesktop } from '../lib/isScratchDesktop.js' ;
4545import { GUIStoragePropType } from '../gui-config' ;
4646import { AccountMenuOptionsPropTypes } from '../lib/account-menu-options' ;
4747
4848class GUI extends React . Component {
4949 componentDidMount ( ) {
50- setIsScratchDesktop ( this . props . isScratchDesktop ) ;
5150 this . props . onStorageInit ( this . props . storage . scratchStorage ) ;
5251 this . props . onVmInit ( this . props . vm ) ;
5352 this . props . storage . setProjectMetadata ?. ( this . props . projectId ) ;
@@ -83,7 +82,6 @@ class GUI extends React.Component {
8382 cloudHost,
8483 error,
8584 isError,
86- isScratchDesktop,
8785 isShowingProject,
8886 onProjectLoaded,
8987 onStorageInit,
@@ -122,8 +120,6 @@ GUI.propTypes = {
122120 intl : intlShape ,
123121 isError : PropTypes . bool ,
124122 isLoading : PropTypes . bool ,
125- // TODO: Use platform prop
126- isScratchDesktop : PropTypes . bool ,
127123 isShowingProject : PropTypes . bool ,
128124 isTotallyNormal : PropTypes . bool ,
129125 loadingStateVisible : PropTypes . bool ,
@@ -132,7 +128,7 @@ GUI.propTypes = {
132128 onStorageInit : PropTypes . func ,
133129 onUpdateProjectId : PropTypes . func ,
134130 onVmInit : PropTypes . func ,
135- platform : PropTypes . string ,
131+ platform : PropTypes . oneOf ( Object . keys ( PLATFORM ) ) ,
136132 setPlatform : PropTypes . func . isRequired ,
137133 projectHost : PropTypes . string ,
138134 projectId : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
@@ -145,7 +141,6 @@ GUI.propTypes = {
145141} ;
146142
147143GUI . defaultProps = {
148- isScratchDesktop : false ,
149144 isTotallyNormal : false ,
150145 onStorageInit : ( ) => { } ,
151146 onProjectLoaded : ( ) => { } ,
0 commit comments