trying to fix upload image
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<ion-content class="ion-padding">
|
||||
<div class="boxed_contents">
|
||||
<div class="profile">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url('+profilePicture+')'">
|
||||
<div class="bg_image back_image" id="profile_pic" [style.backgroundImage]="'url('+profilePicture+')'">
|
||||
<div class="icon">
|
||||
<ion-icon name="camera" (click)="startCamera()"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -41,6 +41,15 @@ export class EditProfilePage implements OnInit {
|
||||
this.email = this.sessionDataProviderService.email;
|
||||
this.online_name = this.sessionDataProviderService.online_name;
|
||||
this.profilePicture = this.sessionDataProviderService.profilePicture(this.sessionDataProviderService.session, this.sessionDataProviderService.member_uid);
|
||||
|
||||
setInterval(()=>{
|
||||
|
||||
var myIframe=document.getElementById('profile_pic');
|
||||
myIframe.style.backgroundImage=myIframe.style.backgroundImage;
|
||||
|
||||
//document.getElementById("profile_pic").style.background="'url('"+this.profilePicture+"')'"; ///this.profilePicture;
|
||||
}, 5000);
|
||||
// document.getElementById("profile_pic").reload(true);
|
||||
}
|
||||
|
||||
onBack() {
|
||||
@@ -167,6 +176,10 @@ export class EditProfilePage implements OnInit {
|
||||
uploadResult => {
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||
this.profilePicture = this.sessionDataProviderService.profilePicture(this.sessionDataProviderService.session, this.sessionDataProviderService.member_uid);
|
||||
//this.ngOnInit(); // trying this
|
||||
//debugger;
|
||||
document.getElementById("profile_pic").style.backgroundImage="'url('"+this.profilePicture+"')'"; ///this.profilePicture;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-logout',
|
||||
@@ -11,9 +12,13 @@ export class LogoutPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router
|
||||
) {
|
||||
this.returnToLogin(this.router);
|
||||
private router: Router,
|
||||
private sessionDataProviderService: SessionDataProviderService
|
||||
)
|
||||
{
|
||||
// debugger;
|
||||
this.sessionDataProviderService.DestroySessionOnLogout();
|
||||
// this.returnToLogin();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -21,9 +26,9 @@ export class LogoutPage implements OnInit {
|
||||
}
|
||||
|
||||
timeoutId:any;
|
||||
returnToLogin(router: Router){
|
||||
this.timeoutId = setTimeout(function(){
|
||||
router.navigate(['login']);
|
||||
returnToLogin(){
|
||||
this.timeoutId = setTimeout(function(){
|
||||
this.router.navigate(['login']);
|
||||
}, 5000);
|
||||
}
|
||||
onBack() {
|
||||
|
||||
Reference in New Issue
Block a user