const React = require('react'); const Component = React.Component; const { View, Button, Text, TextInput, TouchableOpacity } = require('react-native'); const { connect } = require('react-redux'); const { ScreenHeader } = require('lib/components/screen-header.js'); const { _ } = require('lib/locale.js'); const { BaseScreenComponent } = require('lib/components/base-screen.js'); const DialogBox = require('react-native-dialogbox').default; const { dialogs } = require('lib/dialogs.js'); const Shared = require('lib/components/shared/dropbox-login-shared'); class DropboxLoginScreenComponent extends BaseScreenComponent { constructor() { super(); this.shared_ = new Shared( this, (msg) => dialogs.info(this, msg), (msg) => dialogs.error(this, msg) ); } componentWillMount() { this.shared_.refreshUrl(); } render() { return ( {_('To allow Joplin to synchronise with Dropbox, please follow the steps below:')} {_('Step 1: Open this URL in your browser to authorise the application:')} {this.state.loginUrl} {_('Step 2: Enter the code provided by Dropbox:')} { this.dialogbox = dialogbox }}/> ); } } const DropboxLoginScreen = connect( (state) => { return {}; } )(DropboxLoginScreenComponent) module.exports = { DropboxLoginScreen };