Skip to content

Commit

Permalink
frontend: Added version to console page
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Oct 25, 2024
1 parent fecd2d4 commit 4f1323f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
</a>
</ng-container>
</mat-nav-list>

@if (!isSideMenuCollapsed) {
<div class="separator"></div>
<div class="version">
<p>v{{ version }}</p>
</div>
}
</mat-sidenav>

<!-- Main content -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -20,6 +21,7 @@ export class ConsoleNavComponent {
isMobile = false;
isTablet = false;
isSideMenuCollapsed = false;
version: string = packageJson.version;
@Input() navLinks: ConsoleNavLink[] = [];

@Output() onLogoutClicked: EventEmitter<void> = new EventEmitter<void>();
Expand Down
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -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;
Expand Down

0 comments on commit 4f1323f

Please sign in to comment.