Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
<icon density="xhdpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
Expand Down Expand Up @@ -65,14 +77,9 @@
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
</platform>
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
<plugin name="cordova-plugin-console" spec="^1.0.5" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-email-composer" spec="^0.8.7" />
<plugin name="cordova-plugin-facebook4" spec="^1.9.1">
<variable name="APP_ID" value="292526344573042" />
<variable name="APP_NAME" value="forsightsociallogin" />
</plugin>
<plugin name="cordova-plugin-file-transfer" spec="^1.6.3" />
<plugin name="cordova-plugin-geolocation" spec="^2.4.3" />
<plugin name="cordova-plugin-ionic" spec="^1.1.8">
Expand All @@ -89,4 +96,11 @@
<plugin name="cordova-sqlite-storage" spec="^2.0.4" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^4.1.2" />
<plugin name="cordova-plugin-advanced-http" spec="^1.9.1" />
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
<plugin name="cordova-plugin-facebook4" spec="https://github.com/amritk/cordova-plugin-facebook4">
<variable name="APP_ID" value="292526344573042" />
<variable name="APP_NAME" value="forsightsociallogin" />
</plugin>
<engine name="android" spec="~7.0.0" />
</widget>
68 changes: 43 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@angular/common": "^4.1.3",
"@angular/compiler": "^4.1.3",
"@angular/compiler-cli": "^4.1.3",
"@angular/core": "^4.1.3",
"@angular/forms": "^4.1.3",
"@angular/http": "^4.1.3",
"@angular/platform-browser": "^4.1.3",
"@angular/platform-browser-dynamic": "^4.1.3",
"@ionic-native/call-number": "^4.2.1",
"@ionic-native/camera": "^4.1.0",
"@ionic-native/core": "3.12.1",
"@ionic-native/camera": "^4.5.3",
"@ionic-native/core": "^4.2.0",
"@ionic-native/email-composer": "^4.2.1",
"@ionic-native/facebook": "^4.5.2",
"@ionic-native/firebase": "^4.5.3",
"@ionic-native/google-maps": "^4.1.0",
"@ionic-native/http": "^4.5.3",
"@ionic-native/launch-navigator": "^4.5.2",
"@ionic-native/network": "^4.1.0",
"@ionic-native/splash-screen": "3.12.1",
Expand All @@ -34,29 +36,33 @@
"@ionic/storage": "^2.0.1",
"@types/cordova-plugin-network-information": "0.0.3",
"call-number": "^1.0.1",
"cordova-android": "^6.2.3",
"cordova-android": "~7.0.0",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-add-swift-support": "^1.7.1",
"cordova-plugin-advanced-http": "^1.9.1",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.0.5",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-dialogs": "^2.0.0",
"cordova-plugin-email-composer": "^0.8.7",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-file-transfer": "^1.6.3",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-email-composer": "^0.8.14",
"cordova-plugin-facebook4": "git+https://github.com/amritk/cordova-plugin-facebook4.git",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-geolocation": "^2.4.3",
"cordova-plugin-network-information": "^1.3.3",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-sqlite-storage": "^2.0.4",
"cordova-plugin-ionic": "^1.1.9",
"cordova-plugin-network-information": "^1.3.4",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.4.1",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sqlite-storage": "^2.2.0",
"ionic-angular": "3.5.3",
"ionic-native": "^2.9.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.1.2",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.1.3",
"zone.js": "0.8.12"
},
"devDependencies": {
Expand All @@ -81,7 +87,19 @@
"ionic-plugin-keyboard": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-email-composer": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {}
"uk.co.workingedge.phonegap.plugin.launchnavigator": {},
"cordova-plugin-advanced-http": {},
"cordova-plugin-ionic": {
"APP_ID": "c62d0853",
"CHANNEL_NAME": "Master",
"UPDATE_METHOD": "background",
"UPDATE_API": "https://api.ionicjs.com",
"MAX_STORE": "2"
},
"cordova-plugin-facebook4": {
"APP_ID": "292526344573042",
"APP_NAME": "forsightsociallogin"
}
},
"platforms": [
"android"
Expand Down
36 changes: 29 additions & 7 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,49 @@ import { Component, ViewChild } from '@angular/core';
import { Nav, Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { LoadingController } from 'ionic-angular';
import { HomePage } from '../pages/home/home';
import { NewsPage } from '../pages/news/news';
import { SearchPage } from '../pages/search/search';
import { SearchBySpecPage } from '../pages/search/searchBySpec';
import { MapPage } from '../pages/map/map';
import { UserPage } from '../pages/user/user';
import {PhotoUploadPage} from '../pages/photoUpload/photoUpload';

import { Camera, CameraOptions } from '@ionic-native/camera';
import { ToastController } from 'ionic-angular';
import { LoginPage } from '../pages/login/login';
import { OptometristListPage } from '../pages/optometristList/optometristList';

import { AlertController } from 'ionic-angular';
import { HttpClient } from '@angular/common/http';
import {Http} from '@angular/http';

import {FaceDetectionResultPage} from '../pages/face-detection-result/face-detection-result';
import {LensRecommenderPage} from '../pages/lens-recommender/lens-recommender';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;

public photos:any;
public base64Image: string;
rootPage: any = LoginPage;


// rootPag: any = OptometristListPage;
// rootPage: any = PhotoUploadPage;


baseUrl: string;
pages: Array<{ title: string, component: any, icon: string }>;

constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen, private http: Http) {
constructor(public toastCtrl: ToastController,
public alertCtrl: AlertController,
public loadingCtrl: LoadingController,
public httpClient: HttpClient,
private camera: Camera,
public platform: Platform,
public statusBar: StatusBar,
public splashScreen: SplashScreen,
private http: Http) {
this.initializeApp();
this.baseUrl = 'http://oapp.delhinerds.com/logout/';

Expand All @@ -43,7 +57,8 @@ export class MyApp {
{ title: 'NearMe', component: MapPage, icon: 'ios-locate-outline', },
{ title: 'Profile', component: UserPage, icon: 'md-person', },
{ title: 'Logout', component: LoginPage, icon: 'md-log-out', },

{title:'Specs Recommender', component: FaceDetectionResultPage, icon: 'glasses'},
{title:'Lens Recommender', component: LensRecommenderPage, icon: 'eye' }
];

}
Expand All @@ -57,6 +72,9 @@ export class MyApp {
});
}




