upgrade dependencies and migrate
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
import { Component, HostListener, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { MatIconRegistry } from '@angular/material/icon';
|
||||
import { Component, HostListener } from '@angular/core';
|
||||
import { DateAdapter } from '@angular/material/core';
|
||||
import { MatIconRegistry } from '@angular/material/icon';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { Router } from '@angular/router';
|
||||
import { fromEvent } from 'rxjs';
|
||||
|
||||
import { Location } from '@angular/common';
|
||||
import { AuthService } from '../../services/auth.service';
|
||||
import { I18nService } from '../../services/i18n.service';
|
||||
import { ProfileService } from '../../services/profile.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'app-main',
|
||||
templateUrl: './main.component.html',
|
||||
styleUrls: [ './main.component.scss' ]
|
||||
styleUrls: ['./main.component.scss']
|
||||
})
|
||||
export class MainComponent {
|
||||
|
||||
@@ -141,7 +142,7 @@ export class MainComponent {
|
||||
logout() {
|
||||
this.authService.logout().subscribe({
|
||||
next: (data) => {
|
||||
this.router.navigate([ "" ]).then(() => {
|
||||
this.router.navigate([""]).then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
@@ -161,7 +162,7 @@ export class MainComponent {
|
||||
window.open(url, target);
|
||||
}
|
||||
|
||||
@HostListener('window:resize', [ '$event' ])
|
||||
@HostListener('window:resize', ['$event'])
|
||||
onResize(event) {
|
||||
if (event.target.innerWidth < 768) {
|
||||
this.opened = false;
|
||||
@@ -173,8 +174,8 @@ export class MainComponent {
|
||||
touchEvents(): void {
|
||||
fromEvent(document, 'touchstart').subscribe({
|
||||
next: (event: TouchEvent) => {
|
||||
if (event.touches[ 0 ]) {
|
||||
this.touchStartX = event.touches[ 0 ].screenX;
|
||||
if (event.touches[0]) {
|
||||
this.touchStartX = event.touches[0].screenX;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -182,8 +183,8 @@ export class MainComponent {
|
||||
|
||||
fromEvent(document, 'touchmove').subscribe({
|
||||
next: (event: TouchEvent) => {
|
||||
if (event.touches[ 0 ]) {
|
||||
this.touchX = event.touches[ 0 ].screenX;
|
||||
if (event.touches[0]) {
|
||||
this.touchX = event.touches[0].screenX;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user