feat(footer): bind version with package.json

This commit is contained in:
tekh 2025-08-08 12:55:05 +02:00
parent 17d4bc51f4
commit 4f5d034e53
6 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "user-manager-ui", "name": "user-manager-ui",
"version": "4.0.0", "version": "6.1.3",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start:ssl": "ng serve --ssl -o", "start:ssl": "ng serve --ssl -o",

View File

@ -4,7 +4,7 @@
<div class="footer-links"> <div class="footer-links">
<a mat-button class="mat-body-strong" [routerLink]="['/privacy-policy']">Datenschutz</a> <a mat-button class="mat-body-strong" [routerLink]="['/privacy-policy']">Datenschutz</a>
<a mat-button class="mat-body-strong" href="https://digitaldata.works/#kontakt" target="_blank">Kontakt</a> <a mat-button class="mat-body-strong" href="https://digitaldata.works/#kontakt" target="_blank">Kontakt</a>
<span mat-button class="mat-body-strong">v1.0.0</span> <span mat-button class="mat-body-strong">{{appVersion}}</span>
</div> </div>
</mat-toolbar> </mat-toolbar>
</footer> </footer>

View File

@ -1,5 +1,4 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component'; import { FooterComponent } from './footer.component';
describe('FooterComponent', () => { describe('FooterComponent', () => {

View File

@ -1,6 +1,7 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { MatToolbarModule } from '@angular/material/toolbar'; import { MatToolbarModule } from '@angular/material/toolbar';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { name, version } from '../../../../package.json';
@Component({ @Component({
selector: 'app-footer', selector: 'app-footer',
@ -12,5 +13,5 @@ import { RouterModule } from '@angular/router';
styleUrl: './footer.component.scss' styleUrl: './footer.component.scss'
}) })
export class FooterComponent { export class FooterComponent {
appVersion: string = name + ' v' + version;
} }

View File

@ -1,5 +1,8 @@
import { Version } from "@angular/core";
export const env = { export const env = {
production: false, production: true,
version: new Version("6.1.3"),
default_api_url: "/api", default_api_url: "/api",
routes: { routes: {
user: "/user", user: "/user",

View File

@ -21,7 +21,8 @@
"lib": [ "lib": [
"ES2022", "ES2022",
"dom" "dom"
] ],
"resolveJsonModule": true
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false, "enableI18nLegacyMessageIdFormat": false,