mirror of
https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
synced 2025-06-22 09:53:57 +02:00
updated webUI according to param changes
This commit is contained in:
31
Flask/templates/dev.html
Normal file
31
Flask/templates/dev.html
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block left_pannel %}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{%if not current_user.is_authenticated %}
|
||||
<button class="unselected" onclick="location.href = '/login';">login</button>
|
||||
{% else %}
|
||||
<table>
|
||||
<tr>
|
||||
<td width="20%" height="90%">
|
||||
<div id="console"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
const consoleElement = document.getElementById('console');
|
||||
const eventSource = new EventSource('/stream');
|
||||
|
||||
eventSource.onmessage = (event) => {
|
||||
console.log("je ne comprend vraiment plus rien, meme git me casse les couilles");
|
||||
const newOutput = document.createElement('div');
|
||||
newOutput.textContent = event.data;
|
||||
consoleElement.appendChild(newOutput);
|
||||
};
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user