- fix progressbar
- {slug} {chapterNumber} in Url
- activity toolbar
This commit is contained in:
Jérémy Guillot
2024-07-07 15:25:12 +02:00
parent 54c581b229
commit 4672886a67
15 changed files with 183 additions and 59 deletions

View File

@@ -49,13 +49,13 @@ class ImportController extends AbstractController
return $this->redirectToRoute('import_match');
} catch (FileException $e) {
$this->notificationService->sendUpdate([
'type' => 'error',
'status' => 'error',
'message' => 'Une erreur est survenue lors de l\'import du fichier.'
]);
}
} else {
$this->notificationService->sendUpdate([
'type' => 'error',
'status' => 'error',
'message' => 'Le fichier doit être au format CBZ.'
]);
}
@@ -79,7 +79,7 @@ class ImportController extends AbstractController
$metadata = $this->cbzService->extractMetadata($filePath, $originalFileName);
if($metadata['title'] === '' || is_null($metadata['title'])){
$this->notificationService->sendUpdate([
'type' => 'error',
'status' => 'error',
'message' => 'Impossible de détecter le titre du manga.'
]);
return $this->redirectToRoute('app_manga_import');
@@ -108,10 +108,10 @@ class ImportController extends AbstractController
if(empty($mangas)) {
$this->notificationService->sendUpdate([
'type' => 'error',
'status' => 'error',
'message' => 'Aucun manga trouvé avec ce titre.'
]);
return $this->redirectToRoute('app_manga_new', ['query' => $metadata['title']]);
return $this->redirectToRoute('app_manga_search', ['query' => $metadata['title']]);
}
if ($request->isMethod('post')) {
@@ -142,7 +142,7 @@ class ImportController extends AbstractController
$manga = $this->mangaRepository->findOneBy(['slug' => $mangaSlug]);
if (!$manga) {
$this->notificationService->sendUpdate([
'type' => 'error',
'status' => 'error',
'message' => 'Manga non trouvé.'
]);
return $this->redirectToRoute('app_manga_import');
@@ -151,7 +151,7 @@ class ImportController extends AbstractController
$filePath = $session->get('import_file_path');
if (!$filePath) {
$this->notificationService->sendUpdate([
'type' => 'error',
'status' => 'error',
'message' => 'Fichier d\'import non trouvé.'
]);
return $this->redirectToRoute('app_manga_import');
@@ -166,13 +166,13 @@ class ImportController extends AbstractController
$this->mangaImportService->importVolume($manga, (int)$volume, $filePath, $originalFileName);
} catch (\Exception $e) {
$this->notificationService->sendUpdate([
'type' => 'error',
'status' => 'error',
'message' => 'Erreur lors de l\'import : ' . $e->getMessage()
]);
}
$this->notificationService->sendUpdate([
'type' => 'success',
'status' => 'success',
'message' => 'Import confirmé avec succès.'
]);
@@ -187,7 +187,7 @@ class ImportController extends AbstractController
$session->remove('import_original_file_name');
$this->notificationService->sendUpdate([
'type' => 'info',
'status' => 'info',
'message' => 'Import refusé. Le fichier a été supprimé.'
]);
}