Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit fd37d59

Browse files
committed
fix numerous bugs
1 parent 513612f commit fd37d59

19 files changed

Lines changed: 173 additions & 109 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,14 @@ npm install
177177
hapiRemote: true
178178
},
179179
```
180-
* To run Hapi either locally on remotely on OpenShift, update the ```src/lib/config.js``` file as shown below:
180+
* To run Hapi either locally on remotely on OpenShift, update the
181+
```src/lib/config.js``` file as shown below. *Note:* use the ip
182+
from the `ifconfig` command. This ip matches the Hapi server setup.
181183

182184
```
183185
HAPI: {
184186
local: {
185-
url: 'http://127.0.0.1:5000'
187+
url: 'http://192.168.0.5:5000'
186188
},
187189
remote: {
188190
url: 'put your remote url here'

android/app/src/main/java/com/snowflake/MainActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.facebook.react.ReactActivity;
44
import com.burnweb.rnsimplealertdialog.RNSimpleAlertDialogPackage;
5+
import com.burnweb.rnsimplealertdialog.RNSimpleAlertDialogPackage;
56

67
public class MainActivity extends ReactActivity {
78

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<resources>
22

3+
34
<string name="app_name">snowflake</string>
45
</resources>

android/settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
rootProject.name = 'snowflake'
22

33
include ':app'
4+
45

56
//Added the following two lines
67
include ':RNSimpleAlertDialogModule', ':app'

ios/snowflake.xcodeproj/project.pbxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
};
66
objectVersion = 46;
77
objects = {
8-
98
/* Begin PBXBuildFile section */
109
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
1110
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snowflake",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"private": true,
55
"jest": {
66
"preset": "jest-react-native",

src/components/LoginForm.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ var LoginForm = React.createClass({
6666
maxLength: 12,
6767
editable: !this.props.form.isFetching,
6868
hasError: this.props.form.fields.usernameHasError,
69-
error: 'Must have 6-12 characters and/or numbers'
69+
error: this.props.form.fields.usernameErrorMsg
7070
};
7171

7272
let email = {
7373
label: 'Email',
7474
keyboardType: 'email-address',
7575
editable: !this.props.form.isFetching,
7676
hasError: this.props.form.fields.emailHasError,
77-
error: 'Please enter valid email'
77+
error: this.props.form.fields.emailErrorMsg
7878
};
7979

8080
let secureTextEntry = !this.props.form.fields.showPassword;
@@ -85,7 +85,7 @@ var LoginForm = React.createClass({
8585
secureTextEntry: secureTextEntry,
8686
editable: !this.props.form.isFetching,
8787
hasError: this.props.form.fields.passwordHasError,
88-
error: 'Must have 6-12 characters with at least 1 number and 1 special character'
88+
error: this.props.form.fields.passwordErrorMsg
8989
};
9090

9191
let passwordAgain= {
@@ -94,7 +94,7 @@ var LoginForm = React.createClass({
9494
maxLength: 12,
9595
editable: !this.props.form.isFetching,
9696
hasError: this.props.form.fields.passwordAgainHasError,
97-
error: 'Passwords must match'
97+
error: this.props.form.fields.passwordAgainErrorMsg
9898
};
9999

100100
let loginForm;
@@ -111,7 +111,9 @@ var LoginForm = React.createClass({
111111
passwordAgain: t.String
112112
});
113113
options.fields['username'] = username;
114+
options.fields['username'].autoCapitalize = 'none';
114115
options.fields['email'] = email;
116+
options.fields['email'].autoCapitalize = 'none';
115117
options.fields['password'] = password;
116118
options.fields['passwordAgain'] = passwordAgain;
117119
break;
@@ -126,6 +128,7 @@ var LoginForm = React.createClass({
126128
password: t.String
127129
});
128130
options.fields['username'] = username;
131+
options.fields['username'].autoCapitalize = 'none';
129132
options.fields['password'] = password;
130133
break;
131134

@@ -138,6 +141,7 @@ var LoginForm = React.createClass({
138141
email: t.String
139142
});
140143
options.fields['email'] = email;
144+
options.fields['email'].autoCapitalize = 'none';
141145
break;
142146
} //switch
143147

@@ -146,12 +150,12 @@ var LoginForm = React.createClass({
146150
* returns the Form component with the correct structures
147151
*/
148152
return (
149-
<Form ref="form"
150-
type={loginForm}
151-
options={options}
152-
value={this.props.value}
153-
onChange={this.props.onChange}
154-
/>
153+
<Form ref="form"
154+
type={loginForm}
155+
options={options}
156+
value={this.props.value}
157+
onChange={this.props.onChange}
158+
/>
155159

156160
);
157161
}

0 commit comments

Comments
 (0)