1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Log screen in RN app

This commit is contained in:
Laurent Cozic
2017-07-07 18:19:24 +01:00
parent 216a6780cb
commit e0664167eb
6 changed files with 142 additions and 33 deletions

View File

@ -41,6 +41,13 @@ class ScreenHeaderComponent extends Component {
}
}
log_press() {
this.props.dispatch({
type: 'Navigation/NAVIGATE',
routeName: 'Log',
});
}
render() {
let key = 0;
let menuOptionComponents = [];
@ -56,10 +63,10 @@ class ScreenHeaderComponent extends Component {
menuOptionComponents.push(<View key={'menuOption_' + key++} style={styles.divider}/>);
}
// menuOptionComponents.push(
// <MenuOption value={1} key={'menuOption_' + key++}>
// <Text>{_('Configuration')}</Text>
// </MenuOption>);
menuOptionComponents.push(
<MenuOption value={() => this.log_press()} key={'menuOption_' + key++}>
<Text>{_('Log')}</Text>
</MenuOption>);
let title = 'title' in this.props && this.props.title !== null ? this.props.title : _(this.props.navState.routeName);