- Corriger la troncature de la toolbar (max-height 4rem → 5rem) - Animer la toolbar en translateY pour un effet "bloc uni" avec le header - Corriger le bug d'auto-hide du header après switch simple → scroll - Augmenter la taille du titre de chapitre dans la toolbar (text-sm font-medium) - Harmoniser le bouton scroll-to-top avec le style des ToolbarButtons - Ajouter support de prop `class` sur les labels de ToolbarSection
93 lines
1.8 KiB
PHP
93 lines
1.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Domain\Reader\Domain\Model;
|
|
|
|
use App\Domain\Reader\Domain\ValueObject\ChapterId;
|
|
|
|
readonly class ChapterContext
|
|
{
|
|
public function __construct(
|
|
private ChapterId $id,
|
|
private ?ChapterId $previousChapterId,
|
|
private ?ChapterId $nextChapterId,
|
|
private string $mangaId,
|
|
private string $mangaTitle,
|
|
private float $number,
|
|
private ?string $chapterTitle,
|
|
private ?string $cbzPath,
|
|
private ?int $volume,
|
|
private int $totalPages,
|
|
private bool $isVisible,
|
|
private \DateTimeImmutable $createdAt,
|
|
private ?string $pagesDirectory = null,
|
|
) {
|
|
}
|
|
|
|
public function getId(): ChapterId
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getPreviousChapterId(): ?ChapterId
|
|
{
|
|
return $this->previousChapterId;
|
|
}
|
|
|
|
public function getNextChapterId(): ?ChapterId
|
|
{
|
|
return $this->nextChapterId;
|
|
}
|
|
|
|
public function getMangaId(): string
|
|
{
|
|
return $this->mangaId;
|
|
}
|
|
|
|
public function getMangaTitle(): string
|
|
{
|
|
return $this->mangaTitle;
|
|
}
|
|
|
|
public function getNumber(): float
|
|
{
|
|
return $this->number;
|
|
}
|
|
|
|
public function getChapterTitle(): ?string
|
|
{
|
|
return $this->chapterTitle;
|
|
}
|
|
|
|
public function getCbzPath(): ?string
|
|
{
|
|
return $this->cbzPath;
|
|
}
|
|
|
|
public function getPagesDirectory(): ?string
|
|
{
|
|
return $this->pagesDirectory;
|
|
}
|
|
|
|
public function getVolume(): ?int
|
|
{
|
|
return $this->volume;
|
|
}
|
|
|
|
public function getTotalPages(): int
|
|
{
|
|
return $this->totalPages;
|
|
}
|
|
|
|
public function isVisible(): bool
|
|
{
|
|
return $this->isVisible;
|
|
}
|
|
|
|
public function getCreatedAt(): \DateTimeImmutable
|
|
{
|
|
return $this->createdAt;
|
|
}
|
|
}
|