Skip to content

Commit c9829b8

Browse files
committed
profilepic
1 parent 8299f01 commit c9829b8

File tree

14 files changed

+471
-121
lines changed

14 files changed

+471
-121
lines changed

config.xml

Lines changed: 81 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,90 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1+
<?xml version='1.0' encoding='utf-8'?>
22
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>MyApp</name>
44
<description>An awesome Ionic/Cordova app.</description>
55
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
6-
<content src="index.html"/>
7-
<access origin="*"/>
8-
<allow-navigation href="http://ionic.local/*"/>
9-
<allow-intent href="http://*/*"/>
10-
<allow-intent href="https://*/*"/>
11-
<allow-intent href="tel:*"/>
12-
<allow-intent href="sms:*"/>
13-
<allow-intent href="mailto:*"/>
14-
<allow-intent href="geo:*"/>
15-
16-
<preference name="webviewbounce" value="false"/>
17-
<preference name="UIWebViewBounce" value="false"/>
18-
<preference name="DisallowOverscroll" value="true"/>
19-
<preference name="android-minSdkVersion" value="16"/>
20-
<preference name="BackupWebStorage" value="none"/>
21-
<preference name="SplashMaintainAspectRatio" value="true"/>
22-
<preference name="FadeSplashScreenDuration" value="300"/>
23-
24-
<!--
25-
Change these to configure how the splashscreen displays and fades in/out.
26-
More info here: https://github.com/apache/cordova-plugin-splashscreen
27-
-->
28-
<preference name="SplashShowOnlyFirstTime" value="false"/>
29-
<preference name="SplashScreen" value="screen"/>
30-
<preference name="SplashScreenDelay" value="3000"/>
31-
6+
<content src="index.html" />
7+
<access origin="*" />
8+
<allow-navigation href="http://ionic.local/*" />
9+
<allow-intent href="http://*/*" />
10+
<allow-intent href="https://*/*" />
11+
<allow-intent href="tel:*" />
12+
<allow-intent href="sms:*" />
13+
<allow-intent href="mailto:*" />
14+
<allow-intent href="geo:*" />
15+
<preference name="webviewbounce" value="false" />
16+
<preference name="UIWebViewBounce" value="false" />
17+
<preference name="DisallowOverscroll" value="true" />
18+
<preference name="android-minSdkVersion" value="16" />
19+
<preference name="BackupWebStorage" value="none" />
20+
<preference name="SplashMaintainAspectRatio" value="true" />
21+
<preference name="FadeSplashScreenDuration" value="300" />
22+
<preference name="SplashShowOnlyFirstTime" value="false" />
23+
<preference name="SplashScreen" value="screen" />
24+
<preference name="SplashScreenDelay" value="3000" />
3225
<platform name="android">
33-
<allow-intent href="market:*"/>
34-
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
35-
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
36-
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
37-
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
38-
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
39-
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
40-
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
41-
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
42-
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
43-
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
44-
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
45-
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
46-
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
47-
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
48-
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
49-
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
50-
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
51-
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
26+
<allow-intent href="market:*" />
27+
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
28+
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
29+
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
30+
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
31+
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
32+
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
33+
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
34+
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
35+
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
36+
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
37+
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
38+
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
39+
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
40+
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
41+
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
42+
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
43+
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
44+
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
5245
</platform>
53-
5446
<platform name="ios">
55-
<allow-intent href="itms:*"/>
56-
<allow-intent href="itms-apps:*"/>
57-
<icon src="resources/ios/icon/icon.png" width="57" height="57"/>
58-
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/>
59-
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/>
60-
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/>
61-
<icon src="resources/ios/icon/icon-40@3x.png" width="120" height="120"/>
62-
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/>
63-
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/>
64-
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/>
65-
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/>
66-
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/>
67-
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/>
68-
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/>
69-
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/>
70-
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/>
71-
<icon src="resources/ios/icon/icon-83.5@2x.png" width="167" height="167"/>
72-
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/>
73-
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/>
74-
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/>
75-
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
76-
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/>
77-
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/>
78-
<splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/>
79-
<splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
80-
<splash src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" height="2048"/>
81-
<splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
82-
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
83-
<splash src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" height="2732"/>
84-
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
85-
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
86-
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/>
47+
<allow-intent href="itms:*" />
48+
<allow-intent href="itms-apps:*" />
49+
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
50+
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
51+
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
52+
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
53+
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
54+
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
55+
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
56+
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
57+
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
58+
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
59+
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
60+
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
61+
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
62+
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
63+
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
64+
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
65+
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
66+
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
67+
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
68+
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
69+
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
70+
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
71+
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
72+
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
73+
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
74+
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
75+
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
76+
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
77+
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
78+
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
8779
</platform>
88-
89-
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
90-
<plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
91-
<plugin name="cordova-plugin-console" spec="1.0.5"/>
92-
<plugin name="cordova-plugin-statusbar" spec="2.2.2"/>
93-
<plugin name="cordova-plugin-device" spec="1.1.4"/>
94-
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
80+
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
81+
<plugin name="cordova-plugin-whitelist" spec="1.3.1" />
82+
<plugin name="cordova-plugin-console" spec="1.0.5" />
83+
<plugin name="cordova-plugin-statusbar" spec="2.2.2" />
84+
<plugin name="cordova-plugin-device" spec="1.1.4" />
85+
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
86+
<plugin name="cordova-plugin-filechooser" spec="~1.0.1" />
87+
<plugin name="cordova-plugin-filepath" spec="~1.0.2" />
88+
<plugin name="cordova-plugin-file" spec="~4.3.3" />
89+
<engine name="android" spec="~6.1.2" />
9590
</widget>

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"@angular/platform-browser": "4.1.2",
2222
"@angular/platform-browser-dynamic": "4.1.2",
2323
"@ionic-native/core": "3.10.2",
24+
"@ionic-native/file": "^3.12.1",
25+
"@ionic-native/file-chooser": "^3.12.1",
2426
"@ionic-native/splash-screen": "3.10.2",
2527
"@ionic-native/status-bar": "3.10.2",
2628
"@ionic/storage": "2.0.1",
@@ -34,6 +36,7 @@
3436
},
3537
"devDependencies": {
3638
"@ionic/app-scripts": "1.3.7",
39+
"@ionic/cli-plugin-cordova": "1.3.0",
3740
"@ionic/cli-plugin-ionic-angular": "1.3.0",
3841
"typescript": "2.3.3"
3942
},

