diff --git a/app/templates/base.html b/app/templates/base.html
index ca6a654..5ed8e1d 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -63,17 +63,6 @@
Manage Channels
-
-
diff --git a/app/templates/index.html b/app/templates/index.html
index ec8fce8..76f98dd 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -106,15 +106,45 @@
-
+
-
+
+
+
+
+
+
{% endblock %}
{% block extra_scripts %}
@@ -123,5 +153,29 @@
window.MC_CONFIG = {
deviceName: "{{ device_name }}"
};
+
+ // Reload iframe content when modals are opened to ensure fresh data
+ document.addEventListener('DOMContentLoaded', function() {
+ const dmModal = document.getElementById('dmModal');
+ const contactsModal = document.getElementById('contactsModal');
+
+ if (dmModal) {
+ dmModal.addEventListener('show.bs.modal', function () {
+ const dmFrame = document.getElementById('dmFrame');
+ if (dmFrame) {
+ dmFrame.src = dmFrame.src;
+ }
+ });
+ }
+
+ if (contactsModal) {
+ contactsModal.addEventListener('show.bs.modal', function () {
+ const contactsFrame = document.getElementById('contactsFrame');
+ if (contactsFrame) {
+ contactsFrame.src = contactsFrame.src;
+ }
+ });
+ }
+ });
{% endblock %}