You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Improved init sequence
This commit is contained in:
@ -44,21 +44,31 @@ class ActionButtonComponent extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ReactNativeActionButton buttonColor="rgba(231,76,60,1)">
|
||||
let buttons = [];
|
||||
|
||||
<ReactNativeActionButton.Item buttonColor='#9b59b6' title="New todo" onPress={() => { this.newTodo_press() }}>
|
||||
if (this.props.folders.length) {
|
||||
buttons.push(
|
||||
<ReactNativeActionButton.Item key="ab_todo" buttonColor='#9b59b6' title="New todo" onPress={() => { this.newTodo_press() }}>
|
||||
<Icon name="md-checkbox-outline" style={styles.actionButtonIcon} />
|
||||
</ReactNativeActionButton.Item>
|
||||
);
|
||||
|
||||
<ReactNativeActionButton.Item buttonColor='#9b59b6' title="New note" onPress={() => { this.newNote_press() }}>
|
||||
buttons.push(
|
||||
<ReactNativeActionButton.Item key="ab_note" buttonColor='#9b59b6' title="New note" onPress={() => { this.newNote_press() }}>
|
||||
<Icon name="md-document" style={styles.actionButtonIcon} />
|
||||
</ReactNativeActionButton.Item>
|
||||
);
|
||||
}
|
||||
|
||||
<ReactNativeActionButton.Item buttonColor='#3498db' title="New folder" onPress={() => { this.newFolder_press() }}>
|
||||
<Icon name="md-folder" style={styles.actionButtonIcon} />
|
||||
</ReactNativeActionButton.Item>
|
||||
buttons.push(
|
||||
<ReactNativeActionButton.Item key="ab_folder" buttonColor='#3498db' title="New folder" onPress={() => { this.newFolder_press() }}>
|
||||
<Icon name="md-folder" style={styles.actionButtonIcon} />
|
||||
</ReactNativeActionButton.Item>
|
||||
);
|
||||
|
||||
return (
|
||||
<ReactNativeActionButton buttonColor="rgba(231,76,60,1)">
|
||||
{ buttons }
|
||||
</ReactNativeActionButton>
|
||||
);
|
||||
}
|
||||
@ -66,7 +76,9 @@ class ActionButtonComponent extends React.Component {
|
||||
|
||||
const ActionButton = connect(
|
||||
(state) => {
|
||||
return {};
|
||||
return {
|
||||
folders: state.folders,
|
||||
};
|
||||
}
|
||||
)(ActionButtonComponent)
|
||||
|
||||
|
Reference in New Issue
Block a user