Little tweaks to make it work... In a devcontainer anyway....
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { NavController, NavParams } from 'ionic-angular';
|
||||
import { Component } from "@angular/core";
|
||||
import { DomSanitizer } from "@angular/platform-browser";
|
||||
import { NavController, NavParams } from "ionic-angular";
|
||||
|
||||
import { ChatPage } from '../chat/chat';
|
||||
import { LightboxPage } from '../lightbox/lightbox';
|
||||
import { ProfileService } from '../../services/profiles';
|
||||
import { ChatPage } from "../chat/chat";
|
||||
import { LightboxPage } from "../lightbox/lightbox";
|
||||
import { ProfileService } from "../../services/profiles";
|
||||
|
||||
@Component({
|
||||
selector: 'page-profile',
|
||||
templateUrl: 'profile.html',
|
||||
providers: [ ProfileService ]
|
||||
selector: "page-profile",
|
||||
templateUrl: "profile.html",
|
||||
providers: [ProfileService],
|
||||
})
|
||||
|
||||
export class ProfilePage {
|
||||
|
||||
detailsOpen: boolean = false;
|
||||
profile: any;
|
||||
tabNavEl: any;
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams, public profileService: ProfileService, private _sanitizer: DomSanitizer) {
|
||||
this.profile = navParams.get('profile');
|
||||
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
|
||||
constructor(
|
||||
public navCtrl: NavController,
|
||||
public navParams: NavParams,
|
||||
public profileService: ProfileService,
|
||||
private _sanitizer: DomSanitizer
|
||||
) {
|
||||
this.profile = navParams.get("profile");
|
||||
this.tabNavEl = document.querySelector("#tab-nav .tabbar");
|
||||
}
|
||||
|
||||
ionViewWillEnter() {
|
||||
this.tabNavEl.style.display = 'none';
|
||||
this.tabNavEl.style.display = "none";
|
||||
}
|
||||
|
||||
closeProfile(event) {
|
||||
@@ -34,17 +37,19 @@ export class ProfilePage {
|
||||
closeProfileDetails(event) {
|
||||
if (this.detailsOpen) {
|
||||
this.detailsOpen = false;
|
||||
document.querySelector('.profile-toolbar').classList.remove('hidden');
|
||||
document.getElementById('detail-overlay').classList.remove('open');
|
||||
document.querySelector(".profile-toolbar").classList.remove("hidden");
|
||||
document.getElementById("detail-overlay").classList.remove("open");
|
||||
}
|
||||
}
|
||||
|
||||
getBackground(pics) {
|
||||
return this._sanitizer.bypassSecurityTrustStyle('url(https://appsby.fitz.guru/urge/' + pics.detail + ')');
|
||||
return this._sanitizer.bypassSecurityTrustStyle(
|
||||
"url(/assets/" + pics.detail + ")"
|
||||
);
|
||||
}
|
||||
|
||||
markFavorite(event, profile) {
|
||||
console.debug('favorite profile', { event: event, profile: profile });
|
||||
console.debug("favorite profile", { event: event, profile: profile });
|
||||
}
|
||||
|
||||
nextProfile(event) {
|
||||
@@ -54,15 +59,15 @@ export class ProfilePage {
|
||||
|
||||
openChat(event, profile) {
|
||||
this.navCtrl.push(ChatPage, {
|
||||
profile: profile
|
||||
profile: profile,
|
||||
});
|
||||
}
|
||||
|
||||
openProfileDetails(event) {
|
||||
if (!this.detailsOpen) {
|
||||
this.detailsOpen = true;
|
||||
document.querySelector('.profile-toolbar').classList.add('hidden');
|
||||
document.getElementById('detail-overlay').classList.add('open');
|
||||
document.querySelector(".profile-toolbar").classList.add("hidden");
|
||||
document.getElementById("detail-overlay").classList.add("open");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +77,9 @@ export class ProfilePage {
|
||||
}
|
||||
|
||||
showLightbox(event, image) {
|
||||
if (event.target.classList.contains('scroll-content')) {
|
||||
if (event.target.classList.contains("scroll-content")) {
|
||||
this.navCtrl.push(LightboxPage, {
|
||||
image: image
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user