mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-08 09:05:36 +00:00
some WIP
Some checks failed
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built 📦 package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
Some checks failed
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built 📦 package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
This commit is contained in:
@@ -30,7 +30,7 @@ $(document).ready(function () {
|
||||
|
||||
$(document).on('click', '[data-target="#notification-preview"]', function (e) {
|
||||
var data = getNotificationData();
|
||||
$('#notification-iframe').contents().find('body').html('Loading...');
|
||||
$('#notification-iframe-html-preview').contents().find('body').html('Loading...');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: notification_test_render_preview_url,
|
||||
@@ -49,12 +49,15 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
function setPreview(data) {
|
||||
const iframe = document.getElementById("notification-iframe");
|
||||
const iframe = document.getElementById("notification-iframe-html-preview");
|
||||
const isDark = document.documentElement.getAttribute('data-darkmode') === 'true';
|
||||
|
||||
// this should come back in the data objk
|
||||
const isTextFormat = $('select.notification-format').val() === 'Text';
|
||||
|
||||
$('#notification-preview-title-text').text(data['title']);
|
||||
|
||||
$('#notification-div-text-preview').text(data['body']);
|
||||
return;
|
||||
iframe.srcdoc = `
|
||||
<html data-darkmode="${isDark}">
|
||||
<head>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#notification-iframe {
|
||||
#notification-iframe-html-preview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -163,7 +163,8 @@
|
||||
<p><strong>Title: </strong><span id="notification-preview-title-text">Preview loading..</span></p>
|
||||
<div style="flex:1; display:flex; flex-direction:column;">
|
||||
<strong>Body: </strong>
|
||||
<iframe id="notification-iframe"
|
||||
<div id="notification-div-text-preview" style="flex:1; height:95%; width:100%; border-radius:4px; margin-top:0.5rem; border:none;"></div>
|
||||
<iframe id="notification-iframe-html-preview"
|
||||
style="flex:1; height:95%; width:100%; border-radius:4px; margin-top:0.5rem; border:none;">
|
||||
Preview loading...
|
||||
</iframe>
|
||||
|
||||
Reference in New Issue
Block a user