src/app/app.module.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { ErrorHandler, NgModule } from '@angular/core';
33
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
44
import { SplashScreen } from '@ionic-native/splash-screen';
55
import { StatusBar } from '@ionic-native/status-bar';
6+
import { File } from '@ionic-native/file';
7+
import { FileChooser } from '@ionic-native/file-chooser';
8+
import { FilePath } from '@ionic-native/file-path';
69

710
import { config } from './app.firebaseconfig';
811

@@ -12,6 +15,7 @@ import { AngularFireModule } from 'angularfire2';
1215
import { MyApp } from './app.component';
1316
import { AuthProvider } from '../providers/auth/auth';
1417
import { UserProvider } from '../providers/user/user';
18+
import { ImghandlerProvider } from '../providers/imghandler/imghandler';
1519

1620

1721
@NgModule({
@@ -30,10 +34,14 @@ import { UserProvider } from '../providers/user/user';
3034
providers: [
3135
StatusBar,
3236
SplashScreen,
37+
File,
38+
FilePath,
39+
FileChooser,
3340
{provide: ErrorHandler, useClass: IonicErrorHandler},
3441
AuthProvider,
3542
AngularFireAuth,
36-
UserProvider
43+
UserProvider,
44+
ImghandlerProvider
3745
]
3846
})
3947
export class AppModule {}

src/pages/login/login.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ export class LoginPage {
3838
this.navCtrl.push('SignupPage');
3939
}
4040

