Fix:
- modal backdrop, pas de backdrop, pas de problème...
This commit is contained in:
@@ -8,8 +8,8 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
|
@apply hidden fixed top-0 left-0 w-full h-full outline-none;
|
||||||
z-index: 1072!important;
|
z-index: 1072!important;
|
||||||
@apply hidden fixed top-0 left-0 w-full h-full outline-none
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-dialog {
|
.modal-dialog {
|
||||||
@@ -21,10 +21,10 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop {
|
.modal-backdrop {
|
||||||
z-index: 9!important;
|
@apply relative bg-black top-0 left-0;
|
||||||
|
z-index: -1!important;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
@apply fixed bg-black top-0 left-0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop.fade {
|
.modal-backdrop.fade {
|
||||||
|
|||||||
53
migrations/Version20240610115931.php
Normal file
53
migrations/Version20240610115931.php
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20240610115931 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SEQUENCE content_source_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE TABLE content_source (id INT NOT NULL, base_url VARCHAR(255) NOT NULL, image_selector VARCHAR(255) NOT NULL, next_page_selector VARCHAR(255) NOT NULL, chapter_url_format VARCHAR(255) NOT NULL, scraping_type VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('ALTER TABLE chapter ADD volume INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chapter ADD title VARCHAR(255) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chapter ADD local_path VARCHAR(255) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE manga ADD created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE manga ADD rating DOUBLE PRECISION DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE manga ADD author VARCHAR(255) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE manga ADD external_id VARCHAR(255) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE manga ADD status VARCHAR(255) DEFAULT NULL');
|
||||||
|
$this->addSql('COMMENT ON COLUMN manga.created_at IS \'(DC2Type:datetime_immutable)\'');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_765A9E03989D9B62 ON manga (slug)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('DROP SEQUENCE content_source_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP TABLE content_source');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_765A9E03989D9B62');
|
||||||
|
$this->addSql('ALTER TABLE manga DROP created_at');
|
||||||
|
$this->addSql('ALTER TABLE manga DROP rating');
|
||||||
|
$this->addSql('ALTER TABLE manga DROP author');
|
||||||
|
$this->addSql('ALTER TABLE manga DROP external_id');
|
||||||
|
$this->addSql('ALTER TABLE manga DROP status');
|
||||||
|
$this->addSql('ALTER TABLE chapter DROP volume');
|
||||||
|
$this->addSql('ALTER TABLE chapter DROP title');
|
||||||
|
$this->addSql('ALTER TABLE chapter DROP local_path');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Twig\Components;
|
namespace App\Twig\Components;
|
||||||
|
|
||||||
|
use App\Repository\MangaRepository;
|
||||||
use App\Service\MangadexProvider;
|
use App\Service\MangadexProvider;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
@@ -20,7 +21,7 @@ class MangaSearch
|
|||||||
#[LiveProp(writable: true)]
|
#[LiveProp(writable: true)]
|
||||||
public ?string $query = null;
|
public ?string $query = null;
|
||||||
|
|
||||||
public function __construct(private readonly MangadexProvider $mangadexProvider)
|
public function __construct(private readonly MangadexProvider $mangadexProvider, private MangaRepository $mangaRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,10 +30,12 @@ class MangaSearch
|
|||||||
*/
|
*/
|
||||||
public function getMangas(): Collection|null
|
public function getMangas(): Collection|null
|
||||||
{
|
{
|
||||||
if ($this->query === null || $this->query === '') {
|
return new ArrayCollection($this->mangaRepository->findAll());
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->mangadexProvider->search($this->query);
|
// if ($this->query === null || $this->query === '') {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return $this->mangadexProvider->search($this->query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
id: id ? id : false,
|
id: id ? id : false,
|
||||||
}) }}
|
}) }}
|
||||||
data-controller="bootstrap-modal"
|
data-controller="bootstrap-modal"
|
||||||
|
data-bs-backdrop="false"
|
||||||
>
|
>
|
||||||
<div class="fixed top-0 left-0 w-full h-full outline-none" tabindex="-1" role="dialog">
|
<div class="fixed top-0 left-0 w-full h-full outline-none" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog relative w-auto pointer-events-none max-w-lg my-8 mx-auto px-4 sm:px-0"
|
<div class="modal-dialog mt-44 relative w-auto pointer-events-none max-w-lg my-8 mx-auto px-4 sm:px-0"
|
||||||
role="document">
|
role="document">
|
||||||
<div class="relative flex flex-col w-full pointer-events-auto bg-white border border-gray-300 rounded-sm">
|
<div class="relative flex flex-col w-full pointer-events-auto bg-white border border-gray-300 rounded-sm">
|
||||||
<div class="flex items-start justify-between p-4 border-b border-gray-300 rounded-t">
|
<div class="flex items-start justify-between p-4 border-b border-gray-300 rounded-t">
|
||||||
|
|||||||
@@ -97,9 +97,9 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for chapter in chapters %}
|
{% for chapter in chapters %}
|
||||||
<tr class="border-t hover:bg-green-100">
|
<tr class="border-t hover:bg-green-100">
|
||||||
{% if chapter.pages|length > 0 %}
|
{% if chapter.pagesLink|length > 0 %}
|
||||||
<td class="px-4 py-2 text-green-500">
|
<td class="px-4 py-2 text-green-500">
|
||||||
<a href="{{ path('read_chapter_page', { mangaSlug: manga.slug, chapterNumber: chapter.number }) }}">
|
<a href="{{ path('read_chapter_page', { mangaSlug: manga.slug, chapterNumber: chapter.number, pageNumber: 1 }) }}">
|
||||||
{{ chapter.number }}</a>
|
{{ chapter.number }}</a>
|
||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<td class="px-4 py-2 w-full text-left">
|
<td class="px-4 py-2 w-full text-left">
|
||||||
{% if chapter.pages|length > 0 %}
|
{% if chapter.pagesLink|length > 0 %}
|
||||||
<a class=""
|
<a class=""
|
||||||
href="{{ path('read_chapter_page', { mangaSlug: manga.slug, chapterNumber: chapter.number }) }}">{{ chapter.title ?? 'No title' }}</a>
|
href="{{ path('read_chapter_page', { mangaSlug: manga.slug, chapterNumber: chapter.number }) }}">{{ chapter.title ?? 'No title' }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
Reference in New Issue
Block a user