Ajout de 2 fonctionnalitées principales : import PDF que ce soit pour les règles ou les campagnes directement.
Fonctionnalité de comparaison PDF / campagne pour faire un mix et demander des conseils à l'IA
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Component, Input, Output, EventEmitter, HostListener, OnDestroy, ElementRef } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { Router } from '@angular/router';
|
||||
import { LucideAngularModule, ChevronRight, ChevronDown, PanelLeftClose, PanelLeftOpen, Plus, FolderPlus, FilePlus, LucideIconData } from 'lucide-angular';
|
||||
import { LucideAngularModule, ChevronRight, ChevronDown, PanelLeftClose, PanelLeftOpen, Plus, FolderPlus, FilePlus, Home, LucideIconData } from 'lucide-angular';
|
||||
import { TreeItem, TreeCreateAction, SidebarAction, BottomPanel, BottomPanelItem, LayoutService } from '../../services/layout.service';
|
||||
import { resolveIcon } from '../../lore/lore-icons';
|
||||
|
||||
@@ -14,6 +14,8 @@ import { resolveIcon } from '../../lore/lore-icons';
|
||||
})
|
||||
export class SecondarySidebarComponent implements OnDestroy {
|
||||
@Input() title = '';
|
||||
/** Si défini, le titre est cliquable et navigue vers cette route (accueil de section). */
|
||||
@Input() titleRoute: string | null = null;
|
||||
@Input() createActions: SidebarAction[] = [];
|
||||
@Input() bottomPanel: BottomPanel | null = null;
|
||||
@Output() collapsedChange = new EventEmitter<boolean>();
|
||||
@@ -28,6 +30,7 @@ export class SecondarySidebarComponent implements OnDestroy {
|
||||
readonly Plus = Plus;
|
||||
readonly FolderPlus = FolderPlus;
|
||||
readonly FilePlus = FilePlus;
|
||||
readonly Home = Home;
|
||||
|
||||
isCollapsed = false;
|
||||
|
||||
@@ -114,6 +117,19 @@ export class SecondarySidebarComponent implements OnDestroy {
|
||||
if (action.route) { this.router.navigate([action.route]); }
|
||||
}
|
||||
|
||||
/** Clic sur le titre cliquable : retour à l'accueil de la section (ex: campagne). */
|
||||
clickTitle(): void {
|
||||
if (this.titleRoute) { this.router.navigate([this.titleRoute]); }
|
||||
}
|
||||
|
||||
/** True si on est déjà sur la route du titre (surligne le titre comme actif). */
|
||||
isTitleActive(): boolean {
|
||||
if (!this.titleRoute) return false;
|
||||
return this.router.isActive(this.titleRoute, {
|
||||
paths: 'exact', queryParams: 'ignored', fragment: 'ignored', matrixParams: 'ignored'
|
||||
});
|
||||
}
|
||||
|
||||
clickItem(item: TreeItem): void {
|
||||
if (item.route) { this.router.navigate([item.route]); return; }
|
||||
this.toggleItem(item.id);
|
||||
|
||||
Reference in New Issue
Block a user