From 4f1323fb62bacae123842a46111e3c7f4342d2ee Mon Sep 17 00:00:00 2001
From: Carlos Santos <4a.santos@gmail.com>
Date: Fri, 25 Oct 2024 09:45:35 +0200
Subject: [PATCH] frontend: Added version to console page
---
.../cards/logo-card/logo-card.component.scss | 2 +-
.../console-nav/console-nav.component.html | 7 +++++++
.../console-nav/console-nav.component.scss | 15 +++++++++++++++
.../console-nav/console-nav.component.ts | 2 ++
.../dynamic-grid/dynamic-grid.component.ts | 4 ++--
5 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/frontend/projects/shared-call-components/src/lib/components/cards/logo-card/logo-card.component.scss b/frontend/projects/shared-call-components/src/lib/components/cards/logo-card/logo-card.component.scss
index 86d7a6aa..c5c5628a 100644
--- a/frontend/projects/shared-call-components/src/lib/components/cards/logo-card/logo-card.component.scss
+++ b/frontend/projects/shared-call-components/src/lib/components/cards/logo-card/logo-card.component.scss
@@ -3,7 +3,7 @@
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.3s ease-in-out;
- position: relative; // Para posicionar el icono de selección
+ position: relative;
&:hover {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
diff --git a/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.html b/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.html
index bc57d4e9..43fc1c3b 100644
--- a/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.html
+++ b/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.html
@@ -40,6 +40,13 @@
+
+ @if (!isSideMenuCollapsed) {
+
+
+ }
diff --git a/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.scss b/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.scss
index 484b5eb8..ecd85786 100644
--- a/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.scss
+++ b/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.scss
@@ -59,6 +59,10 @@ mat-sidenav {
}
}
+.mat-mdc-nav-list {
+ height: calc(100% - 3.5rem - 25px);
+}
+
// Move the content down so that it won't be hidden by the toolbar
mat-sidenav-content {
padding-top: 3.5rem;
@@ -87,3 +91,14 @@ mat-sidenav-content {
.menu-hr {
margin: 0px !important;
}
+.version {
+ margin-top: auto;
+ padding: 0.5rem;
+ font-size: 0.875rem;
+ color: #757575;
+ text-align: center;
+}
+.separator {
+ margin: 0px;
+ border-top: 1px solid #e0e0e0;
+}
diff --git a/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.ts b/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.ts
index d1948cc7..a8a0e888 100644
--- a/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.ts
+++ b/frontend/projects/shared-call-components/src/lib/components/console-nav/console-nav.component.ts
@@ -8,6 +8,7 @@ import { MatToolbarModule } from '@angular/material/toolbar';
import { RouterModule } from '@angular/router';
import { ConsoleNavLink } from '../../models/sidenav.model';
+import packageJson from 'package.json';
@Component({
selector: 'ov-console-nav',
standalone: true,
@@ -20,6 +21,7 @@ export class ConsoleNavComponent {
isMobile = false;
isTablet = false;
isSideMenuCollapsed = false;
+ version: string = packageJson.version;
@Input() navLinks: ConsoleNavLink[] = [];
@Output() onLogoutClicked: EventEmitter = new EventEmitter();
diff --git a/frontend/projects/shared-call-components/src/lib/components/dynamic-grid/dynamic-grid.component.ts b/frontend/projects/shared-call-components/src/lib/components/dynamic-grid/dynamic-grid.component.ts
index 77d782bc..82ffee8f 100644
--- a/frontend/projects/shared-call-components/src/lib/components/dynamic-grid/dynamic-grid.component.ts
+++ b/frontend/projects/shared-call-components/src/lib/components/dynamic-grid/dynamic-grid.component.ts
@@ -1,5 +1,5 @@
import { CommonModule } from '@angular/common';
-import { Component, HostListener, Input } from '@angular/core';
+import { Component, HostListener, Input, OnInit } from '@angular/core';
import { MatGridListModule } from '@angular/material/grid-list';
@Component({
@@ -9,7 +9,7 @@ import { MatGridListModule } from '@angular/material/grid-list';
templateUrl: './dynamic-grid.component.html',
styleUrl: './dynamic-grid.component.scss'
})
-export class DynamicGridComponent {
+export class DynamicGridComponent implements OnInit {
@Input() maxColumns: number = 3; // Maximum number of columns
columns: number = 1; // Current number of columns
private itemsCount: number = 0;