Little tweaks to make it work... In a devcontainer anyway....

This commit is contained in:
2025-07-25 21:32:20 -03:00
parent 9eb293ccb1
commit f17c0d08a1
110 changed files with 10672 additions and 1246 deletions

View File

@@ -5,21 +5,35 @@
<ion-icon name="arrow-back"></ion-icon>
</button>
</ion-buttons>
<ion-title><img class="title-profile-avatar" [src]="'https://appsby.fitz.guru/urge/' + this.profile.details.pic.thumb" height="24" width="24"> {{this.profile.details.name}}</ion-title>
<ion-title
><img
class="title-profile-avatar"
[src]="'/assets/' + this.profile.details.pic.thumb"
height="24"
width="24"
/>
{{this.profile.details.name}}</ion-title
>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item class="message-bubble" *ngFor="let message of this.profile.messages" [ngClass]="{ 'is-user': (message.isUser == true) }">
<img *ngIf="message.image" [src]="'https://appsby.fitz.guru/urge/' + message.image" (press)="showLightbox($event, message.image)">
<ion-item
class="message-bubble"
*ngFor="let message of this.profile.messages"
[ngClass]="{ 'is-user': (message.isUser == true) }"
>
<img
*ngIf="message.image"
[src]="'/assets/' + message.image"
(press)="showLightbox($event, message.image)"
/>
<p *ngIf="message.text != ''">{{message.text}}</p>
</ion-item>
</ion-list>
</ion-content>
<ion-footer>
<ion-toolbar>
</ion-toolbar>
<ion-toolbar> </ion-toolbar>
</ion-footer>

View File

@@ -1,45 +1,50 @@
import { Component } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { NavController } from 'ionic-angular';
import { Component } from "@angular/core";
import { DomSanitizer } from "@angular/platform-browser";
import { NavController } from "ionic-angular";
import { ChatPage } from '../chat/chat';
import { ProfileService } from '../../services/profiles';
import { ProfilePage } from '../profile/profile';
import { ChatPage } from "../chat/chat";
import { ProfileService } from "../../services/profiles";
import { ProfilePage } from "../profile/profile";
@Component({
selector: 'page-grid',
templateUrl: 'grid.html',
providers: [ ProfileService ]
selector: "page-grid",
templateUrl: "grid.html",
providers: [ProfileService],
})
export class GridPage {
profiles: any;
tabNavEl: any;
constructor(public navCtrl: NavController, public profileService: ProfileService, private _sanitizer: DomSanitizer) {
constructor(
public navCtrl: NavController,
public profileService: ProfileService,
private _sanitizer: DomSanitizer
) {
profileService.loadVerified().then((data) => {
this.profiles = data;
console.debug('profiles: ', this.profiles);
console.debug("profiles: ", this.profiles);
});
this.tabNavEl = document.querySelector('#tab-nav .tabbar');
this.tabNavEl = document.querySelector("#tab-nav .tabbar");
}
ionViewWillEnter() {
this.tabNavEl.style.display = 'flex';
this.tabNavEl.style.display = "flex";
}
doTellStory() {
this.navCtrl.push(TellYourStoryPage);
// this.navCtrl.push(TellYourStoryPage);
}
getBackgroundThumbnail(pics) {
return this._sanitizer.bypassSecurityTrustStyle('url(https://appsby.fitz.guru/urge/' + pics.thumb + ')');
return this._sanitizer.bypassSecurityTrustStyle(
"url(/assets/" + pics.thumb + ")"
);
}
profilePressed(event, profile) {
if (profile.messages && profile.messages.length) {
this.navCtrl.push(ChatPage, {
profile: profile
profile: profile,
});
}
}

View File

@@ -7,16 +7,21 @@
<ion-content no-padding>
<ion-list>
<ng-container *ngFor="let profile of profiles">
<ion-item no-padding *ngIf="profile.messages?.length > 0">
<ion-thumbnail padding-left item-start (tap)="profilePictureTapped($event, profile)">
<img [src]="'https://appsby.fitz.guru/urge/' + profile.details.pic.thumb">
<ion-item no-padding *ngIf="profile.messages?.length > 0">
<ion-thumbnail
padding-left
item-start
(tap)="profilePictureTapped($event, profile)"
>
<img [src]="'/assets/' + profile.details.pic.thumb" />
</ion-thumbnail>
<ion-grid (tap)="interviewTapped($event, profile)">
<ion-row nowrap justify-content-between>
<ion-col class="username">
{{profile.details.name}}
</ion-col>
<ion-col class="timestamp" [innerHTML]="getLatestMessageTimestamp(profile.messages)"></ion-col>
<ion-col class="username"> {{profile.details.name}} </ion-col>
<ion-col
class="timestamp"
[innerHTML]="getLatestMessageTimestamp(profile.messages)"
></ion-col>
</ion-row>
<ion-row class="latest-message" nowrap>
<ion-col [innerHTML]="getLatestMessage(profile.messages)"></ion-col>

View File

@@ -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,
});
}
}