From 7618e4bf5d7c881a4b763f480a3904fcbdcbe7da Mon Sep 17 00:00:00 2001 From: itzMiney Date: Tue, 17 Mar 2026 23:21:12 +0100 Subject: [PATCH] refactor to define helper service more accurately --- public/autoindex.xslt | 323 ------------------ src/app/about/about.component.html | 6 +- src/app/about/about.component.ts | 8 +- src/app/admin/admin.component.html | 8 +- src/app/admin/admin.component.ts | 8 +- src/app/app.component.html | 2 +- src/app/app.component.ts | 8 +- src/app/app.config.ts | 2 - src/app/blog/blog.component.html | 2 +- src/app/blog/blog.component.ts | 8 +- src/app/login/login.component.ts | 8 +- src/app/not-found/not-found.component.ts | 2 +- src/app/portfolio/portfolio.component.html | 2 +- src/app/portfolio/portfolio.component.ts | 8 +- src/app/privacy/privacy.component.html | 2 +- src/app/privacy/privacy.component.ts | 8 +- src/app/services/services.component.html | 2 +- src/app/services/services.component.ts | 8 +- .../audio-player/audio-player.component.html | 2 +- .../audio-player/audio-player.component.ts | 8 +- .../mobile-navbar/mobile-navbar.component.ts | 8 +- src/app/shared/navbar/navbar.component.ts | 8 +- src/app/shared/parallax/parallax.component.ts | 12 +- ...etector.service.ts => viewport.service.ts} | 8 +- src/app/socials/socials.component.html | 2 +- src/app/socials/socials.component.ts | 8 +- src/app/tos/tos.component.html | 2 +- src/app/tos/tos.component.ts | 8 +- 28 files changed, 78 insertions(+), 403 deletions(-) delete mode 100644 public/autoindex.xslt rename src/app/shared/services/{device-detector.service.ts => viewport.service.ts} (77%) diff --git a/public/autoindex.xslt b/public/autoindex.xslt deleted file mode 100644 index dedc84a..0000000 --- a/public/autoindex.xslt +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - <?xml version="1.0" encoding="utf-8" ?> - - - - - - - <!DOCTYPE html> - - - - - - - - - - - -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
..


-
    -
  • -
-
-
- - -
-
diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html index 47d84f7..20a3c77 100644 --- a/src/app/about/about.component.html +++ b/src/app/about/about.component.html @@ -7,7 +7,7 @@
-

itzMiney

+

itzMiney

{{ 'ABOUT_SUB' | translate}}

@@ -17,11 +17,11 @@
-
+

Konsole

🟡 🟣 🔴

-
+
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

@@ -143,7 +143,7 @@
- @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 @@ ">
-
+

Blog

{{ 'BLOG_SUB' | translate }}

