diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 8d238cc90..4352f6615 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -23,5 +23,19 @@ "Slide title": "Slide title" } } + }, + "View": { + "Settings": { + "textDone": "Done", + "textSettings": "Settings", + "textFindAndReplace": "Find and replace", + "textPresentationSettings": "Presentation Settings", + "textApplicationSettings": "Application Settings", + "textDownload": "Download", + "textPrint": "Print", + "textPresentationInfo": "Presentation Info", + "textHelp": "Help", + "textAbout": "About" + } } } \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/page/main.jsx b/apps/presentationeditor/mobile/src/page/main.jsx index b2bb7fdde..34f6e04ae 100644 --- a/apps/presentationeditor/mobile/src/page/main.jsx +++ b/apps/presentationeditor/mobile/src/page/main.jsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { Page, View, Navbar, NavLeft, NavRight, Link, Icon } from 'framework7-react'; // import EditOptions from '../view/edit/Edit'; -// import Settings from '../view/settings/Settings'; +import Settings from '../view/settings/Settings'; import CollaborationView from '../../../../common/mobile/lib/view/Collaboration.jsx' export default class MainPage extends Component { @@ -44,12 +44,11 @@ export default class MainPage extends Component { }; render() { - console.log(this.$f7router) return ( {/* Top Navbar */} -
+ {/*
*/} @@ -66,10 +65,10 @@ export default class MainPage extends Component { {/*!this.state.editOptionsVisible ? null :*/} {/**/} {/*}*/} - {/*{*/} - {/*!this.state.settingsVisible ? null :*/} - {/**/} - {/*}*/} + { + !this.state.settingsVisible ? null : + + } { !this.state.collaborationVisible ? null : diff --git a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx new file mode 100644 index 000000000..47dcc250c --- /dev/null +++ b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx @@ -0,0 +1,116 @@ +import React, {Component, useEffect} from 'react'; +import {View,Page,Navbar,NavRight,Link,Popup,Popover,Icon,ListItem,List} from 'framework7-react'; +import { withTranslation } from 'react-i18next'; +import {f7} from 'framework7-react'; +import {Device} from '../../../../../common/mobile/utils/device'; + +const routes = [ + { + path: '/', + component: 'TSettingsView' + }, + /*{ + path: '/presentation-settings/', + component: PresentationSettingsController, + }, + { + path: "/presentation-info/", + component: PresentationInfoController, + }*/ +]; + + +const SettingsList = withTranslation()(props => { + const {t} = props; + const _t = t('View.Settings', {returnObjects: true}); + const navbar = + {!props.inPopover && {_t.textDone}} + ; + + const onoptionclick = page => { + if ( props.onOptionClick ) + props.onOptionClick(page) + }; + + return ( + + + {navbar} + + {!props.inPopover && + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + ) +}); + +class SettingsView extends Component { + constructor(props) { + super(props); + + this.onoptionclick = this.onoptionclick.bind(this); + } + + onoptionclick(page){ + this.$f7.views.current.router.navigate(page); + } + + render() { + const show_popover = this.props.usePopover; + return ( + show_popover ? + this.props.onclosed()}> + + : + this.props.onclosed()}> + + + ) + } +} + +const Settings = props => { + useEffect(() => { + if ( Device.phone ) + f7.popup.open('.settings-popup'); + else f7.popover.open('#settings-popover', '#btn-settings'); + + return () => { + } + }); + + + const onviewclosed = () => { + if ( props.onclosed ) + props.onclosed(); + }; + + return +}; + +export default Settings; \ No newline at end of file