diff --git a/config.xml b/config.xml
index cbb58a5..21c1484 100644
--- a/config.xml
+++ b/config.xml
@@ -1,99 +1,91 @@
-
+
ionic2-angularfire-login
An awesome Ionic/Cordova app.
Ionic Framework Team
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/ionic.config.json b/ionic.config.json
index e14d27a..23bb85d 100644
--- a/ionic.config.json
+++ b/ionic.config.json
@@ -1,5 +1,8 @@
{
"name": "pet",
"app_id": "",
- "type": "ionic-angular"
+ "type": "ionic-angular",
+ "integrations": {
+ "cordova": {}
+ }
}
diff --git a/package.json b/package.json
index 280cabe..b79802d 100644
--- a/package.json
+++ b/package.json
@@ -25,27 +25,51 @@
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic/storage": "2.0.1",
- "angularfire2": "^4.0.0-rc.1",
- "firebase": "^4.2.0",
+ "angularfire2": "^5.0.0-rc.8.1-next",
+ "cordova-android": "7.0.0",
+ "cordova-plugin-console": "^1.0.5",
+ "cordova-plugin-device": "^1.1.4",
+ "cordova-plugin-facebook4": "^1.7.4",
+ "cordova-plugin-splashscreen": "^4.0.3",
+ "cordova-plugin-statusbar": "^2.2.2",
+ "cordova-plugin-whitelist": "^1.3.1",
+ "firebase": "^4.13.1",
"font-awesome": "^4.7.0",
- "ionic-angular": "3.6.0",
+ "ionic-angular": "^3.6.0",
+ "ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
- "rxjs": "5.4.0",
+ "rxjs": "^5.5.2",
"sw-toolbox": "3.6.0",
"tslint-config-airbnb": "^5.2.1",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "2.1.3",
- "@ionic/cli-plugin-ionic-angular": "1.4.0",
"cz-conventional-changelog": "^2.0.0",
"ionic": "3.6.0",
- "typescript": "2.3.4"
+ "typescript": "^2.3.4"
},
"description": "An Ionic project",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
+ },
+ "cordova": {
+ "plugins": {
+ "ionic-plugin-keyboard": {},
+ "cordova-plugin-whitelist": {},
+ "cordova-plugin-console": {},
+ "cordova-plugin-statusbar": {},
+ "cordova-plugin-device": {},
+ "cordova-plugin-splashscreen": {},
+ "cordova-plugin-facebook4": {
+ "APP_ID": "164514030629246",
+ "APP_NAME": "ionic2-angularfire-login"
+ }
+ },
+ "platforms": [
+ "android"
+ ]
}
-}
+}
\ No newline at end of file
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 1d492da..5f604f9 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -11,20 +11,21 @@ import { IonicStorageModule } from '@ionic/storage';
import { HttpModule } from '@angular/http';
import { AngularFireModule } from 'angularfire2';
-import { AngularFireAuthModule } from 'angularfire2/auth';
+import { AngularFireAuthModule, AngularFireAuth } from 'angularfire2/auth';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { AuthProvider } from '../providers/auth/auth';
import { DataProvider } from '../providers/data/data';
import { FunctionsProvider } from '../providers/functions/functions';
+import { AngularFireDatabase } from 'angularfire2/database-deprecated';
const firebaseConfig = {
- apiKey: 'AIzaSyDcbsUEReGm_dlijVXC1sMCcqKpCsXt0nQ',
- authDomain: 'ionic2-angularfire-login-14ea3.firebaseapp.com',
- databaseURL: 'https://ionic2-angularfire-login-14ea3.firebaseio.com',
- projectId: 'ionic2-angularfire-login-14ea3',
- storageBucket: 'ionic2-angularfire-login-14ea3.appspot.com',
- messagingSenderId: '438127821589'
+ apiKey: 'AIzaSyDiefO8-tolzxMVp-WQE32w5ePFQ4CSmho',
+ authDomain: 'tyreexpress-d3dde.firebaseapp.com',
+ databaseURL: 'https://tyreexpress-d3dde.firebaseio.com',
+ projectId: 'tyreexpress-d3dde',
+ storageBucket: '',
+ messagingSenderId: '660971527421'
};
@NgModule({
@@ -51,6 +52,8 @@ const firebaseConfig = {
{ provide: ErrorHandler, useClass: IonicErrorHandler },
AuthProvider,
DataProvider,
+ AngularFireAuth,
+ AngularFireDatabase,
FunctionsProvider,
FunctionsProvider
]
diff --git a/src/pages/auth/password/password.html b/src/pages/auth/password/password.html
index 4778c9c..260042b 100644
--- a/src/pages/auth/password/password.html
+++ b/src/pages/auth/password/password.html
@@ -12,10 +12,10 @@
-
Em breve você receberá um email para resetar a sua nova senha.
+ You will soon receive an email to reset your new password.
{{errorMessage}}
@@ -23,7 +23,7 @@
diff --git a/src/pages/auth/password/password.ts b/src/pages/auth/password/password.ts
index 3494a90..86aa2db 100644
--- a/src/pages/auth/password/password.ts
+++ b/src/pages/auth/password/password.ts
@@ -16,9 +16,9 @@ export class Password {
hasError: boolean;
errorMessage: string;
emailSent: boolean;
-
+
constructor(
- private navCtrl: NavController,
+ private navCtrl: NavController,
private loadingCtrl: LoadingController,
private formBuilder: FormBuilder,
private auth: AuthProvider
@@ -30,7 +30,7 @@ export class Password {
signInWithEmail() {
const loading = this.loadingCtrl.create({
- content: 'Por favor, aguarde...'
+ content: 'Please wait...'
});
loading.present();
@@ -42,10 +42,10 @@ export class Password {
loading.dismiss();
switch (error.code) {
case 'auth/invalid-email':
- this.errorMessage = 'Insira um email válido.';
+ this.errorMessage = 'Please enter a valid email address.';
break;
case 'auth/user-not-found':
- this.errorMessage = 'Nenhum usuário com este email encontrado.';
+ this.errorMessage = 'No user with this email found.';
break;
default:
this.errorMessage = error;
diff --git a/src/pages/auth/signin/signin.html b/src/pages/auth/signin/signin.html
index 10d3c92..4079af7 100644
--- a/src/pages/auth/signin/signin.html
+++ b/src/pages/auth/signin/signin.html
@@ -6,29 +6,29 @@
-
+
- Esqueceu a senha?
+ Forgot password?
{{errorMessage}}
- OU
+ OR
diff --git a/src/pages/auth/signin/signin.ts b/src/pages/auth/signin/signin.ts
index 6c311be..a3247a4 100644
--- a/src/pages/auth/signin/signin.ts
+++ b/src/pages/auth/signin/signin.ts
@@ -16,10 +16,10 @@ export class Signin {
form : FormGroup;
hasError: boolean;
errorMessage: string;
-
+
constructor(
private app: App,
- private navCtrl: NavController,
+ private navCtrl: NavController,
private loadingCtrl: LoadingController,
private modalCtrl: ModalController,
private formBuilder: FormBuilder,
@@ -34,7 +34,7 @@ export class Signin {
signInWithEmail() {
const loading = this.loadingCtrl.create({
- content: 'Por favor, aguarde...'
+ content: 'Please wait...'
});
loading.present();
@@ -46,13 +46,13 @@ export class Signin {
loading.dismiss();
switch (error.code) {
case 'auth/invalid-email':
- this.errorMessage = 'Insira um email válido.';
+ this.errorMessage = 'Please enter a valid email address.';
break;
case 'auth/wrong-password':
- this.errorMessage = 'Combinação de usuário e senha incorreta.';
+ this.errorMessage = 'Incorrect username and password combination.';
break;
case 'auth/user-not-found':
- this.errorMessage = 'Combinação de usuário e senha incorreta.';
+ this.errorMessage = 'Incorrect username and password combination.';
break;
default:
this.errorMessage = error;
diff --git a/src/pages/auth/signup/signup.html b/src/pages/auth/signup/signup.html
index 5392ee1..ec65772 100644
--- a/src/pages/auth/signup/signup.html
+++ b/src/pages/auth/signup/signup.html
@@ -10,12 +10,12 @@
-
+
{{errorMessage}}
@@ -25,7 +25,7 @@
diff --git a/src/pages/auth/signup/signup.ts b/src/pages/auth/signup/signup.ts
index 27e8738..17274c0 100644
--- a/src/pages/auth/signup/signup.ts
+++ b/src/pages/auth/signup/signup.ts
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
-import { IonicPage, App, NavController, LoadingController,
+import { IonicPage, App, NavController, LoadingController,
ModalController } from 'ionic-angular';
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
import { Storage } from '@ionic/storage';
@@ -17,7 +17,7 @@ export class Signup {
form : FormGroup;
hasError: boolean;
errorMessage: string;
-
+
constructor(
private app: App,
private navCtrl: NavController,
@@ -35,7 +35,7 @@ export class Signup {
signUp() {
const loading = this.loadingCtrl.create({
- content: 'Estamos criando um usuário para você...'
+ content: 'We are creating a user for you ...'
});
loading.present();
@@ -46,13 +46,13 @@ export class Signup {
loading.dismiss();
switch (error.code) {
case 'auth/invalid-email':
- this.errorMessage = 'Insira um email válido.';
+ this.errorMessage = 'Please enter a valid email address.';
break;
case 'auth/weak-password':
- this.errorMessage = 'A senha deve possuir pelo menos 6 caracteres.';
+ this.errorMessage = 'The password must be at least 6 characters long.';
break;
case 'auth/email-already-in-use':
- this.errorMessage = 'Este email já foi usado em outra conta.';
+ this.errorMessage = 'This email has already been used for another account.';
break;
default:
this.errorMessage = error;
@@ -61,7 +61,7 @@ export class Signup {
this.hasError = true;
});
}
-
+
navigatePop() {
this.navCtrl.pop();
}
diff --git a/src/providers/data/data.ts b/src/providers/data/data.ts
index 00fa3a3..914d3f7 100644
--- a/src/providers/data/data.ts
+++ b/src/providers/data/data.ts
@@ -1,6 +1,15 @@
import { Injectable } from '@angular/core';
-import { AngularFireDatabase, FirebaseListObservable,
- FirebaseObjectObservable } from 'angularfire2/database';
+// import { AngularFireDatabase, AngularFireList ,
+// } from 'angularfire2/database';
+// import { AngularFirebase, AngularFireList ,
+// } from 'angularfire2/database';
+// // tslint:disable-next-line:max-line-length
+// tslint:disable-next-line:max-line-length
+// import { FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database-deprecated';
+import { AngularFireAuth } from 'angularfire2/auth';
+
+// tslint:disable-next-line:max-line-length
+import { AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database-deprecated';
import { Observable } from 'rxjs/Observable';
@Injectable()
diff --git a/www/index.html b/www/index.html
index 00624ef..7eccc0c 100644
--- a/www/index.html
+++ b/www/index.html
@@ -1,9 +1,6 @@
-
Ionic App