- Messenger, Mercure
- chapter download flow (lelscan only)
This commit is contained in:
Jérémy Guillot
2024-06-13 18:11:11 +02:00
parent f88fa2c232
commit bc85649789
24 changed files with 744 additions and 78 deletions

View File

@@ -97,7 +97,7 @@
<tbody>
{% for chapter in chapters %}
<tr class="border-t hover:bg-green-100">
{% if chapter.pagesLink|length > 0 %}
{% if chapter.localPath is not null %}
<td class="px-4 py-2 text-green-500">
<a href="{{ path('read_chapter_page', { mangaSlug: manga.slug, chapterNumber: chapter.number, pageNumber: 1 }) }}">
{{ chapter.number }}</a>
@@ -107,15 +107,32 @@
{% endif %}
<td class="px-4 py-2 w-full text-left">
{% if chapter.pagesLink|length > 0 %}
{% if chapter.localPath is not null %}
<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, pageNumber: 1 }) }}">{{ chapter.title ?? 'No title' }}</a>
{% else %}
{{ chapter.title ?? 'No title'}}
{{ chapter.title ?? 'No title' }}
{% endif %}
</td>
<td class="px-4 py-2 flex justify-end gap-2">
{# <twig:DownloadChapter mangaSlug="{{ manga.slug }}" chapterNumber="{{ chapter.number }}" /> #}
{% if chapter.localPath is null %}
<button
data-controller="download-chapter"
data-action="click->download-chapter#handleClick"
data-url="{{ path('add_chapter', {id: chapter.id}) }}"
>
<span class="text-gray-500 hover:text-green-500">
<i data-download-chapter-target="icon" class="fas fa-search"></i>
</span>
</button>
{% else %}
<button>
<span class="text-gray-500" disabled="disabled">
<i data-download-chapter-target="icon" class="fas fa-search"></i>
</span>
</button>
{% endif %}
<a href="#" class="text-gray-500 hover:text-green-500">
<i class="fas fa-download"></i>
</a>