@@ -1,5 +1,5 @@ | |||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; | ||||
import { ModalController } from '@ionic/angular'; | |||||
import { Location } from '@angular/common'; | |||||
import { IJeelizFaceFilter } from 'vendors/jeelizFaceFilter/typescript/JeelizFaceFilterInterfaces'; | import { IJeelizFaceFilter } from 'vendors/jeelizFaceFilter/typescript/JeelizFaceFilterInterfaces'; | ||||
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; | import { SocialSharing } from '@ionic-native/social-sharing/ngx'; | ||||
@@ -29,15 +29,15 @@ export class ArFanCamPage implements OnInit { | |||||
glassesLensMeshLoaded: boolean = false; | glassesLensMeshLoaded: boolean = false; | ||||
constructor( | constructor( | ||||
private modalController: ModalController, | |||||
private socialSharing: SocialSharing | |||||
private socialSharing: SocialSharing, | |||||
private location: Location | |||||
) { | ) { | ||||
} | } | ||||
back() { | back() { | ||||
JEELIZFACEFILTER.destroy(); | JEELIZFACEFILTER.destroy(); | ||||
this.camLoaded = false; | this.camLoaded = false; | ||||
this.modalController.dismiss(); | |||||
this.location.back(); | |||||
} | } | ||||
// AR Face detection and drawing | // AR Face detection and drawing | ||||
@@ -229,10 +229,7 @@ export class ArFanCamPage implements OnInit { | |||||
} | } | ||||
approveImage() { | approveImage() { | ||||
this.modalController.dismiss({ | |||||
imageData: this.tempImg | |||||
}); | |||||
} | } | ||||
@@ -64,7 +64,7 @@ export class FacebookLoginComponent implements OnInit { | |||||
if (result.accessToken && result.accessToken.userId) { | if (result.accessToken && result.accessToken.userId) { | ||||
this.token = result.accessToken; | this.token = result.accessToken; | ||||
this.loadUserData(); | |||||
this.loadUserData(true); | |||||
localStorage.setItem('FBToken', this.token); | localStorage.setItem('FBToken', this.token); | ||||
@@ -25,7 +25,7 @@ | |||||
</ul> | </ul> | ||||
<ul class="fan-feature-list"> | <ul class="fan-feature-list"> | ||||
<li (click)="presentCamModal()"> | |||||
<li [routerLink]="['/ar-fan-cam']"> | |||||
<div> | <div> | ||||
<ion-icon name="camera-outline"></ion-icon> | <ion-icon name="camera-outline"></ion-icon> | ||||
@@ -124,21 +124,18 @@ export class HomePage implements OnInit { | |||||
}, (err) => { | }, (err) => { | ||||
console.log(err); | console.log(err); | ||||
this.toastService.presentToastWithOptions("Failed to get Gallery data", "danger"); | this.toastService.presentToastWithOptions("Failed to get Gallery data", "danger"); | ||||
}); | |||||
}); | |||||
} | |||||
ionViewDidEnter() { | |||||
this.userService.getUserProfile().then((data: any) => { | this.userService.getUserProfile().then((data: any) => { | ||||
alert(JSON.stringify(data)); | |||||
this.liked_articles = data.liked_articles; | this.liked_articles = data.liked_articles; | ||||
this.bookmarked_articles = data.bookmarked_articles; | this.bookmarked_articles = data.bookmarked_articles; | ||||
}, () => { | }, () => { | ||||
this.liked_articles = []; | this.liked_articles = []; | ||||
this.bookmarked_articles = []; | this.bookmarked_articles = []; | ||||
}); | }); | ||||
} | |||||
ionViewDidEnter() { | |||||
if (localStorage.isPartyChatOn === 'yes') { | |||||
this.showChat = true; | |||||
} | |||||
} | } | ||||
getIndex(e: any) { | getIndex(e: any) { | ||||
@@ -19,7 +19,7 @@ export class WelcomePage implements OnInit { | |||||
setTimeout(() => { | setTimeout(() => { | ||||
this.router.navigate(['/tabs/home']); | this.router.navigate(['/tabs/home']); | ||||
}, 4000); | |||||
}, 3000); | |||||
} else { | } else { | ||||
this.user = null; | this.user = null; | ||||