From 5f54e48b3fa61ccb4c2c856c3111fa78296881c8 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Mon, 7 Jul 2025 15:04:20 -0500 Subject: [PATCH] fix: adds modal for adding new monitor --- .../controllers/monitor_button_controller.js | 5 +- compose.yml | 2 +- templates/components/Modal.html.twig | 4 +- templates/search/result.html.twig | 85 +++---------------- 4 files changed, 20 insertions(+), 76 deletions(-) diff --git a/assets/controllers/monitor_button_controller.js b/assets/controllers/monitor_button_controller.js index d07e547..f34dcb3 100644 --- a/assets/controllers/monitor_button_controller.js +++ b/assets/controllers/monitor_button_controller.js @@ -8,7 +8,7 @@ import { Controller } from '@hotwired/stimulus'; /* stimulusFetch: 'lazy' */ export default class extends Controller { static targets = ['button', 'options'] - static outlets = ['result-filter'] + static outlets = ['result-filter', 'dialog'] static values = { tmdbId: String, imdbId: String, @@ -54,6 +54,9 @@ export default class extends Controller { title: this.titleValue, monitorType: 'tvshows', }); + if (this.hasDialogOutlet) { + this.dialogOutlet.close(); + } } async monitorSeason() { diff --git a/compose.yml b/compose.yml index 09a7e65..6cb77bc 100755 --- a/compose.yml +++ b/compose.yml @@ -40,7 +40,7 @@ services: tty: true environment: TZ: America/Chicago - command: php /app/bin/console messenger:consume media_cache -vv --time-limit=3600 + command: php /app/bin/console messenger:consume async -vv --time-limit=3600 scheduler: diff --git a/templates/components/Modal.html.twig b/templates/components/Modal.html.twig index 91e6ea9..8c1ee2e 100644 --- a/templates/components/Modal.html.twig +++ b/templates/components/Modal.html.twig @@ -1,4 +1,4 @@ - +

{{ heading }}

@@ -22,5 +22,5 @@ {% endif %}
- + \ No newline at end of file diff --git a/templates/search/result.html.twig b/templates/search/result.html.twig index bc4ec44..d8315c9 100644 --- a/templates/search/result.html.twig +++ b/templates/search/result.html.twig @@ -22,86 +22,27 @@ {{ results.media.title }} - {{ results.media.year }} -{#
#} -{# #} - -{#
#} -{# #} - -
- - - - + Monitoring a series will continuously search for new episodes and attempt to automatically download them. Your download preferences + will be used to choose the correct file. To stop monitoring for new episodes, delete the monitor. +

+ Would you like to add a new monitor for "{{ results.media.title }}"? +