41+
passwordreset() {
42+
this.navCtrl.push('PasswordresetPage');
43+
}
44+
4145
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--
2+
Generated template for the PasswordresetPage page.
3+
4+
See http://ionicframework.com/docs/components/#navigation for more info on
5+
Ionic pages and navigation.
6+
-->
7+
<ion-header>
8+
9+
</ion-header>
10+
11+
12+
<ion-content class="background">
13+
<ion-card>
14+
<ion-card-header>
15+
Password Reset
16+
</ion-card-header>
17+
<ion-card-content>
18+
<ion-list >
19+
<ion-item>
20+
<ion-input type="email" [(ngModel)]="email" placeholder="Email"></ion-input>
21+
</ion-item>
22+
<button ion-button block round outline color="light" (click)="reset()">Reset my Password</button>
23+
<button ion-button full clear color="light" (click)="goback()">Go Back</button>
24+
</ion-list>
25+
</ion-card-content>
26+
</ion-card>
27+
</ion-content>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { NgModule } from '@angular/core';
2+
import { IonicPageModule } from 'ionic-angular';
3+
import { PasswordresetPage } from './passwordreset';
4+
5+
@NgModule({
6+
declarations: [
7+
PasswordresetPage,
8+
],
9+
imports: [
10+
IonicPageModule.forChild(PasswordresetPage),
11+
],
12+
exports: [
13+
PasswordresetPage
14+
]
15+
})
16+
export class PasswordresetPageModule {}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
page-passwordreset {
2+
.background {
3+
background-image: url('../assets/bgimage.jpg');
4+
}
5+
.scroll-content {
6+
align-content: center;
7+
display: flex;
8+
flex-direction: column;
9+
justify-content: center;
10+
text-align: center;
11+
}
12+
ion-card.card {
13+
box-shadow: none;
14+
background: rgba(0, 0, 0, 0.5);
15+
border-radius: 5px;
16+
}
17+
a, p,
18+
ion-card-header.card-header {
19+
color: #fff!important;
20+
}
21+
22+
.list > .item-block:first-child {
23+
border: medium none;
24+
}
25+
26+
.item {
27+
margin-bottom: 10px;
28+
background: rgba(255, 255, 255, 0.5);
29+
border: medium none;
30+
31+
.text-input, {
32+
color: #fff;
33+
}
34+
35+
36+
input::-moz-placeholder{
37+
color: #fff!important;
38+
}
39+
input:-moz-placeholder {
40+
color: #fff!important;
41+
}
42+
*:-moz-placeholder{
43+
color: #fff!important;
44+
}
45+
*:-ms-input-placeholder{
46+
color: #fff!important;
47+
}
48+
*::-webkit-input-placeholder{
49+
color: #fff!important;
50+
}
51+
52+
}
53+
54+
.icon {
55+
padding-right: 10px;
56+
}
57+
58+
.bottom {
59+
bottom: 0;
60+
}
61+
62+
.input-cover {
63+
position: static;
64+
}
65+
66+
67+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { Component } from '@angular/core';
2+
import { IonicPage, NavController, NavParams, AlertController } from 'ionic-angular';
3+
import { UserProvider } from '../../providers/user/user';
4+
/**
5+
* Generated class for the PasswordresetPage page.
6+
*
7+
* See http://ionicframework.com/docs/components/#navigation for more info
8+
* on Ionic pages and navigation.
9+
*/
10+
@IonicPage()
11+
@Component({
12+
selector: 'page-passwordreset',
13+
templateUrl: 'passwordreset.html',
14+
})
15+
export class PasswordresetPage {
16+
email: string;
17+
constructor(public navCtrl: NavController, public navParams: NavParams,
18+
public userservice: UserProvider, public alertCtrl: AlertController) {
19+
}
20+
21+
ionViewDidLoad() {
22+
// console.log('ionViewDidLoad PasswordresetPage');
23+
}
24+
25+
reset() {
26+
let alert = this.alertCtrl.create({
27+
buttons: ['Ok']
28+
});
29+
this.userservice.passwordreset(this.email).then((res: any) => {
30+
if (res.success) {
31+
alert.setTitle('Email Sent');
32+
alert.setSubTitle('Please follow the instructions in the email to reset your password');
33+
}
34+
else {
35+
alert.setTitle('Failed');
36+
}
37+
})
38+
}
39+
40+
goback() {
41+
this.navCtrl.setRoot('LoginPage');
42+
}
43+
44+
}

0 commit comments

Comments
 (0)