Migration Angular 20 -> 21 : fin de la migration securite (0 vulnerabilite npm)
- ng update @angular/core@21 @angular/cli@21 (corrige GHSA-jrmj-c5cx-3cw6, XSS SVG) - Migration automatique des templates vers le control flow natif (@if/@for, 138 fichiers) - Correction des 5 `track` invalides generes par la migration (trackBy a 1 argument -> track $index) + suppression des fonctions trackBy mortes - TypeScript 5.9, zone.js 0.15 ; npm audit : 0 vulnerabilite Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,51 +1,59 @@
|
||||
<div class="gs-overlay" *ngIf="open" (click)="close()">
|
||||
<div class="gs-modal" (click)="$event.stopPropagation()">
|
||||
|
||||
<div class="gs-input-row">
|
||||
<lucide-icon [img]="Search" [size]="18" class="gs-search-icon"></lucide-icon>
|
||||
<input
|
||||
#searchInput
|
||||
type="text"
|
||||
class="gs-input"
|
||||
placeholder="Rechercher dans LoreMind..."
|
||||
[ngModel]="query"
|
||||
(ngModelChange)="onQueryChange($event)" />
|
||||
<span class="gs-kbd">ESC</span>
|
||||
</div>
|
||||
|
||||
<div class="gs-results" *ngIf="results.length > 0">
|
||||
<button
|
||||
*ngFor="let r of results; let i = index"
|
||||
class="gs-result"
|
||||
[class.active]="i === activeIndex"
|
||||
(mouseenter)="activeIndex = i"
|
||||
(click)="select(r)">
|
||||
<lucide-icon [img]="iconFor(r.kind)" [size]="16" class="gs-result-icon"></lucide-icon>
|
||||
<div class="gs-result-body">
|
||||
<div class="gs-result-title">{{ r.title }}</div>
|
||||
<div class="gs-result-subtitle" *ngIf="r.subtitle">{{ r.subtitle }}</div>
|
||||
<div class="gs-result-tag">{{ r.tag }}</div>
|
||||
@if (open) {
|
||||
<div class="gs-overlay" (click)="close()">
|
||||
<div class="gs-modal" (click)="$event.stopPropagation()">
|
||||
<div class="gs-input-row">
|
||||
<lucide-icon [img]="Search" [size]="18" class="gs-search-icon"></lucide-icon>
|
||||
<input
|
||||
#searchInput
|
||||
type="text"
|
||||
class="gs-input"
|
||||
placeholder="Rechercher dans LoreMind..."
|
||||
[ngModel]="query"
|
||||
(ngModelChange)="onQueryChange($event)" />
|
||||
<span class="gs-kbd">ESC</span>
|
||||
</div>
|
||||
@if (results.length > 0) {
|
||||
<div class="gs-results">
|
||||
@for (r of results; track r; let i = $index) {
|
||||
<button
|
||||
class="gs-result"
|
||||
[class.active]="i === activeIndex"
|
||||
(mouseenter)="activeIndex = i"
|
||||
(click)="select(r)">
|
||||
<lucide-icon [img]="iconFor(r.kind)" [size]="16" class="gs-result-icon"></lucide-icon>
|
||||
<div class="gs-result-body">
|
||||
<div class="gs-result-title">{{ r.title }}</div>
|
||||
@if (r.subtitle) {
|
||||
<div class="gs-result-subtitle">{{ r.subtitle }}</div>
|
||||
}
|
||||
<div class="gs-result-tag">{{ r.tag }}</div>
|
||||
</div>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="gs-empty" *ngIf="!loading && query.trim().length >= 2 && results.length === 0">
|
||||
Aucun résultat
|
||||
</div>
|
||||
<div class="gs-empty" *ngIf="query.trim().length < 2">
|
||||
Tape au moins 2 caractères
|
||||
</div>
|
||||
|
||||
<div class="gs-footer">
|
||||
<div class="gs-hints">
|
||||
<span><kbd>↑</kbd><kbd>↓</kbd> naviguer</span>
|
||||
<span><kbd>↵</kbd> sélectionner</span>
|
||||
<span><kbd>ESC</kbd> fermer</span>
|
||||
}
|
||||
@if (!loading && query.trim().length >= 2 && results.length === 0) {
|
||||
<div class="gs-empty">
|
||||
Aucun résultat
|
||||
</div>
|
||||
}
|
||||
@if (query.trim().length < 2) {
|
||||
<div class="gs-empty">
|
||||
Tape au moins 2 caractères
|
||||
</div>
|
||||
}
|
||||
<div class="gs-footer">
|
||||
<div class="gs-hints">
|
||||
<span><kbd>↑</kbd><kbd>↓</kbd> naviguer</span>
|
||||
<span><kbd>↵</kbd> sélectionner</span>
|
||||
<span><kbd>ESC</kbd> fermer</span>
|
||||
</div>
|
||||
@if (results.length > 0) {
|
||||
<span class="gs-count">
|
||||
{{ results.length }} résultat{{ results.length > 1 ? 's' : '' }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
<span class="gs-count" *ngIf="results.length > 0">
|
||||
{{ results.length }} résultat{{ results.length > 1 ? 's' : '' }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user