This commit is contained in:
Peter Maquiran
2021-11-07 20:57:51 +01:00
31 changed files with 1370 additions and 398 deletions
@@ -6,7 +6,6 @@
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
<div class="bottom-title d-flex"><h3 class="bottom-text">Diplomas para Assinar</h3></div>
</div>
</ion-header>
<ion-content>
@@ -129,7 +129,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
@@ -58,7 +58,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
+30 -30
View File
@@ -1,12 +1,12 @@
import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController,Platform } from '@ionic/angular';
import { AnimationController, ModalController, Platform } from '@ionic/angular';
import { SearchPage } from 'src/app/pages/search/search.page';
import { Router } from '@angular/router';
import { LoginUserRespose } from 'src/app/models/user.model';
import { ProfilePage } from 'src/app/modals/profile/profile.page';
import { StorageService } from '../../services/storage.service';
import { SessionStore } from 'src/app/store/session.service';
import { NotificationsService } from '../../services/notifications.service';
//import { NotificationsService } from '../../services/notifications.service';
import { environment } from 'src/environments/environment';
import { EventTrigger } from '../../services/eventTrigger.service';
import { ThemeService } from '../../services/theme.service';
@@ -28,14 +28,14 @@ export class HeaderPage implements OnInit {
SessionStore = SessionStore
production = environment.production
constructor(
private router: Router,
private modalController: ModalController,
private animationController: AnimationController,
private storageservice: StorageService,
private platform: Platform,
private notificationsService: NotificationsService,
//private notificationsService: NotificationsService,
private eventrigger: EventTrigger,
public ThemeService: ThemeService
) {
@@ -50,39 +50,39 @@ export class HeaderPage implements OnInit {
this.hideSearch();
this.notificationLengthData();
/* if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
this.UpdateNotificationCount();
} else {
this.UpdateNotificationCount();
} */
/* if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
this.UpdateNotificationCount();
} else {
this.UpdateNotificationCount();
} */
}
this.eventrigger.getObservable().subscribe((data)=>{
if(data.notification == "delete" || "recive"){
ionViewWillEnter() {
this.eventrigger.getObservable().subscribe((data) => {
if (data.notification == "delete" || "recive") {
this.notificationLengthData();
console.log('Deleted notification',data )
console.log('Deleted notification', data)
}
})
}
UpdateNotificationCount() {
this.notificationsService.registerCallback(
'any',
() => {
setTimeout(()=>{
this.notificationLengthData();
}, 100)
}
)
}
notificationLengthData() {
/* UpdateNotificationCount() {
this.notificationsService.registerCallback(
'any',
() => {
setTimeout(()=>{
this.notificationLengthData();
}, 100)
}
)
} */
notificationLengthData() {
this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
/* var data = JSON.parse(value); */
/* var data = JSON.parse(value); */
this.notificationLength = value.length;
})
@@ -173,10 +173,10 @@ export class HeaderPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(()=>{
modal.onDidDismiss().then(() => {
this.notificationLengthData()
})
}
async dynamicSearch() {