Ajout d'un script pour installation automatique du produit
Ajout d'une partie mise à jour automatique : plus besoin de docker pull en ligne de commande ; on peut passer par l'interface Refactoring partie Java pour respecter d'avantage le DDD : plus de jackson dans la partie domain Passage version 0.6.6
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
<button class="tool-btn" *ngIf="!config.demoMode" [class.active]="currentRoute.startsWith('/settings')" (click)="navigateTo('/settings')">
|
||||
<lucide-icon [img]="Settings" [size]="16"></lucide-icon>
|
||||
<span>Paramètres</span>
|
||||
<span class="update-badge" *ngIf="updateAvailable$ | async" title="Mise a jour disponible">MAJ</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -178,6 +178,23 @@
|
||||
border: 1px solid #3a3f55;
|
||||
}
|
||||
|
||||
.update-badge {
|
||||
margin-left: auto;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.05em;
|
||||
background: #6c63ff;
|
||||
color: white;
|
||||
padding: 0.15rem 0.4rem;
|
||||
border-radius: 3px;
|
||||
animation: update-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes update-pulse {
|
||||
0%, 100% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.5); }
|
||||
50% { box-shadow: 0 0 0 4px rgba(108, 99, 255, 0); }
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid #1e1e3a;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AsyncPipe, NgIf, NgFor } from '@angular/common';
|
||||
import { Router } from '@angular/router';
|
||||
import { LucideAngularModule, Search, Download, Settings, ArrowLeft, Dices } from 'lucide-angular';
|
||||
import { LayoutService } from '../services/layout.service';
|
||||
import { GlobalSearchService } from '../services/global-search.service';
|
||||
import { ConfigService } from '../services/config.service';
|
||||
import { UpdatesService } from '../services/updates.service';
|
||||
// Single source of truth pour la version affichée dans le footer :
|
||||
// on lit directement package.json à la compilation (resolveJsonModule).
|
||||
import packageJson from '../../../package.json';
|
||||
@@ -16,7 +17,7 @@ import packageJson from '../../../package.json';
|
||||
templateUrl: './sidebar.component.html',
|
||||
styleUrls: ['./sidebar.component.scss']
|
||||
})
|
||||
export class SidebarComponent {
|
||||
export class SidebarComponent implements OnInit {
|
||||
currentRoute = '';
|
||||
|
||||
readonly Search = Search;
|
||||
@@ -27,18 +28,30 @@ export class SidebarComponent {
|
||||
|
||||
readonly layoutConfig$ = this.layoutService.secondarySidebar$;
|
||||
readonly appVersion = packageJson.version;
|
||||
readonly updateAvailable$ = this.updates.updateAvailable$;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private layoutService: LayoutService,
|
||||
private globalSearch: GlobalSearchService,
|
||||
public config: ConfigService
|
||||
public config: ConfigService,
|
||||
private updates: UpdatesService
|
||||
) {
|
||||
this.router.events.subscribe(() => {
|
||||
this.currentRoute = this.router.url;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
// Premier check au boot uniquement si la feature est activee + mode non-demo.
|
||||
// L'erreur 401 (admin non auth) est silencieusement ignoree par le service —
|
||||
// le badge ne s'affichera que si l'utilisateur est passe par /settings et a
|
||||
// saisi ses credentials HTTP Basic. Comportement attendu mono-utilisateur.
|
||||
if (this.config.updateCheckEnabled && !this.config.demoMode) {
|
||||
this.updates.checkNow().subscribe();
|
||||
}
|
||||
}
|
||||
|
||||
navigateTo(route: string): void {
|
||||
this.router.navigate([route]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user