From fd8f972cf8144f1d8c075310b933d288dd9ec89a Mon Sep 17 00:00:00 2001 From: piair Date: Sat, 26 Aug 2023 13:14:32 +0200 Subject: [PATCH] let's go ca marche je pense --- Flask/static/js/main.js | 8 ++------ Flask/templates/config.html | 5 ++--- Flask/templates/discord.html | 4 ++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Flask/static/js/main.js b/Flask/static/js/main.js index 5758551..85c4286 100644 --- a/Flask/static/js/main.js +++ b/Flask/static/js/main.js @@ -4,9 +4,7 @@ function addline(ligne){ } -function change_discord(value) { - data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON - +function change_discord(value, data) { if (value == "{{len}}"){ document.getElementById("name").value = ""; document.getElementById("submit").value = "Create !"; @@ -26,8 +24,7 @@ function change_discord(value) { } } -function change_config(value) { - data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON +function change_config(value, data) { document.getElementById("delete").style.visibility = "hidden"; if (value == "{{len}}"){ document.getElementById("submit").value = "Create !"; @@ -73,6 +70,5 @@ function change_proxy(value, data) { function change_logs(value) { - console.log(value); document.getElementById("embed").src = "/static/logs/" + value + ".txt"; } diff --git a/Flask/templates/config.html b/Flask/templates/config.html index 3312c2a..6396921 100644 --- a/Flask/templates/config.html +++ b/Flask/templates/config.html @@ -42,17 +42,16 @@ {% block content %} + {%if not current_user.is_authenticated %} {% else %}
- -
config : - {% for i in configs %} diff --git a/Flask/templates/discord.html b/Flask/templates/discord.html index 423125b..4f0db6c 100644 --- a/Flask/templates/discord.html +++ b/Flask/templates/discord.html @@ -40,7 +40,7 @@
{% endblock %} {% block content %} - + {%if not current_user.is_authenticated %} {% else %} @@ -49,7 +49,7 @@ - {% for i in data %}