diff --git a/src/app/blog/blog.component.ts b/src/app/blog/blog.component.ts index 86cc371..76d77b3 100644 --- a/src/app/blog/blog.component.ts +++ b/src/app/blog/blog.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit} from '@angular/core'; -import {DeviceDetectorService} from '../shared/services/device-detector.service' +import {ViewportService} from '../shared/services/viewport.service' import { DatePipe, AsyncPipe, SlicePipe, NgStyle } from '@angular/common'; import { ArticleService } from '../shared/services/article.service'; import { Router } from '@angular/router'; @@ -23,9 +23,9 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component'; }) export class BlogComponent implements OnInit { articles$: Observable | undefined; - isMobile: boolean = false; + isNarrow: boolean = false; constructor( - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private articleService: ArticleService, private router: Router, private titleService: Title @@ -33,7 +33,7 @@ export class BlogComponent implements OnInit { ngOnInit() { this.titleService.setTitle('Blog | itzMiney') - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; this.articles$ = this.articleService.getAllArticles(); } diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index cb6f560..7e09521 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -2,7 +2,7 @@ import {Component, Inject, OnInit, PLATFORM_ID} from '@angular/core'; import {AuthService} from '../shared/services/auth.service'; import {ActivatedRoute, Router} from '@angular/router'; import {FormsModule} 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 { take } from 'rxjs/operators'; import {ParallaxComponent} from '../shared/parallax/parallax.component'; @@ -25,21 +25,21 @@ export class LoginComponent implements OnInit { '/admin', '/shortener' ]); - isMobile = false; + isNarrow = false; redirectUrl = '/admin'; constructor( private authService: AuthService, private router: Router, private route: ActivatedRoute, - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private titleService: Title, @Inject(PLATFORM_ID) private platformId: Object ) {} ngOnInit() { this.titleService.setTitle('Login | itzMiney') - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; this.route.queryParams.pipe(take(1)).subscribe(params => { const raw = params['redirectUrl']; diff --git a/src/app/not-found/not-found.component.ts b/src/app/not-found/not-found.component.ts index 99436bc..197791e 100644 --- a/src/app/not-found/not-found.component.ts +++ b/src/app/not-found/not-found.component.ts @@ -12,7 +12,7 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component'; }) export class NotFoundComponent implements OnInit { - isMobile: boolean = false; + isNarrow: boolean = false; constructor( private titleService: Title, ) { diff --git a/src/app/portfolio/portfolio.component.html b/src/app/portfolio/portfolio.component.html index 9d3237d..6b0e59a 100644 --- a/src/app/portfolio/portfolio.component.html +++ b/src/app/portfolio/portfolio.component.html @@ -7,7 +7,7 @@
-
+

{{ 'PORTF_TITLE' | translate }}

{{ 'PORTF_SUB' | translate }}

diff --git a/src/app/portfolio/portfolio.component.ts b/src/app/portfolio/portfolio.component.ts index 2b2448d..6bb62a5 100644 --- a/src/app/portfolio/portfolio.component.ts +++ b/src/app/portfolio/portfolio.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit, ViewEncapsulation} from '@angular/core'; -import {DeviceDetectorService} from '../shared/services/device-detector.service'; +import {ViewportService} from '../shared/services/viewport.service'; import { CommonModule, NgStyle } from '@angular/common'; import {Title} from '@angular/platform-browser'; import {AudioPlayerComponent} from '../shared/audio-player/audio-player.component'; @@ -33,15 +33,15 @@ export class PortfolioComponent implements OnInit { ]; selectedItem: any = null; showModal = false; - isMobile: boolean = false; + isNarrow: boolean = false; constructor( - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private titleService: Title, ) {} ngOnInit() { this.titleService.setTitle('Portfolio | itzMiney'); - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; } openModal(item: any) { diff --git a/src/app/privacy/privacy.component.html b/src/app/privacy/privacy.component.html index 47bde4a..a1a5cfb 100644 --- a/src/app/privacy/privacy.component.html +++ b/src/app/privacy/privacy.component.html @@ -7,7 +7,7 @@
-
+
  • {{ 'privacy.nav.controller' | translate }}
  • {{ 'privacy.nav.whatData' | translate }}
  • diff --git a/src/app/privacy/privacy.component.ts b/src/app/privacy/privacy.component.ts index 40a4b31..a4c2021 100644 --- a/src/app/privacy/privacy.component.ts +++ b/src/app/privacy/privacy.component.ts @@ -1,5 +1,5 @@ import {AfterViewInit, Component, OnInit} 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'; @@ -15,12 +15,12 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component'; }) export class PrivacyComponent implements OnInit, AfterViewInit { - isMobile: boolean = false; + isNarrow: boolean = false; activeSection: string = ''; copiedSection: string | null = null; constructor( - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private titleService: Title, ) {} @@ -39,7 +39,7 @@ export class PrivacyComponent implements OnInit, AfterViewInit { ngOnInit() { this.titleService.setTitle('Privacy Policy | itzMiney'); - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; } ngAfterViewInit() { diff --git a/src/app/services/services.component.html b/src/app/services/services.component.html index 40b5e13..0fd6bd3 100644 --- a/src/app/services/services.component.html +++ b/src/app/services/services.component.html @@ -7,7 +7,7 @@
    -
    +

    {{ 'SERVS_TITLE' | translate}}

    Web Development & Design

    diff --git a/src/app/services/services.component.ts b/src/app/services/services.component.ts index f70446e..e1d188a 100644 --- a/src/app/services/services.component.ts +++ b/src/app/services/services.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit} 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 {NgIf, NgFor, NgStyle} from '@angular/common'; import {TranslatePipe, TranslateService} from '@ngx-translate/core'; @@ -21,7 +21,7 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component'; export class ServicesComponent implements OnInit { private apiUrl = '/api/stripe/create-checkout-session'; - isMobile: boolean = false; + isNarrow: boolean = false; activeTab: string[] = []; services: { @@ -33,7 +33,7 @@ export class ServicesComponent implements OnInit { }[] = []; constructor( - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private titleService: Title, private translate: TranslateService, private http: HttpClient @@ -45,7 +45,7 @@ export class ServicesComponent implements OnInit { ngOnInit() { this.titleService.setTitle('Services | itzMiney'); - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; this.loadServices(); this.translate.onLangChange.subscribe(() => this.loadServices()); } diff --git a/src/app/shared/audio-player/audio-player.component.html b/src/app/shared/audio-player/audio-player.component.html index 95ff82f..19de269 100644 --- a/src/app/shared/audio-player/audio-player.component.html +++ b/src/app/shared/audio-player/audio-player.component.html @@ -1,4 +1,4 @@ -
    +

    {{ nowPlayingTitle() }}

    diff --git a/src/app/shared/audio-player/audio-player.component.ts b/src/app/shared/audio-player/audio-player.component.ts index 5518e1d..6cdecb5 100644 --- a/src/app/shared/audio-player/audio-player.component.ts +++ b/src/app/shared/audio-player/audio-player.component.ts @@ -1,5 +1,5 @@ import {Component, AfterViewInit, signal, OnInit} from '@angular/core'; -import {DeviceDetectorService} from '../services/device-detector.service'; +import {ViewportService} from '../services/viewport.service'; import {NgClass} from '@angular/common'; @@ -19,17 +19,17 @@ declare global { styleUrl: './audio-player.component.css' }) export class AudioPlayerComponent implements AfterViewInit, OnInit { - isMobile: boolean = false; + isNarrow: boolean = false; private player: any; isPlayerReady = signal(false); isPlaying = signal(false); nowPlayingTitle = signal(''); - constructor(private deviceService: DeviceDetectorService) {} + constructor(private deviceService: ViewportService) {} ngOnInit() { - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; } ngAfterViewInit() { diff --git a/src/app/shared/mobile-navbar/mobile-navbar.component.ts b/src/app/shared/mobile-navbar/mobile-navbar.component.ts index bf69563..7689006 100644 --- a/src/app/shared/mobile-navbar/mobile-navbar.component.ts +++ b/src/app/shared/mobile-navbar/mobile-navbar.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit} from '@angular/core'; -import {DeviceDetectorService} from '../services/device-detector.service'; +import {ViewportService} from '../services/viewport.service'; import {NavigationEnd, Router, RouterLink} from '@angular/router'; import {TranslatePipe, TranslateService} from '@ngx-translate/core'; @@ -17,15 +17,15 @@ import {TranslatePipe, TranslateService} from '@ngx-translate/core'; export class MobileNavbarComponent implements OnInit{ currentLang: string; menuOpen = false; - isMobile: boolean = false; + isNarrow: boolean = false; activeLink: string = ''; constructor( private router: Router, - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private translate: TranslateService ) { - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; this.currentLang = this.translate.currentLang || this.translate.getDefaultLang() || 'en'; } diff --git a/src/app/shared/navbar/navbar.component.ts b/src/app/shared/navbar/navbar.component.ts index deb2a4f..b037beb 100644 --- a/src/app/shared/navbar/navbar.component.ts +++ b/src/app/shared/navbar/navbar.component.ts @@ -1,6 +1,6 @@ import {Component, OnInit} from '@angular/core'; import {NavigationEnd, Router, RouterLink} from '@angular/router'; -import {DeviceDetectorService} from '../services/device-detector.service'; +import {ViewportService} from '../services/viewport.service'; import {filter} from 'rxjs/operators'; import {TranslatePipe, TranslateService} from '@ngx-translate/core'; @@ -16,14 +16,14 @@ import {TranslatePipe, TranslateService} from '@ngx-translate/core'; export class NavbarComponent implements OnInit { currentLang: string; activeLink: string = ''; - isMobile: boolean = false; + isNarrow: boolean = false; constructor( private router: Router, - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private translate: TranslateService ) { - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; this.currentLang = this.translate.currentLang || this.translate.getDefaultLang() || 'en'; } diff --git a/src/app/shared/parallax/parallax.component.ts b/src/app/shared/parallax/parallax.component.ts index 806f2ea..e35321b 100644 --- a/src/app/shared/parallax/parallax.component.ts +++ b/src/app/shared/parallax/parallax.component.ts @@ -1,5 +1,5 @@ import {AfterViewInit, Component, ElementRef, Inject, OnDestroy, OnInit, PLATFORM_ID, ViewChild, Input} from '@angular/core'; -import {DeviceDetectorService} from '../services/device-detector.service'; +import {ViewportService} from '../services/viewport.service'; import {isPlatformBrowser} from '@angular/common'; import Parallax from 'parallax-js'; @@ -16,17 +16,17 @@ export class ParallaxComponent implements OnInit, OnDestroy, AfterViewInit { @Input() bgGradient: string = 'radial-gradient(circle 120vw at center, rgba(90,78,130,0.32), transparent 40%), linear-gradient(180deg,#1b172c 0%, #0b0b0f 100%)'; - isMobile: boolean = false; + isNarrow: boolean = false; private parallaxInstance: Parallax | null = null; constructor( - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, @Inject(PLATFORM_ID) private platformId: Object ) { } ngOnInit() { - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; } ngAfterViewInit() { @@ -39,8 +39,8 @@ export class ParallaxComponent implements OnInit, OnDestroy, AfterViewInit { clipRelativeInput: true, calibrateX: true, calibrateY: true, - scalarX: this.isMobile ? 6 : 12, - scalarY: this.isMobile ? 6 : 12, + scalarX: this.isNarrow ? 6 : 12, + scalarY: this.isNarrow ? 6 : 12, frictionX: 0.1, frictionY: 0.1, }); diff --git a/src/app/shared/services/device-detector.service.ts b/src/app/shared/services/viewport.service.ts similarity index 77% rename from src/app/shared/services/device-detector.service.ts rename to src/app/shared/services/viewport.service.ts index 1f5ad4f..f62f81b 100644 --- a/src/app/shared/services/device-detector.service.ts +++ b/src/app/shared/services/viewport.service.ts @@ -4,8 +4,8 @@ import {isPlatformBrowser} from '@angular/common'; @Injectable({ providedIn: 'root', }) -export class DeviceDetectorService { - isMobile: boolean = false; +export class ViewportService { + isNarrow: boolean = false; constructor(@Inject(PLATFORM_ID) private platformId: Object) { this.updateDeviceType(); @@ -16,9 +16,9 @@ export class DeviceDetectorService { private updateDeviceType() { if (isPlatformBrowser(this.platformId)) { - this.isMobile = window.innerWidth <= 768; + this.isNarrow = window.innerWidth <= 768; } else { - this.isMobile = false; + this.isNarrow = false; } } } diff --git a/src/app/socials/socials.component.html b/src/app/socials/socials.component.html index dfc8b37..e2778bd 100644 --- a/src/app/socials/socials.component.html +++ b/src/app/socials/socials.component.html @@ -9,7 +9,7 @@
    -
    +

    Socials

    {{ 'SOCIALS_SUB' | translate }}

    diff --git a/src/app/socials/socials.component.ts b/src/app/socials/socials.component.ts index 561a209..b07ef5c 100644 --- a/src/app/socials/socials.component.ts +++ b/src/app/socials/socials.component.ts @@ -1,6 +1,6 @@ import {Component, OnInit} from '@angular/core'; import {NgStyle} from '@angular/common'; -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'; @@ -16,14 +16,14 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component'; styleUrl: './socials.component.css' }) export class SocialsComponent implements OnInit { - isMobile: boolean = false; + isNarrow: boolean = false; constructor( - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private titleService: Title ) {} ngOnInit() { this.titleService.setTitle('Socials | itzMiney'); - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; } } diff --git a/src/app/tos/tos.component.html b/src/app/tos/tos.component.html index 3613473..b703263 100644 --- a/src/app/tos/tos.component.html +++ b/src/app/tos/tos.component.html @@ -7,7 +7,7 @@
    -
    +
    • {{ 'termsOfService.sections.introduction.title' | translate }}
    • {{ 'termsOfService.sections.servicesProvided.title' | translate }}
    • diff --git a/src/app/tos/tos.component.ts b/src/app/tos/tos.component.ts index 9250271..1892a33 100644 --- a/src/app/tos/tos.component.ts +++ b/src/app/tos/tos.component.ts @@ -1,5 +1,5 @@ import {AfterViewInit, Component, OnInit,} 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 {NgIf} from '@angular/common'; import {TranslatePipe} from '@ngx-translate/core'; @@ -17,12 +17,12 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component'; }) export class TosComponent implements OnInit, AfterViewInit { - isMobile: boolean = false; + isNarrow: boolean = false; activeSection: string = ''; copiedSection: string | null = null; constructor( - private deviceService: DeviceDetectorService, + private deviceService: ViewportService, private titleService: Title ) {} @@ -41,7 +41,7 @@ export class TosComponent implements OnInit, AfterViewInit { ngOnInit() { this.titleService.setTitle('Terms of Service | itzMiney'); - this.isMobile = this.deviceService.isMobile; + this.isNarrow = this.deviceService.isNarrow; } ngAfterViewInit() {