From f49404f8be9ea3ab487280f45dd10ed4443c81f3 Mon Sep 17 00:00:00 2001 From: benjamin Date: Sun, 16 Feb 2025 12:40:08 +0100 Subject: [PATCH] fix key events and add time to fullscreen --- src/app/modules/shows/show/show.component.html | 5 +++-- src/app/modules/shows/show/show.component.less | 7 +++++++ src/app/modules/shows/show/show.component.ts | 15 +++++++++++---- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/app/modules/shows/show/show.component.html b/src/app/modules/shows/show/show.component.html index a353cb9..474da1d 100644 --- a/src/app/modules/shows/show/show.component.html +++ b/src/app/modules/shows/show/show.component.html @@ -19,8 +19,8 @@ + [icon]="useSwiper ? faRestore : faMaximize" class="btn-delete btn-icon" + matTooltip="Vollbild">
+
{{ currentTime | date: 'HH:mm' }}
{{ next }}
diff --git a/src/app/modules/shows/show/show.component.less b/src/app/modules/shows/show/show.component.less index f57fde9..442d76d 100644 --- a/src/app/modules/shows/show/show.component.less +++ b/src/app/modules/shows/show/show.component.less @@ -60,3 +60,10 @@ padding: 6px; } } + +.time { + color: #0008; + position: fixed; + bottom: 0; + left: 10px; +} diff --git a/src/app/modules/shows/show/show.component.ts b/src/app/modules/shows/show/show.component.ts index d493ac9..75df8b6 100644 --- a/src/app/modules/shows/show/show.component.ts +++ b/src/app/modules/shows/show/show.component.ts @@ -14,12 +14,12 @@ import { faBox, faBoxOpen, faChevronRight, - faFile, faFileDownload, - faFileLines, faLock, faMagnifyingGlassMinus, faMagnifyingGlassPlus, + faMaximize, + faMinimize, faSliders, faUnlock, faUser, @@ -101,9 +101,10 @@ export class ShowComponent implements OnInit, OnDestroy { public faZoomOut = faMagnifyingGlassMinus; public useSwiper = false; public textSize = 1; - public faFileLines = faFileLines; - public faFile = faFile; + public faRestore = faMinimize; + public faMaximize = faMaximize; public faNextSong = faChevronRight; + public currentTime: Date; private subs: Subscription[] = []; public constructor( @@ -119,6 +120,10 @@ export class ShowComponent implements OnInit, OnDestroy { ) {} public ngOnInit(): void { + this.currentTime = new Date(); + setInterval(() => { + this.currentTime = new Date(); + }, 10000); this.show$ = this.activatedRoute.params.pipe( map(param => param as {showId: string}), map(param => param.showId), @@ -223,6 +228,7 @@ export class ShowComponent implements OnInit, OnDestroy { @HostListener('document:keydown', ['$event']) public handleKeyboardEvent(event: KeyboardEvent) { + if (!this.useSwiper) return; const swiperEl = document.querySelector('swiper-container') as unknown as Swiper; switch (event.code) { case 'ArrowRight': @@ -237,6 +243,7 @@ export class ShowComponent implements OnInit, OnDestroy { } public fullscreen(useSwiper: boolean) { + this.textSize = useSwiper ? 2 : 1; if (useSwiper) openFullscreen(); else closeFullscreen(); }