- new simpler modal without bootstrap
- new loadingbutton component
- cleanupsome old code
- toolbar adjusments
This commit is contained in:
Jérémy Guillot
2024-06-30 12:44:41 +02:00
parent b4f0811bca
commit ba30d3102d
23 changed files with 403 additions and 302 deletions

View File

@@ -2,16 +2,12 @@
namespace App\Twig\Components;
use App\Repository\MangaRepository;
use App\Service\MangadexProvider;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Exception;
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\ComponentToolsTrait;
use Symfony\UX\LiveComponent\DefaultActionTrait;
use Symfony\UX\LiveComponent\ValidatableComponentTrait;
#[AsLiveComponent]
class MangaSearch
@@ -21,7 +17,7 @@ class MangaSearch
#[LiveProp(writable: true)]
public ?string $query = null;
public function __construct(private readonly MangadexProvider $mangadexProvider, private MangaRepository $mangaRepository)
public function __construct(private readonly MangadexProvider $mangadexProvider)
{
}
@@ -30,8 +26,6 @@ class MangaSearch
*/
public function getMangas(): Collection|null
{
// return new ArrayCollection($this->mangaRepository->findAll());
if ($this->query === null || $this->query === '') {
return null;
}