feat: shows monitor poster on modal
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', async function() {
|
||||
const modal = document.getElementById('previewModal');
|
||||
modal.setAttribute('mdWidth', '25rem');
|
||||
let data = await fetch('/api/monitor/upcoming-episodes');
|
||||
data = (await data.json())['data'];
|
||||
|
||||
@@ -47,7 +48,12 @@
|
||||
eventClick: function (data) {
|
||||
modal.display({
|
||||
heading: data.event.title,
|
||||
content: `<p>${data.event.startStr}</p>`
|
||||
content: `
|
||||
<div class="flex flex-col gap-4 justify-center items-center">
|
||||
<img src="${data.event.extendedProps.attachment}" class="w-[90%] rounded-md" />
|
||||
<p>${data.event.startStr}</p>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user