Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new release 1.1.0 #90

Merged
merged 22 commits into from
Mar 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import React from "react";
import Nav from "./src/app/App";
import { I18nManager, Platform } from "react-native";
import { I18nManager } from "react-native";
import clone from "lodash/clone";

export default class App extends React.Component {
async componentWillMount() {
try {
//I18nManager.swapLeftAndRightInRTL(true)

// if (Platform.OS === "android") await I18nManager.forceRTL(true);
if(!I18nManager.isRTL)
await I18nManager.forceRTL(true);
console.log("I18nManager:", I18nManager);
} catch (e) {
console.warn("RTL Error", e);
}
Expand Down
11 changes: 8 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,25 @@
"name": "מהפכה של שמחה",
"description": "אפליקציה לעידוד התנדבויות בבתי חולים",
"slug": "StartachHapRev",
"version": "1.0.9",
"version": "1.1.0",
"icon": "./src/images/logo512x512.png",
"sdkVersion": "26.0.0",
"privacy": "public",
"ios": {
"bundleIdentifier": "com.startach.HapRev"
},
"android": {
"versionCode": 9,
"versionCode": 10,
"package": "com.startach.HapRev",
"adaptiveIcon": {
"foregroundImage": "./src/images/logo512x512.png",
"backgroundColor": "#FFFFFF"
}
},
"permissions": [
"CALENDAR",
"CAMERA_ROLL",
"NOTIFICATIONS"
]
},
"notification": {
"icon":"./src/images/logo512x512.png"
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haprev",
"version": "1.0.9",
"version": "1.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "1.9.0",
Expand All @@ -20,17 +20,17 @@
},
"dependencies": {
"expo": "^26.0.0",
"firebase": "^4.11.0",
"firebase": "^4.13.1",
"react": "16.3.0-alpha.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz",
"react-native-calendars": "^1.17.0",
"react-native-easy-toast": "^1.1.0",
"react-native-calendars": "^1.22.0",
"react-native-easy-toast": "^1.2.0",
"react-native-modal-datetime-picker": "^5.1.0",
"react-native-swiper": "^1.5.13",
"react-native-swiper": "^1.5.14",
"react-navigation": "^1.5.8",
"react-redux": "^5.0.6",
"react-redux": "^5.1.1",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
"remote-redux-devtools": "^0.5.12"
"redux-thunk": "^2.3.0",
"remote-redux-devtools": "^0.5.16"
}
}
80 changes: 80 additions & 0 deletions src/components/CustomPicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import React, { Component } from 'react';
import { View, Text, StyleSheet, TouchableHighlight, Modal, TouchableOpacity } from 'react-native';


export default class CustomPicker extends Component {
constructor (props) {
super(props);

this.state = {
pickerSelection: props.items[props.defaultIndex],
pickerDisplayed: false
}
}

setPickerValue (newValue, newIndex) {
this.setState({
pickerSelection: newValue
})

this.props.onValueChange(newValue, newIndex)

this.togglePicker();
}

togglePicker () {
this.setState({
pickerDisplayed: !this.state.pickerDisplayed
})
}

render () {
return (
<View style={[styles.container, this.props.containerStyle]}>
<TouchableOpacity
style={{backgroundColor: 'transparent'}}
onPress={() => this.togglePicker()}
underlayColor='#fff'>
<Text style={{color: 'white'}}>{this.state.pickerSelection.name}</Text>
</TouchableOpacity>
<Modal visible={this.state.pickerDisplayed} animationType={"slide"} transparent={true} onRequestClose={() => this.setState({pickerDisplayed:false})}>
<View style={styles.modalView}>
<Text style={styles.pickerHeaderText}>אנא בחר בית חולים</Text>
{this.props.items.map((value, index) =>
<TouchableHighlight key={index} onPress={() => this.setPickerValue(value, index)}
style={{ paddingTop: 4, paddingBottom: 4 }}>
<Text>{value.name}</Text>
</TouchableHighlight>
)}
<TouchableHighlight onPress={() => this.togglePicker()}
style={{ paddingTop: 4, paddingBottom: 4 }}>
<Text style={{ color: '#999' }}>ביטול</Text>
</TouchableHighlight>
</View>
</Modal>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
pickerHeaderText: {
fontWeight: 'bold'
},
modalView: {
margin: 20, padding: 20,
backgroundColor: '#efefef',
bottom: 20,
left: 20,
right: 20,
alignItems: 'center',
position: 'absolute'
}
});

2 changes: 1 addition & 1 deletion src/nav/SideMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const styles = StyleSheet.create({
userImage:{
width:85,
height:85,
borderRadius:50,
borderRadius:85/2,
borderWidth:1,
borderColor: '#ffffff',
marginBottom:5,
Expand Down
Loading