mirror of https://github.com/laurent22/joplin.git
Screen titles
parent
53d305eb2e
commit
80ad3e0dfd
|
@ -1,27 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux'
|
||||
import { ListView, Text, TouchableHighlight } from 'react-native';
|
||||
import { Log } from 'lib/log.js';
|
||||
import { ItemListComponent } from 'lib/components/item-list.js';
|
||||
import { Note } from 'lib/models/note.js';
|
||||
import { Folder } from 'lib/models/folder.js';
|
||||
import { _ } from 'lib/locale.js';
|
||||
import { NotesScreenUtils } from 'lib/components/screens/notes-utils.js'
|
||||
|
||||
class FolderListComponent extends ItemListComponent {
|
||||
|
||||
listView_itemPress(folderId) {
|
||||
NotesScreenUtils.openNoteList(folderId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const FolderList = connect(
|
||||
(state) => {
|
||||
return {
|
||||
items: state.folders,
|
||||
};
|
||||
}
|
||||
)(FolderListComponent)
|
||||
|
||||
export { FolderList };
|
|
@ -113,7 +113,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
|||
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader navState={this.props.navigation.state} />
|
||||
<ScreenHeader title={_('Configuration')}/>
|
||||
<View style={styles.body}>
|
||||
{ settingComps }
|
||||
</View>
|
||||
|
|
|
@ -88,7 +88,7 @@ class FolderScreenComponent extends BaseScreenComponent {
|
|||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader
|
||||
navState={this.props.navigation.state}
|
||||
title={_('Edit notebook')}
|
||||
showSaveButton={true}
|
||||
saveButtonDisabled={saveButtonDisabled}
|
||||
onSaveButtonPress={() => this.saveFolderButton_press()}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
import { View, Button, Picker, Text, StyleSheet } from 'react-native';
|
||||
import { connect } from 'react-redux'
|
||||
import { Log } from 'lib/log.js'
|
||||
import { FolderList } from 'lib/components/folder-list.js'
|
||||
import { ScreenHeader } from 'lib/components/screen-header.js';
|
||||
import { _ } from 'lib/locale.js';
|
||||
import { ActionButton } from 'lib/components/action-button.js';
|
||||
import { BaseScreenComponent } from 'lib/components/base-screen.js';
|
||||
|
||||
class FoldersScreenComponent extends BaseScreenComponent {
|
||||
|
||||
static navigationOptions(options) {
|
||||
return { header: null };
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader navState={this.props.navigation.state} />
|
||||
<FolderList noItemMessage={'There is currently no notebook. Create one by clicking on the (+) button.'} style={{flex: 1}}/>
|
||||
<ActionButton addFolderNoteButtons={true}></ActionButton>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const FoldersScreen = connect(
|
||||
(state) => {
|
||||
return {
|
||||
folders: state.folders,
|
||||
};
|
||||
}
|
||||
)(FoldersScreenComponent)
|
||||
|
||||
export { FoldersScreen };
|
|
@ -7,6 +7,7 @@ import { ScreenHeader } from 'lib/components/screen-header.js';
|
|||
import { time } from 'lib/time-utils'
|
||||
import { Logger } from 'lib/logger.js';
|
||||
import { BaseScreenComponent } from 'lib/components/base-screen.js';
|
||||
import { _ } from 'lib/locale.js';
|
||||
|
||||
class LogScreenComponent extends BaseScreenComponent {
|
||||
|
||||
|
@ -56,7 +57,7 @@ class LogScreenComponent extends BaseScreenComponent {
|
|||
// `enableEmptySections` is to fix this warning: https://github.com/FaridSafi/react-native-gifted-listview/issues/39
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader navState={this.props.navigation.state} />
|
||||
<ScreenHeader title={_('Log')}/>
|
||||
<ListView
|
||||
dataSource={this.state.dataSource}
|
||||
renderRow={renderRow}
|
||||
|
|
|
@ -275,7 +275,7 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||
if (this.state.isLoading) {
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader navState={this.props.navigation.state}/>
|
||||
<ScreenHeader/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -483,7 +483,6 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||
reg.scheduleSync();
|
||||
}
|
||||
}}
|
||||
navState={this.props.navigation.state}
|
||||
menuOptions={this.menuOptions()}
|
||||
showSaveButton={showSaveButton}
|
||||
saveButtonDisabled={saveButtonDisabled}
|
||||
|
|
|
@ -62,7 +62,7 @@ class NotesScreenComponent extends BaseScreenComponent {
|
|||
const { navigate } = this.props.navigation;
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader title={title} navState={this.props.navigation.state} menuOptions={this.menuOptions()} />
|
||||
<ScreenHeader title={title} menuOptions={this.menuOptions()} />
|
||||
<NoteList noItemMessage={_('There are currently no notes. Create one by clicking on the (+) button.')} style={{flex: 1}}/>
|
||||
<ActionButton addFolderNoteButtons={addFolderNoteButtons} parentFolderId={this.props.selectedFolderId}></ActionButton>
|
||||
<DialogBox ref={dialogbox => { this.dialogbox = dialogbox }}/>
|
||||
|
|
|
@ -88,7 +88,7 @@ class OneDriveLoginScreenComponent extends BaseScreenComponent {
|
|||
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader navState={this.props.navigation.state} />
|
||||
<ScreenHeader title={_('Login with OneDrive')}/>
|
||||
<WebView
|
||||
source={source}
|
||||
onNavigationStateChange={(o) => { this.webview_load(o); }}
|
||||
|
|
|
@ -115,7 +115,7 @@ class SearchScreenComponent extends BaseScreenComponent {
|
|||
render() {
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader navState={this.props.navigation.state} />
|
||||
<ScreenHeader title={_('Search')}/>
|
||||
<View style={styles.body}>
|
||||
<View style={styles.searchContainer}>
|
||||
<TextInput
|
||||
|
|
|
@ -77,7 +77,7 @@ class StatusScreenComponent extends BaseScreenComponent {
|
|||
|
||||
return (
|
||||
<View style={this.styles().screen}>
|
||||
<ScreenHeader navState={this.props.navigation.state} />
|
||||
<ScreenHeader title={_('Status')}/>
|
||||
<View style={styles.body}>
|
||||
{ body }
|
||||
</View>
|
||||
|
|
|
@ -32,7 +32,7 @@ class WelcomeScreenComponent extends BaseScreenComponent {
|
|||
|
||||
return (
|
||||
<View style={this.styles().screen} >
|
||||
<ScreenHeader navState={this.props.navigation.state}/>
|
||||
<ScreenHeader title={_('Welcome')}/>
|
||||
<Text style={styles.message}>{message}</Text>
|
||||
<ActionButton addFolderNoteButtons={true}/>
|
||||
</View>
|
||||
|
|
|
@ -22,7 +22,6 @@ import { NotesScreenUtils } from 'lib/components/screens/notes-utils.js'
|
|||
import { NoteScreen } from 'lib/components/screens/note.js'
|
||||
import { ConfigScreen } from 'lib/components/screens/config.js'
|
||||
import { FolderScreen } from 'lib/components/screens/folder.js'
|
||||
import { FoldersScreen } from 'lib/components/screens/folders.js'
|
||||
import { LogScreen } from 'lib/components/screens/log.js'
|
||||
import { StatusScreen } from 'lib/components/screens/status.js'
|
||||
import { WelcomeScreen } from 'lib/components/screens/welcome.js'
|
||||
|
|
Loading…
Reference in New Issue