From dec0f71730226286c166a10b408d496f16487627 Mon Sep 17 00:00:00 2001 From: idanlevi Date: Fri, 8 Feb 2019 16:30:24 +0200 Subject: [PATCH 1/5] ios toast backgroud color --- src/views/adminActivities/EventView.js | 2 +- src/views/institutes/EventRegistrationView.js | 2 +- src/views/notification/Settings.js | 2 +- src/views/register/RegisterView.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/adminActivities/EventView.js b/src/views/adminActivities/EventView.js index ac574b2..9d1593e 100644 --- a/src/views/adminActivities/EventView.js +++ b/src/views/adminActivities/EventView.js @@ -288,7 +288,7 @@ class EventView extends Component { : null } - + ) } diff --git a/src/views/institutes/EventRegistrationView.js b/src/views/institutes/EventRegistrationView.js index 56b462e..5fba533 100644 --- a/src/views/institutes/EventRegistrationView.js +++ b/src/views/institutes/EventRegistrationView.js @@ -57,7 +57,7 @@ class EventRegistrationView extends Component { render() { return ( - + {this.props.registeredNow ? diff --git a/src/views/notification/Settings.js b/src/views/notification/Settings.js index 9005009..75dfd64 100644 --- a/src/views/notification/Settings.js +++ b/src/views/notification/Settings.js @@ -73,7 +73,7 @@ class Settings extends React.Component{ - + ) diff --git a/src/views/register/RegisterView.js b/src/views/register/RegisterView.js index cf45992..ccb57c6 100644 --- a/src/views/register/RegisterView.js +++ b/src/views/register/RegisterView.js @@ -218,7 +218,7 @@ class RegisterView extends React.Component { - + );} }; From 87114cb8dbd6e6b26ef9cb28e0f84f64c6f8f33c Mon Sep 17 00:00:00 2001 From: idanlevi Date: Mon, 11 Feb 2019 19:58:57 +0200 Subject: [PATCH 2/5] ImagePicker ios - fix --- src/nav/SideMenu.js | 2 +- .../adminActivities/AdminActivityView.js | 2 +- src/views/register/RegisterView.js | 39 ++++++++++++------- src/views/register/RegisterViewStyles.js | 2 +- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/nav/SideMenu.js b/src/nav/SideMenu.js index d1020ea..2e09442 100644 --- a/src/nav/SideMenu.js +++ b/src/nav/SideMenu.js @@ -180,7 +180,7 @@ const styles = StyleSheet.create({ userImage:{ width:85, height:85, - borderRadius:50, + borderRadius:85/2, borderWidth:1, borderColor: '#ffffff', marginBottom:5, diff --git a/src/views/adminActivities/AdminActivityView.js b/src/views/adminActivities/AdminActivityView.js index d14fd60..e3f3f8b 100644 --- a/src/views/adminActivities/AdminActivityView.js +++ b/src/views/adminActivities/AdminActivityView.js @@ -111,7 +111,7 @@ class AdminActivityView extends Component{ onRequestClose={() => this.setState({displaySendMessagesDialog:true})} > { !this.props.process ? - + שלח הודעה למתנדבים {'\n'} { - let pickerResult = await ImagePicker.launchImageLibraryAsync({ - allowsEditing: true, - aspect: [4, 3], - quality: 0.8, - base64: true, - mediaTypes: ImagePicker.MediaTypeOptions.Images - }); - - if (!pickerResult.cancelled) { - disabled = !this.state.firstValidate || !this.state.lastValidate || !this.state.phoneValidate || !this.state.passwordValidate - this.setState({ avatarUrl: pickerResult.uri, disabled: disabled}); - let base64Img = `data:image/jpg;base64,${pickerResult.base64}` - this.base64Img = base64Img; + let cameraPermission = true; + if (Platform.OS === "ios"){ + const {status} = await Permissions.askAsync(Permissions.CAMERA_ROLL); + cameraPermission = status === 'granted'; + } + if(cameraPermission){ + const pickerResult = await ImagePicker.launchImageLibraryAsync({ + allowsEditing: true, + aspect: [4, 3], + quality: 0.8, + base64: true, + mediaTypes: ImagePicker.MediaTypeOptions.Images + }); + + if (!pickerResult.cancelled) { + const disabled = !this.state.firstValidate || !this.state.lastValidate || !this.state.phoneValidate || !this.state.passwordValidate + this.setState({ avatarUrl: pickerResult.uri, disabled: disabled}); + let base64Img = `data:image/jpg;base64,${pickerResult.base64}` + this.base64Img = base64Img; + } + } else { + alert('אתה חייב לאשר גישה ללוח השנה של המכשיר בכדי לעדכן אותו'); } }; diff --git a/src/views/register/RegisterViewStyles.js b/src/views/register/RegisterViewStyles.js index 187aaf5..256e2a8 100644 --- a/src/views/register/RegisterViewStyles.js +++ b/src/views/register/RegisterViewStyles.js @@ -33,7 +33,7 @@ export default StyleSheet.create({ marginTop: 15, width: 135, height: 135, - borderRadius: 100, + borderRadius: 135 / 2, borderWidth: 1, borderColor: '#fff' }, From 19b82d037532f171f49077429d88ec8a8730b288 Mon Sep 17 00:00:00 2001 From: idanlevi Date: Sat, 16 Feb 2019 21:23:07 +0200 Subject: [PATCH 3/5] adminActivityList fix vew ios --- src/views/adminActivities/AdminActivitiyList.js | 1 - src/views/adminActivities/AdminActivitiyListView.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/adminActivities/AdminActivitiyList.js b/src/views/adminActivities/AdminActivitiyList.js index b522b86..e3bc728 100644 --- a/src/views/adminActivities/AdminActivitiyList.js +++ b/src/views/adminActivities/AdminActivitiyList.js @@ -77,7 +77,6 @@ class AdminActivitiyList extends React.Component { } render() { - const {navigation:{navigate}} =this.props; return ( { const ActivityItem = ({activity, index, openActivity, participants}) => { return {openActivity(activity,participants[index])}}> - {activity.date} + {activity.date} | - {renderCaptionText(activity.caption)} + {renderCaptionText(activity.caption)} | - {renderParticipantsText(participants[index])} + {renderParticipantsText(participants[index])} From 7fc60f49dc4efe469b6865f6692b85b64d0a3063 Mon Sep 17 00:00:00 2001 From: idanlevi Date: Sat, 16 Feb 2019 21:23:21 +0200 Subject: [PATCH 4/5] create activity view - fix ios --- .../adminActivities/CreateActivityView.js | 108 +++++++++--------- src/views/adminActivities/styles.js | 29 ++++- 2 files changed, 77 insertions(+), 60 deletions(-) diff --git a/src/views/adminActivities/CreateActivityView.js b/src/views/adminActivities/CreateActivityView.js index 6b9a95c..3d1f59b 100644 --- a/src/views/adminActivities/CreateActivityView.js +++ b/src/views/adminActivities/CreateActivityView.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import {View, Text, TextInput, KeyboardAvoidingView, Keyboard, TouchableOpacity, Modal, TouchableWithoutFeedback, Switch, ActivityIndicator} from "react-native"; +import {View, Text, TextInput, KeyboardAvoidingView, Keyboard, TouchableOpacity, Modal, TouchableWithoutFeedback, Switch, ActivityIndicator, ScrollView} from "react-native"; import DateTimePicker from 'react-native-modal-datetime-picker'; import {CreateActivityStyle as styles } from './styles'; import {sendNotificationToAllUsers} from '../notification/NotificationService'; @@ -72,7 +72,7 @@ class CreateActivityView extends Component { } getModalMessage(hospital) { return ( - + {this.state.success ? 'פעילות נוספה בהצלחה' +'\n' + this.state.activityName + '\nבתאריך ' + this.state.fullDate + '\nבשעה ' +this.state.fullTime + '\nבבית חולים ' + hospital : 'שגיאה! נסה שנית מאוחר יותר' } @@ -88,61 +88,61 @@ class CreateActivityView extends Component { const { hospital, first, last } = this.props; return ( - - - שם הרכז - {first +' '+ last} - מקום פעילות - {hospital} - שם הפעילות - { this.setState({activityName:text,isButtonDisabled: !(text.length > 0)}) } } - value={this.state.activityName} - maxLength={60} - /> - - בחר תאריך וזמן פעילות - - - { - this.state.fullTime ? - 'תאריך: ' + this.state.fullDate + ' שעה: ' + this.state.fullTime - : this.alertDate - } - - - לשלוח התראות על האירוע לכל המשתמשים? - this.setState({notificationToAll:!this.state.notificationToAll})} - value={this.state.notificationToAll} + + + שם הרכז + {first +' '+ last} + מקום פעילות + {hospital} + שם הפעילות + { this.setState({activityName:text,isButtonDisabled: !(text.length > 0)}) } } + value={this.state.activityName} + maxLength={60} /> - - + + בחר תאריך וזמן פעילות + + { - !this.state.loading ? - אישור - : + this.state.fullTime ? + 'תאריך: ' + this.state.fullDate + ' שעה: ' + this.state.fullTime + : this.alertDate + } + - שולח התראות - + לשלוח התראות על האירוע לכל המשתמשים? + this.setState({notificationToAll:!this.state.notificationToAll})} + value={this.state.notificationToAll} + /> - } - - + + { + !this.state.loading ? + אישור + : + + שולח התראות + + + } + + { this.state.success ? this.backToList() : this.setState({modalVisible:false})}} > אישור diff --git a/src/views/adminActivities/styles.js b/src/views/adminActivities/styles.js index 915079e..f0a9bd8 100644 --- a/src/views/adminActivities/styles.js +++ b/src/views/adminActivities/styles.js @@ -207,7 +207,7 @@ const adminActivityListStyle = StyleSheet.create({ }, userImage: { marginBottom: 10, - borderRadius: 100, + borderRadius: 65 / 2, width: 65, height: 65 }, @@ -247,7 +247,22 @@ const adminActivityListStyle = StyleSheet.create({ justifyContent: "space-around", alignItems: "center", backgroundColor: "#ddd" - } + }, + dateText:{ + width: '25%', + paddingRight: 2, + textAlign: 'left', + }, + captionText:{ + width: '35%', + paddingRight: 2, + textAlign: 'left', + }, + participantsText:{ + width: '25%', + paddingRight: 2, + textAlign: 'left', + }, }); const CreateActivityStyle = StyleSheet.create({ @@ -256,7 +271,10 @@ const CreateActivityStyle = StyleSheet.create({ justifyContent: "center", alignContent: "center", borderWidth: 2, - borderColor: "#D81A4C" + borderColor: "#D81A4C", + }, + scrollContainer:{ + paddingVertical: 20 }, name: { height: 100 @@ -304,13 +322,12 @@ const CreateActivityStyle = StyleSheet.create({ }, modalContainer: { marginTop: "40%", - justifyContent: "center", alignSelf: "center", backgroundColor: "#B4B7BA", - height: "35%", + height: "45%", width: "90%", borderWidth: 2, - borderRadius: 15 + borderRadius: 10, } }); From 98707ac782bdabd02c0e2215009e4e6b7b042ae6 Mon Sep 17 00:00:00 2001 From: idanlevi Date: Tue, 19 Feb 2019 01:13:42 +0200 Subject: [PATCH 5/5] modals design - ios fix --- src/views/activities/ActivitiesStyle.js | 11 ++++----- src/views/adminActivities/styles.js | 25 +++++++++++---------- src/views/eventsList/EventsListStyle.js | 6 ++--- src/views/help/HelpViewStyle.js | 10 ++++----- src/views/notification/Settings.js | 6 ++--- src/views/splash/InternetConnectionPopUp.js | 2 +- 6 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/views/activities/ActivitiesStyle.js b/src/views/activities/ActivitiesStyle.js index e185fc0..5f74501 100644 --- a/src/views/activities/ActivitiesStyle.js +++ b/src/views/activities/ActivitiesStyle.js @@ -1,4 +1,5 @@ -import { StyleSheet } from 'react-native'; +import { StyleSheet, Dimensions } from 'react-native'; +const { height } = Dimensions.get('screen'); export default StyleSheet.create({ container: { @@ -97,10 +98,10 @@ export default StyleSheet.create({ alignItems: 'center', alignSelf: "center", backgroundColor: "#B4B7BA", - marginTop: 100, - height: 300, + marginTop: height * 0.25, + height: height * 0.5, width: "90%", - borderRadius: 15 + borderRadius: 10, }, participantsContainer: { flex: 1, @@ -125,7 +126,7 @@ export default StyleSheet.create({ marginBottom: 3, width: 30, height: 30, - borderRadius: 100 + borderRadius: 30 / 2 }, withoutImgList: { margin: 5, diff --git a/src/views/adminActivities/styles.js b/src/views/adminActivities/styles.js index f0a9bd8..3fc7ea0 100644 --- a/src/views/adminActivities/styles.js +++ b/src/views/adminActivities/styles.js @@ -1,4 +1,5 @@ -import { StyleSheet } from "react-native"; +import { StyleSheet, Dimensions } from "react-native"; +const { height } = Dimensions.get('screen'); const adminActivityStyle = StyleSheet.create({ container: { @@ -26,7 +27,7 @@ const adminActivityStyle = StyleSheet.create({ marginBottom: 3, width: 35, height: 35, - borderRadius: 100 + borderRadius: 35 / 2 }, withoutImgList: { margin: 5, @@ -138,21 +139,21 @@ const modalActivityStyle = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', alignSelf: "center", - marginTop: "20%", - backgroundColor: "#B4B7BA", - height: 300, + marginTop: height * 0.2, + backgroundColor: '#c2185b', + height: height * 0.4, width: "90%", - borderRadius: 15, + borderRadius: 10, }, modalContainer: { - marginTop: "30%", + marginTop: height * 0.2, justifyContent: "center", alignSelf: "center", - backgroundColor: "#B4B7BA", - height: "80%", + backgroundColor: '#c2185b', + height: height * 0.4, width: "90%", borderWidth: 2, - borderRadius: 15 + borderRadius: 10 }, title: { fontSize: 22, @@ -321,9 +322,9 @@ const CreateActivityStyle = StyleSheet.create({ paddingBottom: 20 }, modalContainer: { - marginTop: "40%", + marginTop: height * 0.25, alignSelf: "center", - backgroundColor: "#B4B7BA", + backgroundColor: '#c2185b', height: "45%", width: "90%", borderWidth: 2, diff --git a/src/views/eventsList/EventsListStyle.js b/src/views/eventsList/EventsListStyle.js index c07588a..b5dd71c 100644 --- a/src/views/eventsList/EventsListStyle.js +++ b/src/views/eventsList/EventsListStyle.js @@ -102,10 +102,10 @@ export default StyleSheet.create({ marginBottom: "30%", justifyContent: 'center', alignSelf:'center', - backgroundColor: '#B4B7BA', + backgroundColor: '#c2185b', width: '70%', borderWidth:2, - borderRadius:15, + borderRadius:10, }, participantItem: { marginHorizontal: "17.5%", @@ -121,7 +121,7 @@ export default StyleSheet.create({ marginBottom: 3, width: 30, height: 30, - borderRadius: 100 + borderRadius: 30/2 }, withoutImgList: { margin: 5, diff --git a/src/views/help/HelpViewStyle.js b/src/views/help/HelpViewStyle.js index ec7ad6c..ac0a6ff 100644 --- a/src/views/help/HelpViewStyle.js +++ b/src/views/help/HelpViewStyle.js @@ -1,4 +1,5 @@ -import { StyleSheet } from 'react-native'; +import { StyleSheet, Dimensions } from 'react-native'; +const { height } = Dimensions.get('screen'); export default StyleSheet.create({ container: { @@ -56,13 +57,12 @@ export default StyleSheet.create({ textAlign:'center', }, modalContainer: { - marginTop: "40%", + marginTop: height * 0.25, justifyContent: 'center', alignSelf:'center', - backgroundColor: '#B4B7BA', + backgroundColor: '#c2185b', height:'40%', width: '90%', - borderWidth:2, - borderRadius:15, + borderRadius:10, }, }); \ No newline at end of file diff --git a/src/views/notification/Settings.js b/src/views/notification/Settings.js index 75dfd64..a01ad9b 100644 --- a/src/views/notification/Settings.js +++ b/src/views/notification/Settings.js @@ -45,7 +45,7 @@ class Settings extends React.Component{ return( - + קבלת התראות - + ) @@ -114,7 +114,7 @@ const styles = StyleSheet.create({ fontWeight: "bold", textAlign: "center" }, - modalContainer: { + settingsContainer: { marginVertical: 15, padding: 2, justifyContent: 'center', diff --git a/src/views/splash/InternetConnectionPopUp.js b/src/views/splash/InternetConnectionPopUp.js index fa9825c..503a209 100644 --- a/src/views/splash/InternetConnectionPopUp.js +++ b/src/views/splash/InternetConnectionPopUp.js @@ -64,7 +64,7 @@ const styles = StyleSheet.create({ backgroundColor: '#B4B7BA', width: '70%', borderWidth:2, - borderRadius:15, + borderRadius:10, zIndex:9999, borderColor:'red' },