feat: added bot, light and dark mode

This commit was merged in pull request #1.
This commit is contained in:
2026-04-22 10:22:22 +02:00
parent e83ec814d9
commit 2de003e497
36 changed files with 2047 additions and 498 deletions
@@ -0,0 +1,39 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { CommonModule } from '@angular/common';
type PromotionPieceType = 'queen' | 'rook' | 'bishop' | 'knight';
interface PromotionPieceOption {
type: PromotionPieceType;
label: string;
symbol: string;
}
@Component({
selector: 'app-promotion-dialog',
standalone: true,
imports: [CommonModule],
templateUrl: './promotion-dialog.component.html',
styleUrl: './promotion-dialog.component.css'
})
export class PromotionDialogComponent {
@Input() isOpen = false;
@Output() promotionSelected = new EventEmitter<PromotionPieceType>();
@Output() closed = new EventEmitter<void>();
promotionPieces: PromotionPieceOption[] = [
{ type: 'queen', label: 'Queen', symbol: '♕' },
{ type: 'rook', label: 'Rook', symbol: '♖' },
{ type: 'bishop', label: 'Bishop', symbol: '♗' },
{ type: 'knight', label: 'Knight', symbol: '♘' }
];
selectPromotion(type: PromotionPieceType): void {
this.promotionSelected.emit(type);
this.isOpen = false;
}
close(): void {
this.closed.emit();
this.isOpen = false;
}
}