openPage(page) {
if (page.component == LoginPage) {
return this.http.get(this.baseUrl)
Expand All @@ -75,4 +93,8 @@ export class MyApp {
this.nav.push(page.component);
}
}




}
2 changes: 1 addition & 1 deletion src/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<ion-content class="app">
<ion-list>
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">

<ion-icon name={{p.icon}}></ion-icon> {{p.title}}
</button>


</ion-list>
</ion-content>

Expand Down
10 changes: 9 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { HttpModule } from '@angular/http';
import { CallNumber } from '@ionic-native/call-number';
import { EmailComposer } from '@ionic-native/email-composer';
import { HttpClientModule } from '@angular/common/http';


import { MyApp } from './app.component';
import { LoginPage } from '../pages/login/login';
import { SignupPage } from '../pages/signup/signup';

import { HomePage } from '../pages/home/home';
import { NewsPage } from '../pages/news/news';
import { DetailsPage } from '../pages/details/details';
import { UserPage } from '../pages/user/user';
import { EditUserPage } from '../pages/user/editUser';
import { OptometristPage } from '../pages/optometrist/optometrist';

import {FaceDetectionResultPage} from '../pages/face-detection-result/face-detection-result';
import {LensRecommenderPage} from '../pages/lens-recommender/lens-recommender';

import { SearchPage } from '../pages/search/search';
import { SearchBySpecPage } from '../pages/search/searchBySpec';
Expand Down Expand Up @@ -71,12 +74,15 @@ import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook';
MapPage,
OptometristListPage,
DirectionsPage,
FaceDetectionResultPage,
MapDirPage,
FilterPipe,
LensRecommenderPage
],
imports: [
BrowserModule,
HttpModule,
HttpClientModule,
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot()
],
Expand All @@ -100,6 +106,8 @@ import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook';
OptometristListPage,
DirectionsPage,
MapDirPage,
FaceDetectionResultPage,
LensRecommenderPage
],
providers: [
Facebook,
Expand Down
4 changes: 2 additions & 2 deletions src/app/services/optometrist.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class OptometristService {
http: any;
baseUrl: string;
baseUrl2: string;

baseUrl3: string;

optometrists: any;
workplaces: any;
Expand All @@ -26,7 +26,7 @@ export class OptometristService {

this.getOptometristsInit();
this.getWorkplaceInit();

}

getOptometristsInit() {
Expand Down
Binary file added src/assets/img/rbw110to180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/rbw80to110.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/rgt180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/logo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/pages/directions/directions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export class DirectionsPage {
lon: number;
lat: number
data: any;
optoLon:any;
optoLat:any;
constructor(params: NavParams, public nav:NavController) {
this.optometrist = params.get('item');
this.lon = params.get('lon');
Expand Down
57 changes: 57 additions & 0 deletions src/pages/face-detection-result/face-detection-result.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<ion-header>
<ion-navbar color="primary">
<ion-title>
Forsight
</ion-title>
</ion-navbar>
</ion-header>

<ion-content padding>
<ion-card>
<img [src]="imageResult" alt="ion_vision" height="300">
</ion-card>
<ion-card>
<ion-card-header>
Likelihood
</ion-card-header>
<ion-card-content>
<ion-list>
<ion-item>
<h2>{{ visionResult.detectionConfidence }}</h2>
<p>Detection Confidence</p>
</ion-item>
<ion-item>
<h2>{{ visionResult.angerLikelihood }}</h2>
<p>Anger</p>
</ion-item>
<ion-item>
<h2>{{ visionResult.blurredLikelihood }}</h2>
<p>Blurred</p>
</ion-item>
<ion-item>
<h2>{{ visionResult.headwearLikelihood }}</h2>
<p>Headwear</p>
</ion-item>
<ion-item>
<h2>{{ visionResult.joyLikelihood }}</h2>
<p>Joy</p>
</ion-item>
<ion-item>
<h2>{{ visionResult.sorrowLikelihood }}</h2>
<p>Sorrow</p>
</ion-item>
<ion-item>
<h2>{{ visionResult.surpriseLikelihood }}</h2>
<p>Surprise</p>
</ion-item>
<ion-item>
<h2>{{ visionResult.underExposedLikelihood }}</h2>
<p>Underexposure</p>
</ion-item>
</ion-list>
</ion-card-content>
</ion-card>
<ion-fab right bottom>
<button ion-fab color="danger" (click)="capture()"><ion-icon ios="ios-camera" md="md-camera"></ion-icon></button>
</ion-fab>
</ion-content>
16 changes: 16 additions & 0 deletions src/pages/face-detection-result/face-detection-result.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { FaceDetectionResultPage } from './face-detection-result';

@NgModule({
declarations: [
FaceDetectionResultPage,
],
imports: [
IonicPageModule.forChild(FaceDetectionResultPage),
],
exports: [
FaceDetectionResultPage
]
})
export class FaceDetectionResultPageModule {}
3 changes: 3 additions & 0 deletions src/pages/face-detection-result/face-detection-result.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
page-face-detection-result {

}
Loading