This repository has been archived by the owner on Jun 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a new password function, also started edit password
- Loading branch information
liz3
committed
Jun 4, 2017
1 parent
7f8b1a9
commit b6d3b59
Showing
11 changed files
with
312 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,68 @@ | ||
{ | ||
"name": "mynewapp", | ||
"version": "0.0.1", | ||
"author": "Ionic Framework", | ||
"homepage": "http://ionicframework.com/", | ||
"private": true, | ||
"scripts": { | ||
"clean": "ionic-app-scripts clean", | ||
"build": "ionic-app-scripts build", | ||
"lint": "ionic-app-scripts lint", | ||
"ionic:build": "ionic-app-scripts build", | ||
"ionic:serve": "ionic-app-scripts serve" | ||
"name": "mynewapp", | ||
"version": "0.0.1", | ||
"author": "Ionic Framework", | ||
"homepage": "http://ionicframework.com/", | ||
"private": true, | ||
"scripts": { | ||
"clean": "ionic-app-scripts clean", | ||
"build": "ionic-app-scripts build", | ||
"lint": "ionic-app-scripts lint", | ||
"ionic:build": "ionic-app-scripts build", | ||
"ionic:serve": "ionic-app-scripts serve" | ||
}, | ||
"dependencies": { | ||
"@angular/common": "4.1.2", | ||
"@angular/compiler": "4.1.2", | ||
"@angular/compiler-cli": "4.1.2", | ||
"@angular/core": "4.1.2", | ||
"@angular/forms": "4.1.2", | ||
"@angular/http": "4.1.2", | ||
"@angular/platform-browser": "4.1.2", | ||
"@angular/platform-browser-dynamic": "4.1.2", | ||
"@ionic-native/clipboard": "^3.12.1", | ||
"@ionic-native/core": "3.10.2", | ||
"@ionic-native/http": "^3.11.0", | ||
"@ionic-native/splash-screen": "3.10.2", | ||
"@ionic-native/status-bar": "3.10.2", | ||
"@ionic/storage": "2.0.1", | ||
"cordova-android": "^6.2.3", | ||
"cordova-ios": "^4.4.0", | ||
"cordova-plugin-compat": "^1.1.0", | ||
"cordova-plugin-console": "^1.0.5", | ||
"cordova-plugin-device": "^1.1.4", | ||
"cordova-plugin-file": "^4.3.3", | ||
"cordova-plugin-http": "^1.2.0", | ||
"cordova-plugin-splashscreen": "^4.0.3", | ||
"cordova-plugin-statusbar": "^2.2.2", | ||
"cordova-plugin-whitelist": "^1.3.1", | ||
"ionic-angular": "3.3.0", | ||
"ionic-plugin-keyboard": "^2.2.1", | ||
"ionicons": "3.0.0", | ||
"rxjs": "5.1.1", | ||
"sw-toolbox": "3.6.0", | ||
"zone.js": "0.8.11" | ||
}, | ||
"devDependencies": { | ||
"@ionic/app-scripts": "1.3.7", | ||
"@ionic/cli-plugin-cordova": "1.3.0", | ||
"@ionic/cli-plugin-ionic-angular": "1.3.0", | ||
"typescript": "2.3.3" | ||
}, | ||
"description": "An Ionic project", | ||
"cordova": { | ||
"plugins": { | ||
"cordova-plugin-http": {}, | ||
"cordova-plugin-console": {}, | ||
"cordova-plugin-device": {}, | ||
"cordova-plugin-splashscreen": {}, | ||
"cordova-plugin-statusbar": {}, | ||
"cordova-plugin-whitelist": {}, | ||
"ionic-plugin-keyboard": {} | ||
}, | ||
"dependencies": { | ||
"@angular/common": "4.1.2", | ||
"@angular/compiler": "4.1.2", | ||
"@angular/compiler-cli": "4.1.2", | ||
"@angular/core": "4.1.2", | ||
"@angular/forms": "4.1.2", | ||
"@angular/http": "4.1.2", | ||
"@angular/platform-browser": "4.1.2", | ||
"@angular/platform-browser-dynamic": "4.1.2", | ||
"@ionic-native/core": "3.10.2", | ||
"@ionic-native/http": "^3.11.0", | ||
"@ionic-native/splash-screen": "3.10.2", | ||
"@ionic-native/status-bar": "3.10.2", | ||
"@ionic/storage": "2.0.1", | ||
"cordova-android": "^6.2.3", | ||
"cordova-ios": "^4.4.0", | ||
"cordova-plugin-compat": "^1.1.0", | ||
"cordova-plugin-console": "^1.0.5", | ||
"cordova-plugin-device": "^1.1.4", | ||
"cordova-plugin-file": "^4.3.3", | ||
"cordova-plugin-http": "^1.2.0", | ||
"cordova-plugin-splashscreen": "^4.0.3", | ||
"cordova-plugin-statusbar": "^2.2.2", | ||
"cordova-plugin-whitelist": "^1.3.1", | ||
"ionic-angular": "3.3.0", | ||
"ionic-plugin-keyboard": "^2.2.1", | ||
"ionicons": "3.0.0", | ||
"rxjs": "5.1.1", | ||
"sw-toolbox": "3.6.0", | ||
"zone.js": "0.8.11" | ||
}, | ||
"devDependencies": { | ||
"@ionic/app-scripts": "1.3.7", | ||
"@ionic/cli-plugin-cordova": "1.3.0", | ||
"@ionic/cli-plugin-ionic-angular": "1.3.0", | ||
"typescript": "2.3.3" | ||
}, | ||
"description": "An Ionic project", | ||
"cordova": { | ||
"plugins": { | ||
"cordova-plugin-http": {}, | ||
"cordova-plugin-console": {}, | ||
"cordova-plugin-device": {}, | ||
"cordova-plugin-splashscreen": {}, | ||
"cordova-plugin-statusbar": {}, | ||
"cordova-plugin-whitelist": {}, | ||
"ionic-plugin-keyboard": {} | ||
}, | ||
"platforms": [ | ||
"android", | ||
"ios" | ||
] | ||
} | ||
} | ||
"platforms": [ | ||
"android", | ||
"ios" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,51 @@ | ||
import { NgModule, ErrorHandler } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; | ||
import { MyApp } from './app.component'; | ||
import { HomePage } from '../pages/home/home'; | ||
import { TabsPage } from '../pages/tabs/tabs'; | ||
import {NgModule, ErrorHandler} from '@angular/core'; | ||
import {BrowserModule} from '@angular/platform-browser'; | ||
import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular'; | ||
import {MyApp} from './app.component'; | ||
import {HomePage} from '../pages/home/home'; | ||
import {TabsPage} from '../pages/tabs/tabs'; | ||
|
||
import { StatusBar } from '@ionic-native/status-bar'; | ||
import { SplashScreen } from '@ionic-native/splash-screen'; | ||
import {StatusBar} from '@ionic-native/status-bar'; | ||
import {SplashScreen} from '@ionic-native/splash-screen'; | ||
import {HttpModule} from "@angular/http"; | ||
import {LoginPage} from "../pages/login/LoginPage"; | ||
import {PassShow} from "../pages/pass-show/pass-show"; | ||
import {NewPassPage} from "../pages/new-password/new-pass"; | ||
import {EditPassPage} from "../pages/edit-password/edit-pass"; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
MyApp, | ||
//HERE | ||
HomePage, | ||
TabsPage, | ||
LoginPage, | ||
PassShow | ||
declarations: [ | ||
MyApp, | ||
//HERE | ||
HomePage, | ||
TabsPage, | ||
LoginPage, | ||
PassShow, | ||
NewPassPage, | ||
EditPassPage, | ||
|
||
], | ||
imports: [ | ||
BrowserModule, | ||
IonicModule.forRoot(MyApp), | ||
HttpModule | ||
], | ||
bootstrap: [IonicApp], | ||
entryComponents: [ | ||
MyApp, | ||
//HERE | ||
HomePage, | ||
TabsPage, | ||
LoginPage, | ||
PassShow | ||
], | ||
providers: [ | ||
StatusBar, | ||
SplashScreen, | ||
{provide: ErrorHandler, useClass: IonicErrorHandler} | ||
] | ||
], | ||
imports: [ | ||
BrowserModule, | ||
IonicModule.forRoot(MyApp), | ||
HttpModule | ||
], | ||
bootstrap: [IonicApp], | ||
entryComponents: [ | ||
MyApp, | ||
//HERE | ||
HomePage, | ||
TabsPage, | ||
LoginPage, | ||
PassShow, | ||
NewPassPage, | ||
EditPassPage, | ||
], | ||
providers: [ | ||
StatusBar, | ||
SplashScreen, | ||
{provide: ErrorHandler, useClass: IonicErrorHandler} | ||
] | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<ion-content> | ||
<ion-list> | ||
|
||
<ion-item> | ||
<ion-label floating>Username</ion-label> | ||
<ion-input [(ngModel)]="username" type="text" value=""></ion-input> | ||
</ion-item> | ||
|
||
<ion-item> | ||
<ion-label floating>Password</ion-label> | ||
<ion-input [(ngModel)]="password" type="password"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Description</ion-label> | ||
<ion-input [(ngModel)]="description" type="text"></ion-input> | ||
</ion-item> | ||
</ion-list> | ||
<div padding> | ||
<button ion-button (click)="save()">Save</button> | ||
</div> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import {Component} from "@angular/core"; | ||
import {Http} from "@angular/http"; | ||
import {passy} from "../../app/app.component"; | ||
import {ViewController} from "ionic-angular"; | ||
@Component({ | ||
selector: 'new-pass', | ||
templateUrl: 'edit-pass.html' | ||
}) | ||
|
||
export class EditPassPage { | ||
|
||
private username; | ||
private password; | ||
private description; | ||
|
||
constructor(public viewCtrl: ViewController,public http:Http) { | ||
|
||
|
||
|
||
} | ||
save() { | ||
|
||
const me = this; | ||
|
||
passy.addPassword(this.http, this.username, this.password, this.description, function (data) { | ||
|
||
if(!data.success) { | ||
|
||
} else { | ||
me.viewCtrl.dismiss(); | ||
} | ||
|
||
}); | ||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.