From bfd11060ec646b75742afa943e4d7c79c0f80dc4 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 1 Apr 2022 01:53:59 -0700 Subject: [PATCH] Add version check to app frame --- .../app-frame/app-frame.component.html | 16 ++++++++++++++-- .../app-frame/app-frame.component.scss | 19 +++++++++++++++++++ .../app-frame/app-frame.component.ts | 16 ++++++++++++++-- src-ui/src/theme.scss | 1 + 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html index aca66eb3a..208100af8 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.html +++ b/src-ui/src/app/components/app-frame/app-frame.component.html @@ -183,8 +183,20 @@ diff --git a/src-ui/src/app/components/app-frame/app-frame.component.scss b/src-ui/src/app/components/app-frame/app-frame.component.scss index 95cb888e7..6fe4c1ed9 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.scss +++ b/src-ui/src/app/components/app-frame/app-frame.component.scss @@ -176,3 +176,22 @@ } } } + +.version-check { + animation: pulse 2s ease-in-out 0s 1; +} + +@keyframes pulse { + 0% { + opacity: 0; + } + 25% { + opacity: 100%; + } + 75% { + opacity: 0; + } + 100% { + opacity: 100%; + } +} diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts index a038c9a31..a335aad1d 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.ts +++ b/src-ui/src/app/components/app-frame/app-frame.component.ts @@ -18,6 +18,10 @@ import { DocumentDetailComponent } from '../document-detail/document-detail.comp import { Meta } from '@angular/platform-browser' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { FILTER_FULLTEXT_QUERY } from 'src/app/data/filter-rule-type' +import { + RemoteVersionService, + AppRemoteVersion, +} from 'src/app/services/rest/remote-version.service' @Component({ selector: 'app-app-frame', @@ -32,10 +36,18 @@ export class AppFrameComponent { private searchService: SearchService, public savedViewService: SavedViewService, private list: DocumentListViewService, - private meta: Meta - ) {} + private meta: Meta, + private remoteVersionService: RemoteVersionService + ) { + this.remoteVersionService + .checkForUpdates() + .subscribe((appRemoteVersion: AppRemoteVersion) => { + this.appRemoteVersion = appRemoteVersion + }) + } versionString = `${environment.appTitle} ${environment.version}` + appRemoteVersion isMenuCollapsed: boolean = true diff --git a/src-ui/src/theme.scss b/src-ui/src/theme.scss index 916524e89..cb6ee859a 100644 --- a/src-ui/src/theme.scss +++ b/src-ui/src/theme.scss @@ -271,6 +271,7 @@ table.table { .popover-body { background-color: var(--ngx-bg-alt); border-color: var(--bs-border-color); + color: var(--bs-body-color); } }