-
diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts
index 35e28a2..7e932d7 100644
--- a/src/app/about/about.component.ts
+++ b/src/app/about/about.component.ts
@@ -1,5 +1,5 @@
import {AfterViewInit, Component, ElementRef, HostListener, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';
-import {DeviceDetectorService} from '../shared/services/device-detector.service';
+import {ViewportService} from '../shared/services/viewport.service';
import {Title} from '@angular/platform-browser';
import {TranslatePipe} from '@ngx-translate/core';
import {ParallaxComponent} from '../shared/parallax/parallax.component';
@@ -21,20 +21,20 @@ import {TerminalEmulatorComponent} from '../shared/terminal-emulator/terminal-em
styleUrls: ['./about.component.css']
})
export class AboutComponent implements OnInit, AfterViewInit {
- isMobile: boolean = false;
+ isNarrow: boolean = false;
terminalShouldBoot: boolean = false;
@ViewChild('contentTrigger') contentTrigger!: ElementRef;
constructor(
- private deviceService: DeviceDetectorService,
+ private deviceService: ViewportService,
private titleService: Title
) {
}
ngOnInit() {
this.titleService.setTitle('itzMiney\'s Home');
- this.isMobile = this.deviceService.isMobile;
+ this.isNarrow = this.deviceService.isNarrow;
}
ngAfterViewInit() {
diff --git a/src/app/admin/admin.component.html b/src/app/admin/admin.component.html
index 95944ca..67b55db 100644
--- a/src/app/admin/admin.component.html
+++ b/src/app/admin/admin.component.html
@@ -1,7 +1,7 @@
- @if (!isMobile) {
+ @if (!isNarrow) {
Delete Article
@@ -22,7 +22,7 @@
}
-
+
Admin Dashboard
@@ -73,7 +73,7 @@
- @if (isMobile) {
+ @if (isNarrow) {
Delete Article
- @if (!isMobile) {
+ @if (!isNarrow) {
diff --git a/src/app/admin/admin.component.ts b/src/app/admin/admin.component.ts
index ad0b985..f6a8513 100644
--- a/src/app/admin/admin.component.ts
+++ b/src/app/admin/admin.component.ts
@@ -5,7 +5,7 @@ import {UserService} from '../shared/services/user.service';
import { NgStyle } from '@angular/common';
import {Observer, Subscription, interval} from 'rxjs';
import {FormsModule, NgForm} from '@angular/forms';
-import {DeviceDetectorService} from '../shared/services/device-detector.service';
+import {ViewportService} from '../shared/services/viewport.service';
import {Title} from '@angular/platform-browser';
import {ModalComponent} from '../shared/modal/modal.component';
import {AuthService} from '../shared/services/auth.service';
@@ -27,7 +27,7 @@ export class AdminComponent implements OnInit, OnDestroy {
users: any[] = [];
noArticles: boolean = false;
- isMobile: boolean = false;
+ isNarrow: boolean = false;
title: string = '';
content: string = '';
@@ -47,14 +47,14 @@ export class AdminComponent implements OnInit, OnDestroy {
private articleService: ArticleService,
private userService: UserService,
private router: Router,
- private deviceService: DeviceDetectorService,
+ private deviceService: ViewportService,
private titleService: Title,
protected authService: AuthService
) {}
ngOnInit() {
this.titleService.setTitle('Admin Panel | itzMiney')
- this.isMobile = this.deviceService.isMobile;
+ this.isNarrow = this.deviceService.isNarrow;
this.authService.validateToken().subscribe();
this.startTokenValidation();
this.loadArticles();
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 5b1262a..6d294c1 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,4 +1,4 @@
-@if (!isMobile) {
+@if (!isNarrow) {
@if (showNavbar) {
}
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 9ecdbd6..2e78710 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -4,7 +4,7 @@ import {ActivatedRoute, Router, RouterOutlet} from '@angular/router';
import {NavbarComponent} from './shared/navbar/navbar.component';
import {MobileNavbarComponent} from './shared/mobile-navbar/mobile-navbar.component';
import {FooterComponent} from './shared/footer/footer.component';
-import {DeviceDetectorService} from './shared/services/device-detector.service';
+import {ViewportService} from './shared/services/viewport.service';
import {TranslateService} from '@ngx-translate/core';
@Component({
@@ -14,14 +14,14 @@ import {TranslateService} from '@ngx-translate/core';
styleUrl: './app.component.css',
})
export class AppComponent implements OnInit {
- isMobile: boolean = false;
+ isNarrow: boolean = false;
showNavbar: boolean = true;
showFooter: boolean = true;
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
- private deviceService: DeviceDetectorService,
+ private deviceService: ViewportService,
private translate: TranslateService,
) {
this.translate.setDefaultLang('en');
@@ -30,7 +30,7 @@ export class AppComponent implements OnInit {
ngOnInit() {
this.router.events.subscribe(() => this.checkRoute())
- this.isMobile = this.deviceService.isMobile;
+ this.isNarrow = this.deviceService.isNarrow;
}
checkRoute() {
diff --git a/src/app/app.config.ts b/src/app/app.config.ts
index 761b2cd..9fbe047 100644
--- a/src/app/app.config.ts
+++ b/src/app/app.config.ts
@@ -1,7 +1,6 @@
import {ApplicationConfig, importProvidersFrom, provideZoneChangeDetection} from '@angular/core';
import {provideRouter, withInMemoryScrolling, withViewTransitions} from '@angular/router';
import {routes} from './app.routes';
-import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
import {HttpClient, provideHttpClient} from '@angular/common/http';
import {AuthService} from './shared/services/auth.service';
@@ -23,7 +22,6 @@ export const appConfig: ApplicationConfig = {
anchorScrolling: 'enabled'
})
),
- provideAnimationsAsync(),
provideClientHydration(withEventReplay()),
provideHttpClient(),
AuthService,
diff --git a/src/app/blog/blog.component.html b/src/app/blog/blog.component.html
index a8721fe..8280c36 100644
--- a/src/app/blog/blog.component.html
+++ b/src/app/blog/blog.component.html
@@ -6,7 +6,7 @@
">
-