Spaces:
Sleeping
Sleeping
Update templates/app.html
Browse files- templates/app.html +23 -25
templates/app.html
CHANGED
|
@@ -7,25 +7,30 @@
|
|
| 7 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
-
<div id="
|
| 11 |
-
<div id="
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
<
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
</div>
|
|
|
|
| 29 |
</div>
|
| 30 |
<script type="text/javascript" charset="utf-8">
|
| 31 |
let latest_msg_id = {{ latestID }};
|
|
@@ -103,13 +108,6 @@
|
|
| 103 |
row.appendChild(contentTxt);
|
| 104 |
zone.appendChild(row);
|
| 105 |
}
|
| 106 |
-
|
| 107 |
-
/* supabase // supabase will eventually be replaced for SSE and realtime! Check back soon
|
| 108 |
-
.channel("main/general")
|
| 109 |
-
.on("broadcast", { event: 'new_message', schema: 'public', table: 'messages' }, payload => {
|
| 110 |
-
console.log("New message received"); // Temp for dev lol
|
| 111 |
-
checkForMessage(payload);
|
| 112 |
-
}) */
|
| 113 |
</script>
|
| 114 |
</body>
|
| 115 |
</html>
|
|
|
|
| 7 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
+
<div id="page">
|
| 11 |
+
<div id="servers"></div>
|
| 12 |
+
<div id="channels"></div>
|
| 13 |
+
<div id="chat">
|
| 14 |
+
<div id="zone">
|
| 15 |
+
{% for msg in history %}
|
| 16 |
+
{% if msg.local %}
|
| 17 |
+
<div class="R-Local MSG-Row">
|
| 18 |
+
<p class="UL-Local UserLabel">{{ msg.user }}</p>
|
| 19 |
+
<p class="M-Local Message">{{ msg.message }}</p>
|
| 20 |
+
</div>
|
| 21 |
+
{% elif not msg.local %}
|
| 22 |
+
<div class="MSG-Row">
|
| 23 |
+
<p class="UserLabel">{{ msg.user }}</p>
|
| 24 |
+
<p class="Message">{{ msg.message }}</p>
|
| 25 |
+
</div>
|
| 26 |
+
{% endif %}
|
| 27 |
+
{% endfor %}
|
| 28 |
+
</div>
|
| 29 |
+
<div class="input">
|
| 30 |
+
<input id="inputText" placeholder="Message"/>
|
| 31 |
+
</div>
|
| 32 |
</div>
|
| 33 |
+
<div id="users"></div>
|
| 34 |
</div>
|
| 35 |
<script type="text/javascript" charset="utf-8">
|
| 36 |
let latest_msg_id = {{ latestID }};
|
|
|
|
| 108 |
row.appendChild(contentTxt);
|
| 109 |
zone.appendChild(row);
|
| 110 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
</script>
|
| 112 |
</body>
|
| 113 |
</html>
|