[PE mobile] Add files for preview
This commit is contained in:
parent
9e753e6962
commit
8912a1feab
17
apps/presentationeditor/mobile/src/controller/Preview.jsx
Normal file
17
apps/presentationeditor/mobile/src/controller/Preview.jsx
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { inject } from 'mobx-react';
|
||||||
|
import { f7 } from 'framework7-react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import Preview from "../view/Preview";
|
||||||
|
|
||||||
|
const PreviewController = () => {
|
||||||
|
console.log('preview');
|
||||||
|
return (
|
||||||
|
<Preview />
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
export {PreviewController as Preview};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import EditOptions from '../view/edit/Edit';
|
||||||
import AddOptions from '../view/add/Add';
|
import AddOptions from '../view/add/Add';
|
||||||
import Settings from '../view/settings/Settings';
|
import Settings from '../view/settings/Settings';
|
||||||
import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx';
|
import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx';
|
||||||
|
import { Preview } from "../controller/Preview";
|
||||||
import { Search, SearchSettings } from '../controller/Search';
|
import { Search, SearchSettings } from '../controller/Search';
|
||||||
import ContextMenu from '../controller/ContextMenu';
|
import ContextMenu from '../controller/ContextMenu';
|
||||||
import { Toolbar } from "../controller/Toolbar";
|
import { Toolbar } from "../controller/Toolbar";
|
||||||
|
@ -18,6 +19,7 @@ class MainPage extends Component {
|
||||||
addOptionsVisible: false,
|
addOptionsVisible: false,
|
||||||
settingsVisible: false,
|
settingsVisible: false,
|
||||||
collaborationVisible: false,
|
collaborationVisible: false,
|
||||||
|
previewVisible: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +37,9 @@ class MainPage extends Component {
|
||||||
else if ( opts == 'settings' )
|
else if ( opts == 'settings' )
|
||||||
return {settingsVisible: true};
|
return {settingsVisible: true};
|
||||||
else if ( opts == 'coauth' )
|
else if ( opts == 'coauth' )
|
||||||
return {collaborationVisible: true}
|
return {collaborationVisible: true};
|
||||||
|
else if ( opts == 'preview' )
|
||||||
|
return {previewVisible: true};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,6 +54,8 @@ class MainPage extends Component {
|
||||||
return {settingsVisible: false};
|
return {settingsVisible: false};
|
||||||
else if ( opts == 'coauth' )
|
else if ( opts == 'coauth' )
|
||||||
return {collaborationVisible: false}
|
return {collaborationVisible: false}
|
||||||
|
else if ( opts == 'preview' )
|
||||||
|
return {previewVisible: false};
|
||||||
})
|
})
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
@ -89,6 +95,10 @@ class MainPage extends Component {
|
||||||
!this.state.collaborationVisible ? null :
|
!this.state.collaborationVisible ? null :
|
||||||
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
!this.state.previewVisible ? null :
|
||||||
|
<Preview onclosed={this.handleOptionsViewClosed.bind(this, 'preview')} />
|
||||||
|
}
|
||||||
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
|
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
|
||||||
</Page>
|
</Page>
|
||||||
)
|
)
|
||||||
|
|
10
apps/presentationeditor/mobile/src/view/Preview.jsx
Normal file
10
apps/presentationeditor/mobile/src/view/Preview.jsx
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const Preview = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Preview;
|
|
@ -17,7 +17,7 @@ const ToolbarView = props => {
|
||||||
</NavLeft>
|
</NavLeft>
|
||||||
{!Device.phone && <NavTitle>{props.docTitle}</NavTitle>}
|
{!Device.phone && <NavTitle>{props.docTitle}</NavTitle>}
|
||||||
<NavRight>
|
<NavRight>
|
||||||
<Link className={(props.disabledControls || props.disabledPreview) && 'disabled'} icon='icon-play' href={false}></Link>
|
<Link className={(props.disabledControls || props.disabledPreview) && 'disabled'} icon='icon-play' href={false} onClick={() => {props.openOptions('preview')}}></Link>
|
||||||
{props.isEdit && EditorUIController.getToolbarOptions({
|
{props.isEdit && EditorUIController.getToolbarOptions({
|
||||||
disabledAdd: props.disabledAdd || props.disabledControls,
|
disabledAdd: props.disabledAdd || props.disabledControls,
|
||||||
disabledEdit: props.disabledEdit || props.disabledControls,
|
disabledEdit: props.disabledEdit || props.disabledControls,
|
||||||
|
|
Loading…
Reference in a new issue