feat: button to add movie monitor

This commit is contained in:
2025-05-03 11:53:23 -05:00
parent babcb00440
commit 5688b3a0df
9 changed files with 166 additions and 7 deletions

View File

@@ -17,7 +17,7 @@
</div>
</div>
</div>
<div {{ turbo_stream_listen('alerts') }} class="absolute top-10 right-10 size-96">
<div {{ turbo_stream_listen('alerts') }} class="absolute top-10 right-10">
<div >
<ul id="alert_list">
</ul>

View File

@@ -10,9 +10,24 @@
<div class="p-4 flex flex-row gap-6">
<img class="w-40" src="{{ results.media.poster }}" />
<div class="w-full flex flex-col">
<h3 class="mb-4 text-xl font-medium leading-tight font-bold text-gray-50">
{{ results.media.title }} - {{ results.media.year }}
</h3>
<div class="mb-4 flex flex-row gap-2 justify-between">
<h3 class="text-xl font-medium leading-tight font-bold text-gray-50">
{{ results.media.title }} - {{ results.media.year }}
</h3>
<button class="px-1.5 py-1 bg-green-600 text-white rounded-md cursor-pointer"
{{ stimulus_controller('monitor', {
mediaType: results.media.mediaType,
imdbId: results.media.imdbId,
tmdbId: results.media.tmdbId,
title: results.media.title
}) }}
{% if results.media.mediaType == "movies" %}
{{ stimulus_action('monitor', 'addMovieMonitor', 'click') }}
{% endif %}
>
Monitor
</button>
</div>
<p class="text-gray-50">
{{ results.media.description }}
</p>