refactor: supprimer tout le code legacy MVC/Twig/Stimulus
Supprime toutes les couches pré-DDD pour ne garder que l'architecture hexagonale (src/Domain/), les entités Doctrine et le front Vue.js SPA. Supprimé : - src/Controller/ (9 controllers Twig, garde SecurityController) - src/Service/, src/Message/, src/MessageHandler/ (services et messages legacy) - src/Manager/, src/Twig/, src/Form/ (UI legacy) - src/Event/, src/EventListener/, src/EventSubscriber/QueueStatusSubscriber - src/Client/MangadexClient.php (doublon du Domain) - src/Interface/, src/Factory/, src/DataFixtures/, src/Scheduler/MainSchedule - templates/ (tous sauf vue/ et base retiré — SecurityController = pur JSON) - assets/controllers/ (20 Stimulus controllers), app.js, bootstrap.js, controllers.json Modifié : - config/routes.yaml : suppression du chargement des controllers legacy - config/packages/messenger.yaml : suppression des routes legacy - config/services.yaml : suppression des bindings legacy + entrées Domain\Import fantômes - webpack.config.js : suppression entry 'app' et enableStimulusBridge - src/Entity/Chapter.php : suppression #[Broadcast] (Turbo Streams legacy) Déplacé : - src/Factory/*.php → tests/Factory/ (namespace App\Tests\Factory)
This commit is contained in:
parent
d7e6bf56d0
commit
5a0888eb28
@@ -1,67 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block toolbar %}
|
||||
{% if toolbar is defined %}
|
||||
<twig:Toolbar toolbar="{{ toolbar }}"/>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div {{ turbo_stream_listen('App\\Entity\\Chapter') }}></div>
|
||||
<div class="container mx-auto mt-8 p-2">
|
||||
<div class="bg-white overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full bg-white">
|
||||
<thead>
|
||||
<tr class="bg-gray-200 text-gray-800">
|
||||
<th class="w-1/12 py-3 px-4 text-left">
|
||||
<input type="checkbox" class="form-checkbox h-5 w-5 text-green-600">
|
||||
</th>
|
||||
<th class="w-2/12 py-3 px-4 text-left">Manga</th>
|
||||
<th class="w-1/12 py-3 px-4 text-left">Volume</th>
|
||||
<th class="w-3/12 py-3 px-4 text-left">Chapitre</th>
|
||||
<th class="w-3/12 py-3 px-4 text-left">Titre</th>
|
||||
<th class="w-3/12 py-3 px-4 text-left">Progress</th>
|
||||
<th class="w-2/12 py-3 px-4 text-left">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-gray-700">
|
||||
{% for manga in status %}
|
||||
<tr id="activity-{{ manga.chapterId }}" class="border-b border-gray-200 hover:bg-gray-50 transition duration-150 ease-in-out">
|
||||
<td class="py-4 px-4 text-center">
|
||||
<input type="checkbox" class="form-checkbox h-5 w-5 text-green-600">
|
||||
</td>
|
||||
<td class="py-4 px-4 font-medium">{{ manga.manga }}</td>
|
||||
<td class="py-4 px-4">{{ manga.volume }}</td>
|
||||
<td class="py-4 px-4">
|
||||
{{ manga.chapter }}
|
||||
|
||||
</td>
|
||||
<td class="py-4 px-4">{{ manga.title }}</td>
|
||||
<td class="py-4 px-4">
|
||||
<div class="mt-2"
|
||||
data-controller="chapter-progress"
|
||||
data-chapter-progress-chapter-id-value="{{ manga.chapterId }}">
|
||||
<div class="relative bg-gray-200 rounded-full h-6 overflow-hidden">
|
||||
<div data-chapter-progress-target="progressBar" class="absolute top-0 left-0 h-full bg-green-400 transition-all duration-300 ease-out" style="width: 0"></div>
|
||||
<div class="absolute inset-0 flex items-center justify-center text-xs font-semibold text-white" data-chapter-progress-target="progressText">
|
||||
0 / 0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-4 px-4">
|
||||
<button class="text-red-500 hover:text-red-700 transition duration-150 ease-in-out">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6" class="py-4 px-4 text-center text-gray-500">Aucune activité en cours.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,86 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="" class="h-full">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<title>{% block title %}Mangarr{% endblock %}</title>
|
||||
<link rel="icon"
|
||||
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
|
||||
{% block stylesheets %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% endblock %}
|
||||
{% block javascripts %}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{# {{ encore_entry_script_tags('turbo') }} #}
|
||||
{% endblock %}
|
||||
<meta name="turbo-refresh-scroll" content="preserve">
|
||||
</head>
|
||||
<body class="bg-gray-50 h-full overflow-hidden" data-controller="menu">
|
||||
<div data-controller="mercure" data-mercure-topic="notification"></div>
|
||||
|
||||
<div data-controller="alert" class="fixed right-0 z-[60] flex justify-center w-full">
|
||||
<div data-alert-target="alert" style="display: none;"
|
||||
class="mt-8 max-w-fit p-4 rounded-lg shadow-lg text-white border-2 border-gray-200 transition-opacity duration-1000 ease-out">
|
||||
<i data-alert-target="icon" class="fa text-xl mr-2"></i>
|
||||
<span data-alert-target="message"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header -->
|
||||
<header class="bg-green-600 h-16 flex items-center fixed w-full z-50">
|
||||
<div class="flex justify-center ml-4">
|
||||
<a class="flex flex-row justify-start" href="{{ path('app_legacy') }}">
|
||||
{# <div class="flex items-center"> #}
|
||||
{# <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" #}
|
||||
{# x="0px" y="0px" width="50" height="50" viewBox="-40 -90 500 500"> #}
|
||||
{# <path cx="100" cy="100" r="150" fill="white" stroke="green" stroke-width="15" #}
|
||||
{# d="M448 160A240 240 0 0 1 208 400A240 240 0 0 1 -32 160A240 240 0 0 1 448 160z"/> #}
|
||||
{# <g transform="translate(28, -15) scale(0.9)"> #}
|
||||
{# <g> #}
|
||||
{# <path style="fill:#16A34A; stroke:black; stroke-width:3;" #}
|
||||
{# d="M68.955 285.752c45.294 0.882 84.544 7.654 113.51 19.587a4.037 4.037 0 0 0 5.571 -3.73l0.016 -216.52a4.032 4.032 0 0 0 -2.544 -3.749L70.525 35.586a4.032 4.032 0 0 0 -5.525 3.749v242.384a4.032 4.032 0 0 0 3.955 4.034"/> #}
|
||||
{# <path style="fill:green; stroke:black; stroke-width:3;" #}
|
||||
{# d="M398.374 74.04a4.048 4.048 0 0 0 -3.565 -0.63l-40.667 12.158a4.032 4.032 0 0 0 -2.88 3.864v209.165s0.181 3.299 -3.293 3.299h-6.592c-32.806 0 -93.773 3.405 -133.496 26.213l-7.883 4.514 -7.883 -4.514c-39.723 -22.806 -100.688 -26.213 -133.496 -26.213H50.208c-1.568 0 -1.472 -1.885 -1.472 -1.883V89.434a4.032 4.032 0 0 0 -2.878 -3.864L5.189 73.411A4.032 4.032 0 0 0 0 77.274V330.336c0 1.138 0.482 2.224 1.325 2.99a4.032 4.032 0 0 0 3.104 1.026c12.086 -1.186 30.984 -2.597 52.363 -2.597 46.957 0 84.691 6.858 109.146 19.837 3.592 1.885 24.422 13.109 34.064 13.109s30.47 -11.224 34.062 -13.109c24.454 -12.979 62.19 -19.837 109.146 -19.837 21.378 0 40.275 1.411 52.362 2.597a4.032 4.032 0 0 0 4.429 -4.014V77.274a4.048 4.048 0 0 0 -1.626 -3.234"/> #}
|
||||
{# <path style="fill:#16A34A; stroke:black; stroke-width:3;" #}
|
||||
{# d="M213.75 304.962a4.048 4.048 0 0 0 3.782 0.378c28.965 -11.933 68.216 -18.707 113.51 -19.587a4.032 4.032 0 0 0 3.957 -4.032V39.334a4.032 4.032 0 0 0 -5.525 -3.749l-114.986 45.755a4.032 4.032 0 0 0 -2.542 3.749l0.016 216.52a4.032 4.032 0 0 0 1.789 3.352"/> #}
|
||||
{# </g> #}
|
||||
{# </g> #}
|
||||
{# </svg> #}
|
||||
{# </div> #}
|
||||
<img src="{{ asset('img/mangarr_logo.png') }}" alt="Mangarr" class="w-32 shadow-xl">
|
||||
</a>
|
||||
</div>
|
||||
<button data-action="click->menu#toggleMenu" class="ml-4 text-white p-2 md:hidden">
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
<div class="ml-4 w-60 relative">
|
||||
<twig:Search/>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Main content area -->
|
||||
<div class="flex h-full pt-16">
|
||||
<!-- Sidebar -->
|
||||
<nav data-menu-target="sidebar"
|
||||
class="w-60 bg-white h-full overflow-y-auto fixed left-0 transform -translate-x-full transition-transform duration-200 ease-in-out md:translate-x-0 z-40">
|
||||
{% include 'menu/menu.html.twig' %}
|
||||
</nav>
|
||||
|
||||
<!-- Main content -->
|
||||
<main class="flex-1 flex flex-col overflow-hidden md:ml-60 w-full">
|
||||
|
||||
<!-- Toolbar -->
|
||||
<div class="bg-white shadow z-20 w-full">
|
||||
{% block toolbar %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<!-- Scrollable content -->
|
||||
<div class="flex-1 overflow-y-auto bg-gray-50 w-full">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
{% block create %}
|
||||
<turbo-stream action="prepend" target="volume-{{ entity.volume }}">
|
||||
<template>
|
||||
{% include 'manga/_chapter_row.html.twig' with { chapter: entity, manga: entity.manga } %}
|
||||
</template>
|
||||
</turbo-stream>
|
||||
{% endblock %}
|
||||
|
||||
{% block update %}
|
||||
<turbo-stream action="remove" target="activity-{{ entity.id }}"></turbo-stream>
|
||||
|
||||
<turbo-stream action="replace" target="chapter-{{ entity.id }}">
|
||||
<template>
|
||||
{% include 'manga/_chapter_row.html.twig' with { chapter: entity, manga: entity.manga } %}
|
||||
</template>
|
||||
</turbo-stream>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block remove %}
|
||||
{% endblock %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{# templates/bundles/TwigBundle/Exception/error404.html.twig #}
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Page non trouvée{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Page non trouvée</h1>
|
||||
<p>La page que vous cherchez n'existe pas.</p>
|
||||
{% endblock %}
|
||||
@@ -1,20 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello CalendarController!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<style>
|
||||
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||
</style>
|
||||
|
||||
<div class="example-wrapper">
|
||||
<h1>Hello {{ controller_name }}! ✅</h1>
|
||||
|
||||
This friendly message is coming from:
|
||||
<ul>
|
||||
<li>Your controller at <code><a href="{{ '/app/src/Controller/CalendarController.php'|file_link(0) }}">src/Controller/CalendarController.php</a></code></li>
|
||||
<li>Your template at <code><a href="{{ '/app/templates/calendar/index.html.twig'|file_link(0) }}">templates/calendar/index.html.twig</a></code></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,12 +0,0 @@
|
||||
{# templates/components/manga_modal.html.twig #}
|
||||
<div id="manga-modal" style="display: {{ manga ? 'block' : 'none' }};">
|
||||
<div class="modal-content">
|
||||
<span class="close-button" data-action="live#action" data-live-action-param="close">×</span>
|
||||
{% if manga %}
|
||||
<h2>{{ manga.title }}</h2>
|
||||
<p><strong>Year:</strong> {{ manga.publicationYear }}</p>
|
||||
<p>{{ manga.description }}</p>
|
||||
<button data-action="live#action" data-live-action-param="saveManga">Save Manga</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,2 +0,0 @@
|
||||
{# templates/components/Divider.html.twig #}
|
||||
<div class="min-h-14 mx-4 border-r opacity-50 border-green-500"></div>
|
||||
@@ -1,5 +0,0 @@
|
||||
<div{{ attributes }}>
|
||||
<a href="#" class="text-gray-500 hover:text-green-500">
|
||||
<i class="fas fa-search"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -1,30 +0,0 @@
|
||||
{# templates/components/DropdownMenu.html.twig #}
|
||||
<div {{ attributes }} >
|
||||
<div data-controller="dropdown" class="relative inline-block">
|
||||
<twig:ToolBarButton
|
||||
icon="{{ icon }}"
|
||||
text="{{ text }}"
|
||||
action="dropdown#toggle"
|
||||
data-dropdown-target="button"
|
||||
controller=""
|
||||
/>
|
||||
<div class="absolute left-0 mt-2 w-max z-10 bg-gray-800 rounded-sm shadow-lg hidden"
|
||||
data-dropdown-target="menu">
|
||||
<div class="py-1" data-controller="toolbar">
|
||||
{% for item in items %}
|
||||
<a href="#"
|
||||
class="block px-4 py-2 text-sm text-white hover:text-green-500"
|
||||
data-action="toolbar#{{ item.action }}"
|
||||
{% if item.data is defined %}
|
||||
{% for key, value in item.data %}
|
||||
data-{{ key }}="{{ value }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>
|
||||
{{ item.text }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,17 +0,0 @@
|
||||
{# templates/components/LoadingButton.html.twig #}
|
||||
<button {{ attributes }}
|
||||
{% if type is defined %}type="{{ type }}"{% endif %}
|
||||
{% if form is defined %}form="{{ form }}" data-loading-button-form-value="{{ form }}"{% endif %}
|
||||
data-controller="loading-button"
|
||||
data-action="click->loading-button#startLoading"
|
||||
class="bg-{{ color|default('green') }}-500 hover:bg-{{ color|default('green') }}-600 text-sm text-white font-bold py-2 px-4 rounded flex items-center justify-center"
|
||||
>
|
||||
<span data-loading-button-target="text">{{ text }}</span>
|
||||
<span data-loading-button-target="loader" class="hidden">
|
||||
<svg class="animate-spin h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor"
|
||||
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
@@ -1,114 +0,0 @@
|
||||
{# templates/components/MangaSearch.html.twig #}
|
||||
|
||||
<div {{ attributes }}>
|
||||
<div class="w-full mx-auto">
|
||||
<div data-controller="search">
|
||||
<div class="flex items-center border border-gray-300 rounded bg-white">
|
||||
<span class="flex items-center justify-center w-10 h-10 text-gray-500">
|
||||
<i class="fas fa-search"></i>
|
||||
</span>
|
||||
<input data-search-target="input"
|
||||
data-model="debounce(500)|query" type="text"
|
||||
placeholder="eg. Naruto, Bleach, One Piece"
|
||||
class="w-full py-2 px-3 bg-green-50 border-none focus:outline-none focus:bg-white focus:border focus:border-green-200">
|
||||
<button data-action="click->search#clearSearch"
|
||||
class="flex items-center justify-center w-10 h-10 text-gray-500 hover:bg-gray-200">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if this.mangas %}
|
||||
<div data-loading="addClass(opacity-50)" class="mt-3">
|
||||
{% for manga in this.mangas %}
|
||||
<div {{ stimulus_controller('addmanga', { 'index': loop.index })}}>
|
||||
<div class="flex w-full bg-white shadow-lg mb-8 hover:bg-green-50"
|
||||
data-action="click->addmanga#openModal">
|
||||
<a href="#" class="flex-none w-48 relative">
|
||||
<img src="{{ manga.imageUrl ?? 'https://placehold.co/150x220' }}" alt="{{ manga.title }}"
|
||||
class="w-full h-full -z-10 object-cover" style="width: 150px; height: 220px;">
|
||||
</a>
|
||||
<div class="w-full p-4 flex flex-col justify-between leading-normal">
|
||||
<div class="mb-2">
|
||||
<div
|
||||
class="flex w-full text-xl font-bold text-gray-900 mb-4 items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<span>{{ manga.title }}</span>
|
||||
<span class="text-2xl text-gray-500 ml-2">({{ manga.publicationYear }})</span>
|
||||
</div>
|
||||
<a href="{{ path('app_manga_show', { 'mangaSlug': manga.slug }) }}"
|
||||
class="text-gray-400 hover:text-gray-500">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% for genre in manga.genres %}
|
||||
<span
|
||||
class="bg-gray-200 text-gray-800 text-xs font-semibold mr-2 px-2.5 py-0.5 rounded">
|
||||
{{ genre }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<p class="text-gray-700 text-sm">{{ manga.description|truncate(250) }}</p>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<span class="text-gray-600 text-sm mr-2">
|
||||
<i class="fas fa-star text-yellow-500"></i>
|
||||
{{ manga.rating }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<twig:Modal
|
||||
openTrigger="openAddMangaModal{{ loop.index }}"
|
||||
closeTrigger="closeAddMangaModal{{ loop.index }}"
|
||||
title="Add Manga"
|
||||
modalId="manga-modal-{{ loop.index }}"
|
||||
>
|
||||
{% block content %}
|
||||
<form id="manga-{{ loop.index }}" action="{{ path('app_manga_add') }}" method="POST">
|
||||
<input type="hidden" name="title" value="{{ manga.title }}">
|
||||
<input type="hidden" name="slug" value="{{ manga.slug }}">
|
||||
<input type="hidden" name="description" value="{{ manga.description }}">
|
||||
<input type="hidden" name="imageUrl" value="{{ manga.imageUrl }}">
|
||||
<input type="hidden" name="status" value="{{ manga.status }}">
|
||||
<input type="hidden" name="genres" value="{{ manga.genres|join(',') }}">
|
||||
<input type="hidden" name="author" value="{{ manga.author }}">
|
||||
<input type="hidden" name="publicationYear" value="{{ manga.publicationYear }}">
|
||||
<input type="hidden" name="rating" value="{{ manga.rating }}">
|
||||
<input type="hidden" name="externalId" value="{{ manga.externalId }}">
|
||||
<div class="flex justify-between">
|
||||
<img src="{{ manga.imageUrl ?? 'https://placehold.co/150x220' }}"
|
||||
alt="{{ manga.title }}"
|
||||
class="img-fluid mb-2"
|
||||
style="width: 150px; height: 220px;"
|
||||
>
|
||||
<div class="ml-4">
|
||||
<p>{{ manga.description|truncate(250) }}</p>
|
||||
<p><strong>Année de publication:</strong> {{ manga.publicationYear }}</p>
|
||||
<p><strong>Genres:</strong> {{ manga.genres|join(', ') }}</p>
|
||||
<p><strong>Note:</strong> {{ manga.rating }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block footer %}
|
||||
<button type="button" data-action="modal#close" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Cancel
|
||||
</button>
|
||||
{{ component('LoadingButton', {
|
||||
text: 'Add ' ~ manga.title,
|
||||
type: 'submit',
|
||||
form: 'manga-' ~ loop.index,
|
||||
color: 'green'
|
||||
}) }}
|
||||
{% endblock %}
|
||||
</twig:Modal>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,33 +0,0 @@
|
||||
{# templates/components/Modal.html.twig #}
|
||||
<div
|
||||
{{ attributes }}
|
||||
data-controller="modal"
|
||||
data-modal-open-trigger-value="{{ openTrigger }}"
|
||||
data-modal-close-trigger-value="{{ closeTrigger }}"
|
||||
{% if modalId is defined %}id="{{ modalId }}"{% endif %}
|
||||
>
|
||||
<div data-modal-target="modal" class="fixed inset-0 z-50 overflow-y-auto hidden" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||
{# Backdrop #}
|
||||
<div data-action="click->modal#close" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
|
||||
|
||||
{# Centrage vertical trick #}
|
||||
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
|
||||
|
||||
{# Modal panel #}
|
||||
<div {% if stimulus is defined %} data-controller="{{ stimulus }}" {% endif %} class="inline-block align-bottom bg-white rounded-sm text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle {{ modalClass|default('sm:max-w-lg') }} sm:w-full">
|
||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="mt-2">
|
||||
{{ block('content') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
|
||||
{{ block('footer') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,40 +0,0 @@
|
||||
<div {{ attributes }}>
|
||||
{% component BootstrapModal with {id: 'mangaModal' ~ index ~ '-' ~ manga.slug } %}
|
||||
{% block modal_header %}
|
||||
<div class="flex justify-between">
|
||||
<h5 class="modal-title text-lg font-bold">{{ manga.title }} <span
|
||||
class="text-md font-normal text-gray-500">({{ manga.publicationYear }})</span></h5>
|
||||
<button type="button" class="btn-close text-black hover:text-gray-500"
|
||||
data-bs-dismiss="modal" aria-label="Close">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block modal_body %}
|
||||
<form id="{{ 'form' ~ index }}" data-action="live#action:prevent" data-live-action-param="saveManga">
|
||||
<div class="flex justify-between">
|
||||
<img src="{{ manga.imageUrl ?? 'https://placehold.co/150x220' }}"
|
||||
alt="{{ manga.title }}"
|
||||
class="img-fluid mb-2"
|
||||
style="width: 150px; height: 220px;"
|
||||
>
|
||||
<div class="ml-4">
|
||||
<p>{{ manga.description|truncate(250) }}</p>
|
||||
<p><strong>Année de publication:</strong> {{ manga.publicationYear }}</p>
|
||||
<p><strong>Genres:</strong> {{ manga.genres|join(', ') }}</p>
|
||||
<p><strong>Note:</strong> {{ manga.rating }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block modal_footer %}
|
||||
<button
|
||||
type="submit"
|
||||
form="{{ 'form' ~ index }}"
|
||||
class="bg-green-500 hover:bg-green-600 text-sm text-white font-bold py-2 px-4 rounded">
|
||||
Add {{ manga.title }}
|
||||
</button>
|
||||
{% endblock %}
|
||||
{% endcomponent %}
|
||||
</div>
|
||||
@@ -1,38 +0,0 @@
|
||||
{# templates/components/Search.html.twig #}
|
||||
<div{{ attributes }}>
|
||||
<div class="flex items-center py">
|
||||
<i class="fas fa-search text-white"></i>
|
||||
<input
|
||||
data-model="query"
|
||||
type="text"
|
||||
placeholder="Rechercher"
|
||||
class="appearance-none outline-none ml-2 pl-0 bg-transparent border-b border-white w-full placeholder:text-white text-white py-1 px-2 leading-tight transition-all duration-500 ease-in-out focus:placeholder:text-opacity-0 focus:border-opacity-0"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{% if query %}
|
||||
<div id="searchResults" class="absolute left-0 right-0 min-w-60 ml-8 mt-2 rounded-sm shadow-lg max-h-60 overflow-y-auto z-50">
|
||||
<ul class="bg-gray-700 text-white">
|
||||
{% if this.mangas is not empty %}
|
||||
<li class="px-4 py-2 text-gray-400">Mangas existants</li>
|
||||
{% for manga in this.mangas %}
|
||||
<li class="px-4 py-2 hover:bg-gray-600 cursor-pointer">
|
||||
<a class="flex items-center" href="{{ path('app_manga_show', { 'mangaSlug': manga.slug }) }}">
|
||||
<img src="{{ manga.imageUrl ?? 'https://placehold.co/40x60' }}" alt="{{ manga.title }}"
|
||||
class="w-10 h-15 object-cover mr-4">
|
||||
<span>{{ manga.title }} ({{ manga.publicationYear }})</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li class="px-4 py-2 text-gray-400">Aucun manga trouvé.</li>
|
||||
<li class="px-4 py-2 hover:bg-gray-600 cursor-pointer">
|
||||
<a class="flex items-center" href="{{ path('app_manga_search', {query: query}) }}">
|
||||
<span>Ajouter {{ query }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,25 +0,0 @@
|
||||
{# templates/components/ToolbarButton.html.twig #}
|
||||
{% set buttonAttributes = {} %}
|
||||
{% set buttonClass = 'text-white' %}
|
||||
{% if data is defined and data is not empty %}
|
||||
{% for key, value in data %}
|
||||
{% set dataKey = 'data-' ~ key|replace({'_': '-'})|lower %}
|
||||
{% set buttonAttributes = buttonAttributes|merge({ (dataKey): value }) %}
|
||||
{% endfor %}
|
||||
{% if data['buttonClass'] is defined %}
|
||||
{% set buttonClass = data['buttonClass'] %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div {{ attributes }}>
|
||||
<button class="flex flex-col justify-around min-h-14 w-min ml-4 items-center group {{ buttonClass }}"
|
||||
data-controller="{{ controller }}"
|
||||
data-action="{{ action }}"
|
||||
{% for attrName, attrValue in buttonAttributes %}
|
||||
{{ attrName }}="{{ attrValue }}"
|
||||
{% endfor %}
|
||||
>
|
||||
<i data-{{ controller }}-target="icon" class="fas fa-{{ icon }} text-xl group-hover:text-green-500"></i>
|
||||
<span data-{{ controller }}-target="text" class="text-xs">{{ text }}</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -1,52 +0,0 @@
|
||||
{# templates/components/Toolbar.html.twig #}
|
||||
<div class="bg-gray-800 p-3 min-h-14" {{ stimulus_controller('toolbar') }}>
|
||||
<div class="flex flex-row items-center justify-between">
|
||||
<div class="flex mr-2 items-center">
|
||||
{% for element in toolbar.leftGroup %}
|
||||
{% if element.type == 'button' %}
|
||||
{% set actionParts = element.action|split('#') %}
|
||||
<twig:ToolBarButton
|
||||
icon="{{ element.icon }}"
|
||||
text="{{ element.text }}"
|
||||
action="{{ element.action }}"
|
||||
controller="{{ actionParts[0] }}"
|
||||
data="{{ element.additionalProperties.data }}"
|
||||
/>
|
||||
{% elseif element.type == 'divider' %}
|
||||
<twig:Divider/>
|
||||
{% elseif element.type == 'dropdown' %}
|
||||
<twig:DropdownMenu
|
||||
icon="{{ element.icon }}"
|
||||
text="{{ element.text }}"
|
||||
action="{{ element.action }}"
|
||||
items="{{ element.additionalProperties.items }}"
|
||||
/>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="flex mr-2 items-center">
|
||||
{% for element in toolbar.rightGroup %}
|
||||
{% if element.type == 'button' %}
|
||||
{% set actionParts = element.action|split('#') %}
|
||||
<twig:ToolBarButton
|
||||
icon="{{ element.icon }}"
|
||||
text="{{ element.text }}"
|
||||
action="{{ element.action }}"
|
||||
controller="{{ actionParts[0] }}"
|
||||
data="{{ element.additionalProperties.data }}"
|
||||
/>
|
||||
{% elseif element.type == 'divider' %}
|
||||
<twig:Divider/>
|
||||
{% elseif element.type == 'dropdown' %}
|
||||
<twig:DropdownMenu
|
||||
icon="{{ element.icon }}"
|
||||
text="{{ element.text }}"
|
||||
action="{{ element.action }}"
|
||||
items="{{ element.additionalProperties.items }}"
|
||||
/>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mx-auto p-4">
|
||||
<div class="bg-white shadow-lg rounded-sm overflow-hidden">
|
||||
<div class="bg-gray-800 text-white p-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
<i class="fas fa-exchange-alt mr-2"></i>Convertir CBR en CBZ
|
||||
</h1>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<form method="post" enctype="multipart/form-data" action="{{ path('app_convert') }}" data-turbo="false">
|
||||
<div class="mb-4">
|
||||
<label for="file-upload" class="block text-sm font-medium text-gray-700 mb-2">
|
||||
Choisir un fichier CBR
|
||||
</label>
|
||||
<div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md">
|
||||
<div class="space-y-1 text-center">
|
||||
<i class="fas fa-file-archive text-4xl text-gray-400 mb-3"></i>
|
||||
<div class="flex text-sm text-gray-600">
|
||||
<label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-green-600 hover:text-green-500">
|
||||
<span>Sélectionner un fichier</span>
|
||||
<input id="file-upload" name="file" type="file" class="sr-only" accept=".cbr" required>
|
||||
</label>
|
||||
<p class="pl-1">ou glisser-déposer</p>
|
||||
</div>
|
||||
<p class="text-xs text-gray-500">
|
||||
CBR jusqu'à 100MB
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<button type="submit" class="w-full flex items-center justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
|
||||
<span class="mr-2">Convertir en CBZ</span>
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mx-auto p-4">
|
||||
<h1 class="text-2xl font-bold mb-4">Confirmer l'Importation</h1>
|
||||
<p><strong>Titre:</strong> {{ title }}</p>
|
||||
<p><strong>Volume:</strong> {{ volume }}</p>
|
||||
<form method="post">
|
||||
<button type="submit" class="mt-2 btn btn-primary">Importer</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mx-auto p-4">
|
||||
<div class="bg-white shadow-lg rounded-sm overflow-hidden">
|
||||
<div class="bg-gray-800 text-white p-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
<i class="fas fa-file-import mr-2"></i>Importer des Mangas
|
||||
</h1>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="mb-4">
|
||||
<label for="file-upload" class="block text-sm font-medium text-gray-700 mb-2">
|
||||
Choisir des fichiers CBZ ou CBR
|
||||
</label>
|
||||
<div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md">
|
||||
<div class="space-y-1 text-center">
|
||||
<i class="fas fa-file-archive text-4xl text-gray-400 mb-3"></i>
|
||||
<div class="flex text-sm text-gray-600">
|
||||
<label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-green-600 hover:text-green-500">
|
||||
<span>Sélectionner des fichiers</span>
|
||||
<input id="file-upload" name="files[]" type="file" class="sr-only" accept=".cbz,.cbr" multiple required>
|
||||
</label>
|
||||
<p class="pl-1">ou glisser-déposer</p>
|
||||
</div>
|
||||
<p class="text-xs text-gray-500">
|
||||
CBZ ou CBR jusqu'à 100MB chacun
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<button type="submit" class="w-full flex items-center justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
|
||||
<span class="mr-2">Suivant</span>
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,103 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<form method="post" action="{{ path('import_confirm') }}" data-controller="import-match">
|
||||
<div class="container mx-auto mt-8 p-2">
|
||||
<div class="bg-white overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full bg-white">
|
||||
<thead>
|
||||
<tr class="bg-gray-200 text-gray-800">
|
||||
<th class="w-1/12 py-3 px-4 text-left">
|
||||
<input type="checkbox" class="form-checkbox h-5 w-5 text-green-600"
|
||||
data-action="change->import-match#toggleAllCheckboxes">
|
||||
</th>
|
||||
<th class="w-4/12 py-3 px-4 text-left">Original File</th>
|
||||
<th class="w-4/12 py-3 px-4 text-left">Manga</th>
|
||||
<th class="w-3/12 py-3 px-4 text-left">Content</th>
|
||||
<th class="w-2/12 py-3 px-4 text-left">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-gray-700">
|
||||
{% for file in files %}
|
||||
<tr class="border-b border-gray-200 hover:bg-gray-50 transition duration-150 ease-in-out">
|
||||
<td class="py-4 px-4 text-center">
|
||||
<input type="checkbox" class="form-checkbox h-5 w-5 text-green-600"
|
||||
name="selected[]"
|
||||
value="{{ file.id }}" data-import-match-target="checkbox">
|
||||
</td>
|
||||
<td>
|
||||
<div class="py-4 px-4">
|
||||
<div class="text-sm font-medium text-gray-900">{{ file.originalFileName }}</div>
|
||||
<div class="text-sm text-gray-500">{{ file.fileSize }}</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-4 px-4">
|
||||
<select name="manga_slug[{{ file.id }}]"
|
||||
class="w-full bg-white border border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
||||
data-action="change->import-match#updateMangaInfo"
|
||||
data-file-id="{{ file.id }}">
|
||||
{% for manga in file.mangaOptions %}
|
||||
<option value="{{ manga.slug }}" {% if loop.first %}selected{% endif %}
|
||||
data-manga-info="{{ manga|json_encode }}">{{ manga.title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="py-4 px-4">
|
||||
{% if file.metadata.chapter %}
|
||||
Chapter {{ file.metadata.chapter }}
|
||||
<input type="hidden" name="chapter[{{ file.id }}]"
|
||||
value="{{ file.metadata.chapter }}">
|
||||
{% else %}
|
||||
Volume {{ file.metadata.volume }}
|
||||
<input type="hidden" name="volume[{{ file.id }}]"
|
||||
value="{{ file.metadata.volume }}">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="py-4 px-4">
|
||||
<button type="button"
|
||||
class="text-blue-500 hover:text-blue-700 transition duration-150 ease-in-out"
|
||||
data-action="click->import-match#showDetails" data-file-id="{{ file.id }}">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<button type="submit"
|
||||
class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
|
||||
data-action="import-match#confirmSelected">
|
||||
Importer les fichiers sélectionnés
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fixed z-10 inset-0 overflow-y-auto hidden" data-import-match-target="modal">
|
||||
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
||||
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
|
||||
</div>
|
||||
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
|
||||
<div
|
||||
class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
|
||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
|
||||
<div data-import-match-target="modalContent">
|
||||
<!-- Will be filled by JavaScript -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
|
||||
<button type="button"
|
||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
data-action="click->import-match#closeModal">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,111 +0,0 @@
|
||||
<turbo-frame id="chapter_list">
|
||||
<div class="p-4" {{ turbo_stream_listen('App\\Entity\\Chapter') }}>
|
||||
{% for volume, chapters in chapters_by_volume %}
|
||||
{% set is_first = loop.first %}
|
||||
{% set volume_cbz_path = chapters|first.cbzPath %}
|
||||
{% set all_chapters_same_cbz = chapters|reduce((carry, chapter) => carry and chapter.cbzPath == volume_cbz_path, true) %}
|
||||
{% set available_chapters = chapters|filter(chapter => chapter.cbzPath is not null) %}
|
||||
{% set total_chapters = chapters|filter(chapter => chapter.visible)|length %}
|
||||
|
||||
<div data-controller="table" data-table-open-value="{{ is_first ? 'true' : 'false' }}">
|
||||
<div class="bg-white rounded-sm shadow mb-4">
|
||||
<div class="relative flex items-center justify-between bg-white p-4 rounded-t-sm">
|
||||
<!-- Partie gauche -->
|
||||
<div class="flex items-center space-x-4">
|
||||
<i class="fas fa-bookmark text-gray-500 text-3xl w-8"></i>
|
||||
<h2 class="text-xl font-semibold w-28">Volume {{ '%02d'|format(volume) }}</h2>
|
||||
<div class="flex items-center w-16">
|
||||
<span class="px-2 py-1 text-sm rounded w-full text-center
|
||||
{% if available_chapters|length == 0 %}
|
||||
bg-red-500 text-white
|
||||
{% elseif available_chapters|length < total_chapters %}
|
||||
bg-yellow-500 text-white
|
||||
{% else %}
|
||||
bg-green-500 text-white
|
||||
{% endif %}">
|
||||
{{ available_chapters|length }} / {{ total_chapters }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2">
|
||||
<i data-table-target="toggleIcon" data-action="click->table#toggle"
|
||||
class="bg-gray-400 rounded-full font-bold text-sm text-white p-1 hover:bg-green-500 fas fa-chevron-{{ is_first ? 'up' : 'down' }} cursor-pointer"></i>
|
||||
</div>
|
||||
|
||||
<div class="flex space-x-2 text-xl text-bold">
|
||||
<a href="#"
|
||||
data-controller="download"
|
||||
data-action="download#download"
|
||||
data-download-url-value="{{ path('search_volume', {'mangaSlug': manga.slug, 'volume': volume}) }}"
|
||||
class="w-8 text-center">
|
||||
<i data-download-target="icon"
|
||||
class="fas fa-search text-gray-500 hover:text-green-500"></i>
|
||||
</a>
|
||||
<a href="#"
|
||||
data-controller="download"
|
||||
data-action="download#download"
|
||||
data-download-url-value="{{ path('download_volume', {'mangaSlug': manga.slug, 'volume': volume}) }}"
|
||||
class="w-8 text-center">
|
||||
<i data-download-target="icon"
|
||||
class="fas fa-download text-gray-500 hover:text-green-500"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-table-target="body"
|
||||
class="p-4 border-t" {{ not is_first ? 'style="display: none;"' : '' }}>
|
||||
<table class="min-w-full table-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-4 py-2 text-left">#</th>
|
||||
<th class="px-4 py-2 text-left">Title</th>
|
||||
<th class="px-4 py-2 text-right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="volume-{{ volume }}">
|
||||
{% if all_chapters_same_cbz and volume_cbz_path is not null %}
|
||||
<tr class="border-t hover:bg-green-100">
|
||||
<td class="px-4 py-2 text-green-500">
|
||||
<a data-turbo-frame="_top"
|
||||
href="{{ path('app_reader', { mangaSlug: manga.slug, chapterNumber: chapters|first.number, pageNumber: 1 }) }}">
|
||||
{{ '%02d'|format(volume) }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="px-4 py-2 w-full text-left">
|
||||
<a data-turbo-frame="_top"
|
||||
href="{{ path('app_reader', { mangaSlug: manga.slug, chapterNumber: chapters|first.number, pageNumber: 1 }) }}">
|
||||
Volume {{ '%02d'|format(volume) }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="px-4 py-2 flex justify-end gap-2">
|
||||
<a href="#"
|
||||
data-controller="download"
|
||||
data-action="download#download"
|
||||
data-download-url-value="{{ path('download_cbz', {chapterId: chapters|first.id}) }}"
|
||||
class="w-8 text-center">
|
||||
<i data-download-target="icon"
|
||||
class="fas fa-download text-gray-500 hover:text-green-500"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
{% for chapter in chapters %}
|
||||
{% include 'manga/_chapter_row.html.twig' with {'chapter': chapter, 'manga': manga} %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="relative flex items-center justify-between bg-white mt-4 mb-2 rounded-t-sm">
|
||||
<div
|
||||
class="absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2">
|
||||
<i data-table-target="toggleIcon" data-action="click->table#toggle"
|
||||
class="bg-gray-400 rounded-full font-bold text-sm text-white p-1 hover:bg-green-500 fas fa-chevron-up cursor-pointer"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</turbo-frame>
|
||||
@@ -1,65 +0,0 @@
|
||||
{% if chapter.visible %}
|
||||
<tr id="chapter-{{ chapter.id }}" class="border-t hover:bg-green-100">
|
||||
{% if chapter.cbzPath is not null %}
|
||||
<td class="px-4 py-2 text-green-500">
|
||||
<a data-turbo-frame="_top"
|
||||
href="{{ path('app_reader', { mangaSlug: manga.slug, chapterNumber: chapter.number, pageNumber: 1 }) }}">
|
||||
{{ chapter.number < 10 ? '0' ~ chapter.number : chapter.number }}
|
||||
</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td class="px-4 py-2">{{ chapter.number < 10 ? '0' ~ chapter.number : chapter.number }}</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="px-4 py-2 w-full text-left">
|
||||
{% if chapter.cbzPath is not null %}
|
||||
<a data-turbo-frame="_top"
|
||||
href="{{ path('app_reader', { mangaSlug: manga.slug, chapterNumber: chapter.number, pageNumber: 1 }) }}">
|
||||
{{ chapter.title ?? 'No title' }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ chapter.title ?? 'No title' }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="px-4 py-2 flex justify-end gap-2">
|
||||
{% if chapter.cbzPath is null %}
|
||||
<button
|
||||
data-controller="download"
|
||||
data-action="download#download"
|
||||
data-download-url-value="{{ path('search_chapter', {id: chapter.id}) }}"
|
||||
>
|
||||
<span class="text-gray-500 hover:text-green-500">
|
||||
<i data-download-target="icon" class="fas fa-search"></i>
|
||||
</span>
|
||||
</button>
|
||||
{% else %}
|
||||
<button
|
||||
data-controller="download"
|
||||
data-action="download#download"
|
||||
data-download-url-value="{{ path('app_delete_cbz', {id: chapter.id}) }}"
|
||||
>
|
||||
<span class="text-gray-500 hover:text-green-500">
|
||||
<i data-download-target="icon" class="fas fa-times"></i>
|
||||
</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
<a href="#"
|
||||
data-controller="download"
|
||||
data-action="download#download"
|
||||
data-download-url-value="{{ path('download_cbz', {chapterId: chapter.id}) }}"
|
||||
class="w-8 text-center">
|
||||
<i data-download-target="icon"
|
||||
class="fas fa-download text-gray-500 hover:text-green-500"></i>
|
||||
</a>
|
||||
<button
|
||||
data-controller="download"
|
||||
data-action="download#download"
|
||||
data-download-url-value="{{ path('app_hide_chapter', {id: chapter.id}) }}"
|
||||
>
|
||||
<span class="text-gray-500 hover:text-green-500">
|
||||
<i data-download-target="icon" class="fas fa-trash-can"></i>
|
||||
</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
@@ -1,92 +0,0 @@
|
||||
{% block body %}
|
||||
{% if currentView == 'poster' %}
|
||||
<div
|
||||
class="w-full p-4 grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-8 2xl:grid-cols-12 gap-4">
|
||||
{% for manga in mangas %}
|
||||
<div
|
||||
class="bg-white overflow-hidden border border-gray-200 hover:shadow-2xl hover:border-gray-400 transition-all duration-300 flex flex-col">
|
||||
<a href="{{ path('app_manga_show', { 'mangaSlug': manga.slug }) }}"
|
||||
class="block relative w-full pb-[150%] overflow-hidden">
|
||||
<img src="{{ manga.thumbnailUrl ?? 'https://placehold.co/150x220' }}"
|
||||
alt="{{ manga.title }}"
|
||||
class="absolute top-0 left-0 w-full h-full object-cover">
|
||||
</a>
|
||||
<div class="p-2 flex flex-col justify-between flex-grow">
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold truncate">{{ manga.title }}</h3>
|
||||
<p class="text-xs text-gray-500">{{ manga.publicationYear }}</p>
|
||||
</div>
|
||||
<p class="text-xs text-gray-400 mt-1">Added: {{ manga.createdAt|date('M d, Y') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="col-span-full text-center text-gray-500">Aucun manga trouvé.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% elseif currentView == 'resume' %}
|
||||
<div class="w-full p-4 space-y-4">
|
||||
{% for manga in mangas %}
|
||||
<div
|
||||
class="bg-white overflow-hidden border border-gray-200 hover:shadow-lg hover:border-gray-400 transition-all duration-300 flex">
|
||||
<a class="flex flex-row" href="{{ path('app_manga_show', {'mangaSlug': manga.slug}) }}">
|
||||
<img src="{{ manga.imageUrl ?? 'https://placehold.co/150x220' }}"
|
||||
alt="{{ manga.title }}"
|
||||
class="w-32 h-48 object-cover">
|
||||
<div class="p-4 flex flex-col justify-between flex-grow">
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold">{{ manga.title }}</h3>
|
||||
<p class="text-sm text-gray-500">{{ manga.publicationYear }}</p>
|
||||
<p class="text-sm text-gray-600 mt-2">{{ manga.description|truncate(350) }}</p>
|
||||
</div>
|
||||
<p class="text-xs text-gray-400 mt-2">
|
||||
Added: {{ manga.createdAt|date('M d, Y') }}</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-center text-gray-500">Aucun manga trouvé.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% elseif currentView == 'table' %}
|
||||
<div class="p-4">
|
||||
<table class="min-w-full bg-white">
|
||||
<thead>
|
||||
<tr class="bg-gray-100 text-gray-600 uppercase text-sm leading-normal">
|
||||
<th class="py-3 px-6 text-left">Manga Title</th>
|
||||
{# <th class="py-3 px-6 text-center">Volumes</th> #}
|
||||
<th class="py-3 px-6 text-center">Chapters</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-gray-600 text-sm">
|
||||
{% for manga in mangas %}
|
||||
<tr class="border-b border-gray-200 hover:bg-gray-100">
|
||||
<td class="py-3 px-6 text-left whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<span class="font-medium">{{ manga.title }}</span>
|
||||
</div>
|
||||
</td>
|
||||
{# <td class="py-3 px-6 text-center"> #}
|
||||
{# {{ manga.volumes|length }} #}
|
||||
{# </td> #}
|
||||
<td class="py-3 px-6 text-center">
|
||||
{% set total_chapters = manga.chapters|length %}
|
||||
{% set available_chapters = manga.chapters|filter(chapter => chapter.cbzPath is not null)|length %}
|
||||
<div class="flex items-center justify-center">
|
||||
<div class="w-48 bg-gray-200 rounded-full h-2.5">
|
||||
<div class="bg-blue-600 h-2.5 rounded-full"
|
||||
style="width: {{ (available_chapters / total_chapters * 100)|round }}%"></div>
|
||||
</div>
|
||||
<span class="ml-2">{{ available_chapters }} / {{ total_chapters }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6" class="py-3 px-6 text-center">Aucun manga trouvé.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,240 +0,0 @@
|
||||
{% block body %}
|
||||
<div class="relative">
|
||||
<div class="shadow-lg text-white">
|
||||
<div class="relative h-96 bg-cover bg-center" style="background-image: url('{{ manga.imageUrl }}')">
|
||||
<div class="absolute inset-0 bg-black opacity-50"></div>
|
||||
<div class="absolute inset-0 flex flex-row justify-center p-4">
|
||||
<div class="hidden mr-12 xl:block 2xl:block">
|
||||
<img src="{{ manga.thumbnailUrl }}" alt="{{ manga.title }}" class="max-w-72 max-h-72 ml-4">
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center mb-4">
|
||||
<i class="fas fa-bookmark text-white text-3xl"></i>
|
||||
<h1 class="text-3xl font-bold ml-4">{{ manga.title }}</h1>
|
||||
</div>
|
||||
<div class="flex items-center mb-4">
|
||||
<span class="mr-4">{{ manga.publicationYear }}</span>
|
||||
<span>Chapters: {{ manga.chapters.count }}</span>
|
||||
</div>
|
||||
<div class="flex items-center mb-4">
|
||||
<i class="fas fa-folder text-gray-400 mr-2"></i>
|
||||
<span
|
||||
class="truncate">/media/mangas/{{ manga.title }} ({{ manga.publicationYear }})</span>
|
||||
<span
|
||||
class="ml-auto bg-green-600 py-1 px-2 rounded">{{ manga.status ?? 'Terminé' }}</span>
|
||||
</div>
|
||||
<div class="flex items-center mb-4">
|
||||
{% set genre_count = 0 %}
|
||||
{% for genre in manga.genres %}
|
||||
{% if genre_count < 5 %}
|
||||
<span class="bg-gray-700 py-1 px-2 rounded-sm mr-2">{{ genre }}</span>
|
||||
{% set genre_count = genre_count + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if genre_count == 5 and manga.genres|length > 5 %}
|
||||
<span class="bg-gray-700 py-1 px-2 rounded-sm mr-2">...</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<div class="flex items-center mb-2">
|
||||
<i class="fas fa-heart text-red-500 mr-2"></i>
|
||||
<span>{{ manga.rating|round(2) }}</span>
|
||||
</div>
|
||||
<p>{{ manga.description|truncate(500) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<turbo-frame id="chapter_list"
|
||||
src="{{ fragment_uri(controller('App\\Controller\\MangaController::_chaptersByManga', {'id': manga.id})) }}"
|
||||
>
|
||||
</turbo-frame>
|
||||
{# Modal d'édition #}
|
||||
<twig:Modal
|
||||
openTrigger="openEditModal"
|
||||
closeTrigger="closeEditModal"
|
||||
title="Edit Manga"
|
||||
modalClass="w-full max-w-4xl"
|
||||
>
|
||||
{% block content %}
|
||||
{{ form_start(form, {'action': path('app_manga_edit', {'id': manga.id}), 'attr': {'id': 'editForm', 'data-turbo-form': 'true'}}) }}
|
||||
{% do form.alternativeSlugs.setRendered() %}
|
||||
|
||||
<div class="space-y-4 overflow-y-auto px-4">
|
||||
{{ form_row(form.title, {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}, 'row_attr': {'class': 'mt-1'}}) }}
|
||||
{{ form_row(form.slug, {
|
||||
'label_attr': {'class': 'block text-sm font-medium text-gray-700'},
|
||||
'row_attr': {'class': 'mt-1'},
|
||||
'attr': {
|
||||
'class': 'w-full px-3 py-2 bg-gray-100 border border-gray-300 rounded-md focus:outline-none text-gray-500',
|
||||
'readonly': true
|
||||
}
|
||||
}) }}
|
||||
{{ form_row(form.publicationYear, {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}, 'row_attr': {'class': 'mt-1'}}) }}
|
||||
{{ form_row(form.description, {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}, 'row_attr': {'class': 'mt-1'}}) }}
|
||||
{{ form_row(form.author, {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}, 'row_attr': {'class': 'mt-1'}}) }}
|
||||
{{ form_row(form.status, {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}, 'row_attr': {'class': 'mt-1'}}) }}
|
||||
{{ form_row(form.rating, {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}, 'row_attr': {'class': 'mt-1'}}) }}
|
||||
|
||||
<div {{ stimulus_controller('collection') }}>
|
||||
<label class="block text-sm font-medium text-gray-700">Slugs alternatifs</label>
|
||||
<div data-collection-target="container" class="grid grid-cols-4 gap-2 mt-1">
|
||||
{% for slug in form.alternativeSlugs %}
|
||||
<div
|
||||
class="inline-flex items-center bg-gray-100 rounded-full px-3 py-1 text-sm collection-item">
|
||||
{{ form_widget(slug, {'attr': {'class': 'bg-transparent border-none focus:outline-none focus:border-b focus:border-green-500 p-0 w-full'}}) }}
|
||||
<button type="button" data-action="collection#remove"
|
||||
class="ml-2 text-gray-500 hover:text-green-500 flex-shrink-0">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" data-action="collection#add"
|
||||
class="mt-2 text-sm text-green-500 hover:text-green-700">
|
||||
+ Ajouter un slug alternatif
|
||||
</button>
|
||||
<template data-collection-target="template">
|
||||
<div
|
||||
class="inline-flex items-center bg-gray-100 rounded-full px-3 py-1 text-sm collection-item">
|
||||
{{ form_widget(form.alternativeSlugs.vars.prototype, {'attr': {'class': 'bg-transparent border-none focus:outline-none focus:border-b focus:border-green-500 p-0 w-full'}}) }}
|
||||
<button type="button" data-action="collection#remove"
|
||||
class="ml-2 text-gray-500 hover:text-green-500 flex-shrink-0">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div {{ stimulus_controller('collection') }}>
|
||||
<label class="block text-sm font-medium text-gray-700">{{ form_label(form.genres) }}</label>
|
||||
<div data-collection-target="container" class="grid grid-cols-4 gap-2 mt-1">
|
||||
{% for genre in form.genres %}
|
||||
<div
|
||||
class="inline-flex items-center bg-gray-100 rounded-full px-3 py-1 text-sm collection-item">
|
||||
{{ form_widget(genre, {'attr': {'class': 'bg-transparent border-none focus:outline-none focus:border-b focus:border-green-500 p-0 w-full'}}) }}
|
||||
<button type="button" data-action="collection#remove"
|
||||
class="ml-2 text-gray-500 hover:text-green-500 flex-shrink-0">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" data-action="collection#add"
|
||||
class="mt-2 text-sm text-green-500 hover:text-green-700">
|
||||
+ Ajouter un genre
|
||||
</button>
|
||||
<template data-collection-target="template">
|
||||
<div
|
||||
class="inline-flex items-center bg-gray-100 rounded-full px-3 py-1 text-sm collection-item">
|
||||
{{ form_widget(form.genres.vars.prototype, {'attr': {'class': 'bg-transparent border-none focus:outline-none focus:border-b focus:border-green-500 p-0 w-full'}}) }}
|
||||
<button type="button" data-action="collection#remove"
|
||||
class="ml-2 text-gray-500 hover:text-green-500 flex-shrink-0">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
{% block footer %}
|
||||
<button type="button" data-action="modal#close"
|
||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Cancel
|
||||
</button>
|
||||
<button type="submit" form="editForm"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-600 text-base font-medium text-white hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Save
|
||||
</button>
|
||||
{% endblock %}
|
||||
</twig:Modal>
|
||||
|
||||
{# Modal de confirmation de suppression #}
|
||||
<twig:Modal
|
||||
openTrigger="openDeleteModal"
|
||||
closeTrigger="closeDeleteModal"
|
||||
title="Delete Manga"
|
||||
>
|
||||
<twig:block name="content">
|
||||
<p class="text-sm text-gray-500">
|
||||
Are you sure you want to delete this manga? This action cannot be undone.
|
||||
</p>
|
||||
</twig:block>
|
||||
<twig:block name="footer">
|
||||
<button
|
||||
{{ stimulus_controller('toolbar', { mangaId: manga.id }) }}
|
||||
{{ stimulus_action('toolbar', 'confirmDelete') }}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Delete
|
||||
</button>
|
||||
<button type="button" data-action="modal#close"
|
||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Cancel
|
||||
</button>
|
||||
</twig:block>
|
||||
</twig:Modal>
|
||||
|
||||
<twig:Modal
|
||||
openTrigger="openPreferredSourcesModal"
|
||||
closeTrigger="closePreferredSourcesModal"
|
||||
title="Manage Preferred Sources"
|
||||
modalClass="w-full max-w-4xl"
|
||||
>
|
||||
{% block content %}
|
||||
<div {{ stimulus_controller('preferred-sources', {
|
||||
mangaId: manga.id,
|
||||
preferredSources: manga.preferredSources|map(s => s.id)|json_encode,
|
||||
allSources: contentSources|map(s => {
|
||||
id: s.id,
|
||||
name: s.cleanBaseUrl
|
||||
})|json_encode
|
||||
}) }}>
|
||||
<div>
|
||||
<h3 class="text-lg font-medium text-gray-900">Preferred Sources</h3>
|
||||
<ul data-preferred-sources-target="preferredList" class="mt-2 space-y-2">
|
||||
{% for source in manga.preferredSources %}
|
||||
<li data-id="{{ source.id }}" draggable="true"
|
||||
class="flex items-center justify-between p-2 bg-gray-100 rounded cursor-move">
|
||||
<span>{{ source.cleanBaseUrl }}</span>
|
||||
<button type="button" data-action="preferred-sources#removeSource"
|
||||
data-source-id="{{ source.id }}" class="text-red-500 hover:text-red-700">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-medium text-gray-900">Available Sources</h3>
|
||||
<ul data-preferred-sources-target="availableList" class="mt-2 space-y-2">
|
||||
{% for source in contentSources %}
|
||||
{% if source not in manga.preferredSources %}
|
||||
<li class="flex items-center justify-between p-2 bg-gray-100 rounded">
|
||||
<span>{{ source.cleanBaseUrl }}</span>
|
||||
<button type="button" data-action="preferred-sources#addSource"
|
||||
data-source-id="{{ source.id }}"
|
||||
class="text-green-500 hover:text-green-700">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<button type="button" data-action="modal#close"
|
||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Close
|
||||
</button>
|
||||
{% endblock %}
|
||||
</twig:Modal>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block body %}
|
||||
<div class="p-4">
|
||||
{{ component('MangaSearch', {query: query}) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block toolbar %}
|
||||
{% if toolbar is defined %}
|
||||
<twig:Toolbar toolbar="{{ toolbar }}"/>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{% include 'manga/_list.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -1,61 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}{{ manga.title }} - Chapitre {{ chapter.number }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="w-full mx-auto p-4">
|
||||
<h1 class="text-center text-3xl my-4">{{ manga.title }} - Chapitre {{ chapter.number }}</h1>
|
||||
|
||||
{% set isCbz = chapter.cbzPath is not null %}
|
||||
{% set totalPages = isCbz ? totalPages : pages|length %}
|
||||
{% set currentPageNumber = isCbz ? currentPage : currentPage.number %}
|
||||
|
||||
<div class="flex justify-center my-4">
|
||||
{% if currentPageNumber > 1 %}
|
||||
<a href="{{ path('app_manga_read', { 'mangaSlug': manga.slug, 'chapterNumber': chapter.number, 'pageNumber': currentPageNumber - 1 }) }}"
|
||||
class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 mr-4">« Précédent</a>
|
||||
{% endif %}
|
||||
{% if currentPageNumber < totalPages %}
|
||||
<a href="{{ path('app_manga_read', { 'mangaSlug': manga.slug, 'chapterNumber': chapter.number, 'pageNumber': currentPageNumber + 1 }) }}"
|
||||
class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">Suivant »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="page-container flex justify-center">
|
||||
{% if isCbz %}
|
||||
{% if currentPageNumber < totalPages %}
|
||||
<a href="{{ path('app_manga_read', {'mangaSlug': manga.slug, 'chapterNumber': chapter.number, 'pageNumber': currentPageNumber + 1}) }}">
|
||||
<img src="data:image/jpeg;base64,{{ pageContent }}" alt="Page {{ currentPageNumber }}"
|
||||
class="shadow-lg">
|
||||
</a>
|
||||
{% else %}
|
||||
<img src="data:image/jpeg;base64,{{ pageContent }}" alt="Page {{ currentPageNumber }}" class="shadow-lg">
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if currentPageNumber < totalPages %}
|
||||
<a href="{{ path('app_manga_read', {'mangaSlug': manga.slug, 'chapterNumber': chapter.number, 'pageNumber': currentPageNumber + 1}) }}">
|
||||
<img src="{{ asset(currentPage.imageLocalUrl) }}" alt="Page {{ currentPageNumber }}"
|
||||
class="shadow-lg">
|
||||
</a>
|
||||
{% else %}
|
||||
<img src="{{ asset(currentPage.imageLocalUrl) }}" alt="Page {{ currentPageNumber }}" class="shadow-lg">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center my-4">
|
||||
{% if currentPageNumber > 1 %}
|
||||
<a href="{{ path('app_manga_read', { 'mangaSlug': manga.slug, 'chapterNumber': chapter.number, 'pageNumber': currentPageNumber - 1 }) }}"
|
||||
class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 mr-4">« Précédent</a>
|
||||
{% endif %}
|
||||
{% if currentPageNumber < totalPages %}
|
||||
<a href="{{ path('app_manga_read', { 'mangaSlug': manga.slug, 'chapterNumber': chapter.number, 'pageNumber': currentPageNumber + 1 }) }}"
|
||||
class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">Suivant »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-4">
|
||||
Page {{ currentPageNumber }} sur {{ totalPages }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,10 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block toolbar %}
|
||||
{% if toolbar is defined %}
|
||||
<twig:Toolbar toolbar="{{ toolbar }}"/>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{% include 'manga/_manga_details.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<div id="menu" class="h-full w-full bg-gray-600 text-white">
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="{{ app.request.get('_route') starts with 'app_manga' ? 'border-l-4 border-green-600' : '' }}">
|
||||
<a href="{{ path('app_legacy') }}" class="block pl-4 py-2 flex items-center {{ app.request.get('_route') starts with 'app_manga' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<i class="fas fa-book mr-2"></i>
|
||||
<span>Mangas</span>
|
||||
</a>
|
||||
{% if app.request.get('_route') starts with 'app_manga' %}
|
||||
<ul class="ml-8 mt-2 space-y-4">
|
||||
<li><a href="{{ path('app_manga_search') }}" class="hover:text-green-600">Ajouter un nouveau</a></li>
|
||||
<li><a href="{{ path('app_manga_import') }}" class="hover:text-green-600">Import bibliothèque</a></li>
|
||||
<li><a href="#" class="hover:text-green-600">Découvrir</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="{{ app.request.get('_route') == 'app_convert' ? 'border-l-4 border-green-600' : '' }}">
|
||||
<a href="{{ path('app_convert') }}" class="block pl-4 py-2 flex items-center {{ app.request.get('_route') == 'app_convert' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<i class="fas fa-exchange-alt mr-2"></i>
|
||||
<span>Convertir CBR en CBZ</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ app.request.get('_route') == 'app_calendar' ? 'border-l-4 border-green-600' : '' }}">
|
||||
<a href="{{ path('app_calendar') }}" class="block pl-4 py-2 flex items-center {{ app.request.get('_route') == 'app_calendar' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<i class="fas fa-calendar-alt mr-2"></i>
|
||||
<span>Calendrier</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ app.request.get('_route') == 'app_activity' ? 'border-l-4 border-green-600' : '' }}">
|
||||
<a href="{{ path('app_activity') }}" class="block pl-4 py-2 flex items-center justify-between {{ app.request.get('_route') == 'app_activity' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<div class="flex items-center">
|
||||
<i class="fas fa-clock mr-2"></i>
|
||||
<span>Activité</span>
|
||||
</div>
|
||||
<span data-controller="activity" data-activity-target="activity" class="bg-green-500 rounded px-2 mr-2 hover:text-white hidden"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ app.request.get('_route') starts with 'app_settings' ? 'border-l-4 border-green-600' : '' }}">
|
||||
<a href="{{ path('app_settings') }}" class="block pl-4 py-2 flex items-center {{ app.request.get('_route') starts with 'app_settings' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<i class="fas fa-cog mr-2"></i>
|
||||
<span>Paramètres</span>
|
||||
</a>
|
||||
{% if app.request.get('_route') starts with 'app_settings' %}
|
||||
<ul class="ml-8 mt-2 space-y-4">
|
||||
<li><a href="{{ path('app_settings_general') }}" class="hover:text-green-600">Général</a></li>
|
||||
<li><a href="{{ path('app_settings_folders') }}" class="hover:text-green-600">Dossiers</a></li>
|
||||
<li><a href="{{ path('app_settings_scrappers_list') }}" class="hover:text-green-600">Scrappers</a></li>
|
||||
<li><a href="{{ path('app_settings_ui') }}" class="hover:text-green-600">UI</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="{{ app.request.get('_route') starts with 'app_system' ? 'border-l-4 border-green-600' : '' }}">
|
||||
<a href="{{ path('app_system') }}" class="block pl-4 py-2 flex items-center {{ app.request.get('_route') starts with 'app_system' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<i class="fas fa-desktop mr-2"></i>
|
||||
<span>Système</span>
|
||||
</a>
|
||||
{% if app.request.get('_route') starts with 'app_system' %}
|
||||
<ul class="ml-8 mt-2 space-y-4">
|
||||
<li><a href="{{ path('app_system_status') }}" class="hover:text-green-600">Status</a></li>
|
||||
<li><a href="{{ path('app_system_backup') }}" class="hover:text-green-600">Backup</a></li>
|
||||
<li><a href="{{ path('app_system_logs') }}" class="hover:text-green-600">Logs</a></li>
|
||||
<li><a href="{{ path('app_system_updates') }}" class="hover:text-green-600">Updates</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>React App</title>
|
||||
{{ encore_entry_link_tags('react-app') }}
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-app"></div>
|
||||
{{ encore_entry_script_tags('react-app') }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,31 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}{{ manga.title }} - Chapitre {{ chapter.number }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="w-full mx-auto p-4" {{ stimulus_controller('reader', {
|
||||
mangaSlug: manga.slug,
|
||||
chapterNumber: chapter.number,
|
||||
totalPages: totalPages
|
||||
}) }}>
|
||||
<h1 class="text-center text-3xl my-4">{{ manga.title }} - Chapitre {{ chapter.number }}</h1>
|
||||
|
||||
<div class="flex justify-center my-4">
|
||||
<button class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 mr-4" data-action="reader#previousChapter">« Chapitre précédent</button>
|
||||
<select class="px-4 py-2 rounded" data-action="reader#changeChapter" data-reader-target="chapterSelect"></select>
|
||||
<button class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600 ml-4" data-action="reader#nextChapter">Chapitre suivant »</button>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center my-4">
|
||||
<button class="bg-green-500 text-white px-4 py-2 rounded hover:bg-green-600 mr-4" data-action="reader#toggleReadingMode" data-reader-target="readingModeButton">Passer en mode vertical</button>
|
||||
</div>
|
||||
|
||||
<div class="page-container flex flex-col items-center min-h-[80vh]" data-reader-target="pageContainer">
|
||||
<!-- Les pages seront injectées ici par le JavaScript -->
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-4" data-reader-target="pageInfo">
|
||||
Page <span data-reader-target="currentPage">1</span> sur {{ totalPages }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,62 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Application Settings{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mx-auto p-4">
|
||||
<div class="bg-white shadow-lg rounded-sm overflow-hidden">
|
||||
<div class="bg-gray-800 text-white p-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
<i class="fas fa-cog mr-2"></i>Application Settings
|
||||
</h1>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
{{ form_start(form, {'attr': {'class': 'space-y-6'}}) }}
|
||||
<div class="mb-4">
|
||||
{{ form_label(form.mangaDirectory, 'Manga Directory', {'label_attr': {'class': 'block text-sm font-medium text-gray-700 mb-2'}}) }}
|
||||
{{ form_widget(form.mangaDirectory, {'attr': {
|
||||
'class': 'mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm',
|
||||
'placeholder': '/path/to/manga/directory'
|
||||
}}) }}
|
||||
{{ form_errors(form.mangaDirectory) }}
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
{{ form_label(form.imageDirectory, 'Image Directory', {'label_attr': {'class': 'block text-sm font-medium text-gray-700 mb-2'}}) }}
|
||||
{{ form_widget(form.imageDirectory, {'attr': {
|
||||
'class': 'mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm',
|
||||
'placeholder': '/path/to/image/directory'
|
||||
}}) }}
|
||||
{{ form_errors(form.imageDirectory) }}
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between mt-6">
|
||||
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
|
||||
Save Settings
|
||||
</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 bg-white shadow-lg rounded-sm overflow-hidden">
|
||||
<div class="bg-gray-800 text-white p-4">
|
||||
<h2 class="text-xl font-bold">
|
||||
<i class="fas fa-info-circle mr-2"></i>Current Settings
|
||||
</h2>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Manga Directory</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{ form.mangaDirectory.vars.value }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Image Directory</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{ form.imageDirectory.vars.value }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,20 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello SettingsController!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<style>
|
||||
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||
</style>
|
||||
|
||||
<div class="example-wrapper">
|
||||
<h1>Hello {{ controller_name }}! ✅</h1>
|
||||
|
||||
This friendly message is coming from:
|
||||
<ul>
|
||||
<li>Your controller at <code><a href="{{ '/app/src/Controller/SettingsController.php'|file_link(0) }}">src/Controller/SettingsController.php</a></code></li>
|
||||
<li>Your template at <code><a href="{{ '/app/templates/settings/index.html.twig'|file_link(0) }}">templates/settings/index.html.twig</a></code></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,81 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block toolbar %}
|
||||
{% if toolbar is defined %}
|
||||
<twig:Toolbar toolbar="{{ toolbar }}"/>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block title %}Scrapper Configurations{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mx-auto p-4">
|
||||
<h1 class="text-2xl font-bold mb-6">Scrapper Configurations</h1>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{% for contentSource in contentSources %}
|
||||
<div
|
||||
class="relative flex flex-col justify-between bg-white rounded-sm border border-gray-200 shadow-md hover:shadow-lg transition-shadow duration-300 h-full group">
|
||||
<div class="p-4">
|
||||
<div class="flex flex-row items-center justify-between mb-2">
|
||||
<h5 class="text-xl tracking-tight text-gray-900 truncate flex-grow">
|
||||
{{ contentSource.baseUrl|replace({'http://': '', 'https://': ''})|trim('/', 'right') }}
|
||||
</h5>
|
||||
<a href="{{ contentSource.baseUrl }}" target="_blank" rel="noopener noreferrer"
|
||||
class="text-gray-400 hover:text-green-600 ml-2 z-10">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-4 bg-gray-50">
|
||||
<div class="flex space-x-2">
|
||||
<span class="px-2 py-1 text-xs font-semibold text-white bg-green-400 rounded-sm">
|
||||
{{ contentSource.scrapingType }}
|
||||
</span>
|
||||
<span class="px-2 py-1 text-xs font-semibold text-white bg-green-400 rounded-sm">
|
||||
{{ contentSource.nextPageSelector ? 'Horizontal' : 'Vertical' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ path('app_settings_scrappers', {'id': contentSource.id}) }}"
|
||||
class="absolute inset-0 z-0">
|
||||
<span class="sr-only">Edit configuration</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<a href="{{ path('app_settings_scrappers') }}"
|
||||
class="block p-6 bg-white rounded-sm border border-gray-200 shadow-md hover:bg-gray-100 flex items-center justify-center h-full">
|
||||
<div class="text-center">
|
||||
<i class="fas fa-plus text-4xl text-gray-400 mb-2"></i>
|
||||
<p class="text-gray-600">Add New Configuration</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<twig:Modal
|
||||
openTrigger="openScrapperModal"
|
||||
closeTrigger="closeScrapperModal"
|
||||
title="Import/Export Scrapper Configurations"
|
||||
modalClass="w-full max-w-4xl"
|
||||
stimulus="scrapper_import"
|
||||
>
|
||||
{% block content %}
|
||||
<div {{ stimulus_controller('scrapper_import') }}>
|
||||
<div class="space-y-4 overflow-y-auto px-4">
|
||||
<textarea data-scrapper-import-target="textarea" rows="15"
|
||||
class="w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-green-500"></textarea>
|
||||
</div>
|
||||
<button type="button" data-action="modal#close"
|
||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Cancel
|
||||
</button>
|
||||
<button data-scrapper-import-target="submitButton" type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-600 text-base font-medium text-white hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block footer %}
|
||||
{% endblock %}
|
||||
</twig:Modal>
|
||||
{% endblock %}
|
||||
@@ -1,66 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}{{ isNew ? 'Create' : 'Edit' }} Scrapper Configuration{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mx-auto p-4">
|
||||
<div class="bg-white shadow-lg rounded-sm overflow-hidden">
|
||||
<div class="bg-gray-800 text-white p-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
<i class="fas fa-cog mr-2"></i>{{ isNew ? 'Create' : 'Edit' }} Scrapper Configuration
|
||||
</h1>
|
||||
</div>
|
||||
<div class="p-6" data-controller="scrapper-configure">
|
||||
{{ form_start(form, {'attr': {'class': 'space-y-6', 'data-scrapper-configure-target': 'form', 'data-action': 'submit->scrapper-configure#saveConfiguration'}}) }}
|
||||
|
||||
{% for field in form.children %}
|
||||
<div class="mb-4">
|
||||
{{ form_label(field, null, {'label_attr': {'class': 'block text-sm font-medium text-gray-700 mb-2'}}) }}
|
||||
{{ form_widget(field, {'attr': {
|
||||
'class': 'mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm',
|
||||
'placeholder': get_placeholder(field.vars.name)
|
||||
}}) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="mt-6">
|
||||
<button type="submit" class="w-full flex items-center justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
|
||||
<span class="mr-2">{{ isNew ? 'Save' : 'Update' }} Configuration</span>
|
||||
<i class="fas fa-{{ isNew ? 'save' : 'edit' }}"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
<div class="mt-8 bg-gray-100 p-6 rounded-md">
|
||||
<h2 class="text-xl font-semibold mb-4">
|
||||
<i class="fas fa-vial mr-2"></i>Test Configuration
|
||||
</h2>
|
||||
<form
|
||||
action="{{ path('app_settings_scrappers_test') }}"
|
||||
method="POST"
|
||||
data-scrapper-configure-target="testForm"
|
||||
data-action="submit->scrapper-configure#testConfiguration"
|
||||
class="space-y-4">
|
||||
<div>
|
||||
<label for="testMangaSlug" class="block text-sm font-medium text-gray-700 mb-2">Manga Slug</label>
|
||||
<input type="text" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm" id="testMangaSlug" name="mangaSlug" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="testChapterNumber" class="block text-sm font-medium text-gray-700 mb-2">Chapter Number</label>
|
||||
<input type="text" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm" id="testChapterNumber" name="chapterNumber" required>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="w-full flex items-center justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
|
||||
<span class="mr-2">Test Configuration</span>
|
||||
<i class="fas fa-play"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div data-scrapper-configure-target="testResults" class="mt-8"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,20 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello SystemController!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<style>
|
||||
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||
</style>
|
||||
|
||||
<div class="example-wrapper">
|
||||
<h1>Hello {{ controller_name }}! ✅</h1>
|
||||
|
||||
This friendly message is coming from:
|
||||
<ul>
|
||||
<li>Your controller at <code><a href="{{ '/app/src/Controller/SystemController.php'|file_link(0) }}">src/Controller/SystemController.php</a></code></li>
|
||||
<li>Your template at <code><a href="{{ '/app/templates/system/index.html.twig'|file_link(0) }}">templates/system/index.html.twig</a></code></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user