feat: notification system via Mercure for scraping events
- NotificationInterface: add sendInfo() and sendWarning() levels - SymfonyNotification: implement new levels (publishes to 'notifications' topic) - ChapterScrapingStarted: carry mangaTitle + chapterNumber, now dispatched - ScrapeChapterHandler: dispatch ChapterScrapingStarted before scraping loop - ScrapingEventSubscriber: wire NotificationInterface for started/scraped/failed events - useMercureNotifications: new global Vue composable subscribing to 'notifications' topic - App.vue: mount useMercureNotifications() at app root - SendTestNotificationCommand: `app:notify:test --type --message` for dev/prod testing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
95f224d69a
commit
41ca08f20e
@@ -17,18 +17,22 @@ readonly class SymfonyNotification implements NotificationInterface
|
||||
|
||||
public function sendSuccess(string $message): void
|
||||
{
|
||||
$this->sendUpdate([
|
||||
'status' => 'success',
|
||||
'message' => $message
|
||||
]);
|
||||
$this->sendUpdate(['status' => 'success', 'message' => $message]);
|
||||
}
|
||||
|
||||
public function sendError(string $message): void
|
||||
{
|
||||
$this->sendUpdate([
|
||||
'status' => 'error',
|
||||
'message' => $message
|
||||
]);
|
||||
$this->sendUpdate(['status' => 'error', 'message' => $message]);
|
||||
}
|
||||
|
||||
public function sendInfo(string $message): void
|
||||
{
|
||||
$this->sendUpdate(['status' => 'info', 'message' => $message]);
|
||||
}
|
||||
|
||||
public function sendWarning(string $message): void
|
||||
{
|
||||
$this->sendUpdate(['status' => 'warning', 'message' => $message]);
|
||||
}
|
||||
|
||||
public function sendUpdate(array $data): void
|
||||
|
||||
Reference in New Issue
Block a user