From 2e25a16e50d1e25f3231905351b2c752536dd101 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Nov 2023 16:55:31 -0400 Subject: [PATCH] more mobile responsive --- .../src/app/_services/account.service.ts | 1 + .../src/app/_services/nav-bar.service.ts | 11 +++++++ .../angularapp/src/app/app.component.css | 15 ++++++++++ .../angularapp/src/app/app.component.html | 16 +++++----- .../angularapp/src/app/app.component.ts | 30 +++++++++++++++---- .../src/app/settings/settings.component.html | 10 ++++--- .../src/app/settings/settings.component.ts | 8 ++++- 7 files changed, 74 insertions(+), 17 deletions(-) create mode 100644 OpenAlprWebhookProcessor/angularapp/src/app/_services/nav-bar.service.ts diff --git a/OpenAlprWebhookProcessor/angularapp/src/app/_services/account.service.ts b/OpenAlprWebhookProcessor/angularapp/src/app/_services/account.service.ts index e4067af5..c4efb819 100644 --- a/OpenAlprWebhookProcessor/angularapp/src/app/_services/account.service.ts +++ b/OpenAlprWebhookProcessor/angularapp/src/app/_services/account.service.ts @@ -48,6 +48,7 @@ export class AccountService { this.userValue.jwtToken = ''; localStorage.removeItem('user'); this.router.navigate(['/account/login']); + this.userSubject.next(new User()); } refreshToken() { diff --git a/OpenAlprWebhookProcessor/angularapp/src/app/_services/nav-bar.service.ts b/OpenAlprWebhookProcessor/angularapp/src/app/_services/nav-bar.service.ts new file mode 100644 index 00000000..54b3ab5c --- /dev/null +++ b/OpenAlprWebhookProcessor/angularapp/src/app/_services/nav-bar.service.ts @@ -0,0 +1,11 @@ +import { Injectable } from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; + +@Injectable({ providedIn: 'root' }) +export class NavBarService { + public settingsButtonClicked: BehaviorSubject = new BehaviorSubject(false); + + public settingsClicked() { + this.settingsButtonClicked.next(true); + } +} \ No newline at end of file diff --git a/OpenAlprWebhookProcessor/angularapp/src/app/app.component.css b/OpenAlprWebhookProcessor/angularapp/src/app/app.component.css index e69de29b..b82fa477 100644 --- a/OpenAlprWebhookProcessor/angularapp/src/app/app.component.css +++ b/OpenAlprWebhookProcessor/angularapp/src/app/app.component.css @@ -0,0 +1,15 @@ +@media only screen and (max-width: 750px) { + span { + display: none; + } + + .home-button { + display: none; + } +} + +@media only screen and (min-width: 751px) { + .menu-button { + display: none; + } +} \ No newline at end of file diff --git a/OpenAlprWebhookProcessor/angularapp/src/app/app.component.html b/OpenAlprWebhookProcessor/angularapp/src/app/app.component.html index b28b636b..e043c78a 100644 --- a/OpenAlprWebhookProcessor/angularapp/src/app/app.component.html +++ b/OpenAlprWebhookProcessor/angularapp/src/app/app.component.html @@ -1,10 +1,12 @@ -