Mise en ligne de la version 0.2.0
All checks were successful
Build & Push Images / build (brain) (push) Successful in 46s
Build & Push Images / build (core) (push) Successful in 1m21s
Build & Push Images / build (web) (push) Successful in 1m25s

This commit is contained in:
2026-04-21 14:25:17 +02:00
parent ebee8e106b
commit ba8a503b3e
300 changed files with 35329 additions and 1 deletions

View File

@@ -0,0 +1,72 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Router } from '@angular/router';
import { LucideAngularModule, BookOpen, Folder, Plus } from 'lucide-angular';
import { LoreService } from '../services/lore.service';
import { Lore } from '../services/lore.model';
import { LoreCreateComponent } from './lore-create/lore-create.component';
@Component({
selector: 'app-lore',
standalone: true,
imports: [CommonModule, LucideAngularModule, LoreCreateComponent],
templateUrl: './lore.component.html',
styleUrls: ['./lore.component.scss']
})
export class LoreComponent implements OnInit {
lores: Lore[] = [];
loading = true;
error = false;
readonly BookOpen = BookOpen;
readonly Folder = Folder;
readonly Plus = Plus;
showCreateModal = false;
constructor(
private loreService: LoreService,
private router: Router
) {}
ngOnInit(): void {
this.loadLores();
}
loadLores(): void {
this.loreService.getAllLores().subscribe({
next: (data) => {
this.lores = data;
this.loading = false;
},
error: () => {
this.error = true;
this.loading = false;
}
});
}
openCreateModal(): void {
this.showCreateModal = true;
}
onModalClose(): void {
this.showCreateModal = false;
}
onLoreCreated(data: { name: string; description: string }): void {
this.loreService.createLore(data).subscribe({
next: () => {
this.showCreateModal = false;
this.loadLores();
},
error: () => {
console.error('Erreur lors de la création du Lore');
}
});
}
navigateToDetail(id: string): void {
this.router.navigate(['/lore', id]);
}
}