euh en gros :
- j'ai bougé plus de JS dans le fichier main.js - j'ai changé le css pour que les listes soient joli
This commit is contained in:
parent
6fb0698d18
commit
466ab6d880
@ -186,6 +186,9 @@ body {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content > ul {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -2,3 +2,72 @@ function addline(ligne){
|
|||||||
var lplus = parseInt(ligne) + 1;
|
var lplus = parseInt(ligne) + 1;
|
||||||
document.getElementById("table").insertRow(lplus).insertCell(0).innerHTML = '<input type="file" id="file' + lplus + '" name="file' + lplus + '" onchange="addline(' + lplus + ')">'
|
document.getElementById("table").insertRow(lplus).insertCell(0).innerHTML = '<input type="file" id="file' + lplus + '" name="file' + lplus + '" onchange="addline(' + lplus + ')">'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function change_discord(value) {
|
||||||
|
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
||||||
|
|
||||||
|
if (value == "{{len}}"){
|
||||||
|
document.getElementById("name").value = "";
|
||||||
|
document.getElementById("submit").value = "Create !";
|
||||||
|
document.getElementById("successT").checked = false;
|
||||||
|
document.getElementById("errorsT").checked = false;
|
||||||
|
document.getElementById("successL").value = "";
|
||||||
|
document.getElementById("errorsL").value = "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log(data[parseInt(value)]["successL"]);
|
||||||
|
document.getElementById("submit").value = "Update";
|
||||||
|
document.getElementById("successT").checked = data[parseInt(value)]["successT"] == "True";
|
||||||
|
document.getElementById("errorsT").checked = data[parseInt(value)]["errorsT"] == "True";
|
||||||
|
document.getElementById("successL").value = data[parseInt(value)]["successL"];
|
||||||
|
document.getElementById("errorsL").value = data[parseInt(value)]["errorsL"];
|
||||||
|
document.getElementById("name").value = data[parseInt(value)]["name"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function change_config(value) {
|
||||||
|
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
||||||
|
document.getElementById("delete").style.visibility = "hidden";
|
||||||
|
if (value == "{{len}}"){
|
||||||
|
document.getElementById("submit").value = "Create !";
|
||||||
|
document.getElementById("discord").value = "-1";
|
||||||
|
document.getElementById("proxy").value = "-1";
|
||||||
|
document.getElementById("name").value = "";
|
||||||
|
for (let i = 1; i < 6; i++) {
|
||||||
|
document.getElementById("mail"+ i).value = "";
|
||||||
|
document.getElementById("pwd"+ i).value = "" ;
|
||||||
|
document.getElementById("2fa"+ i).value = "" ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
document.getElementById("delete").style.visibility = "visible";
|
||||||
|
document.getElementById("submit").value = "Update !";
|
||||||
|
document.getElementById("discord").value = data[parseInt(value)]["discord"];
|
||||||
|
document.getElementById("proxy").value = data[parseInt(value)]["proxy"];
|
||||||
|
document.getElementById("name").value = data[parseInt(value)]["name"];
|
||||||
|
for (let i = 1; i < 6; i++) {
|
||||||
|
document.getElementById("mail"+ i).value = data[parseInt(value)]['accounts'][i]["mail"] ;
|
||||||
|
document.getElementById("pwd"+ i).value = data[parseInt(value)]['accounts'][i]["pwd"] ;
|
||||||
|
document.getElementById("2fa"+ i).value = data[parseInt(value)]['accounts'][i]["2fa"] ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function change_proxy(value) {
|
||||||
|
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
||||||
|
if (value == "{{len}}"){
|
||||||
|
document.getElementById("submit").value = "Create";
|
||||||
|
document.getElementById("address").value = "";
|
||||||
|
document.getElementById("port").value = "";
|
||||||
|
document.getElementById("name").value = "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
document.getElementById("submit").value = "Update";
|
||||||
|
document.getElementById("address").value = data[parseInt(value)]["address"];
|
||||||
|
document.getElementById("port").value = data[parseInt(value)]["port"];
|
||||||
|
document.getElementById("name").value = data[parseInt(value)]["name"];
|
||||||
|
}
|
||||||
|
}
|
@ -47,7 +47,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="width: 10%;">config : </td>
|
<td style="width: 10%;">config : </td>
|
||||||
<td style="width: 40%;">
|
<td style="width: 40%;">
|
||||||
<select onchange="changecat(this.value)" name="config">
|
<select onchange="change_config(this.value)" name="config">
|
||||||
<option id="config" value="{{len}}">New config</option>
|
<option id="config" value="{{len}}">New config</option>
|
||||||
{% for i in configs %}
|
{% for i in configs %}
|
||||||
<option id="{{configs[i]['name']}}" value="{{i}}">{{configs[i]['name']}}</option>
|
<option id="{{configs[i]['name']}}" value="{{i}}">{{configs[i]['name']}}</option>
|
||||||
@ -136,41 +136,5 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function changecat(value) {
|
|
||||||
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
|
||||||
document.getElementById("delete").style.visibility = "hidden";
|
|
||||||
if (value == "{{len}}"){
|
|
||||||
document.getElementById("submit").value = "Create !";
|
|
||||||
document.getElementById("discord").value = "-1";
|
|
||||||
document.getElementById("proxy").value = "-1";
|
|
||||||
document.getElementById("name").value = "";
|
|
||||||
for (let i = 1; i < 6; i++) {
|
|
||||||
document.getElementById("mail"+ i).value = "";
|
|
||||||
document.getElementById("pwd"+ i).value = "" ;
|
|
||||||
document.getElementById("2fa"+ i).value = "" ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById("delete").style.visibility = "visible";
|
|
||||||
document.getElementById("submit").value = "Update !";
|
|
||||||
document.getElementById("discord").value = data[parseInt(value)]["discord"];
|
|
||||||
document.getElementById("proxy").value = data[parseInt(value)]["proxy"];
|
|
||||||
document.getElementById("name").value = data[parseInt(value)]["name"];
|
|
||||||
for (let i = 1; i < 6; i++) {
|
|
||||||
document.getElementById("mail"+ i).value = data[parseInt(value)]['accounts'][i]["mail"] ;
|
|
||||||
document.getElementById("pwd"+ i).value = data[parseInt(value)]['accounts'][i]["pwd"] ;
|
|
||||||
document.getElementById("2fa"+ i).value = data[parseInt(value)]['accounts'][i]["2fa"] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -44,7 +44,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="select" onchange="changecat(this.value)">
|
<select name="select" onchange="change_discord(this.value)">
|
||||||
<option selected id="new" value="{{ len }}">Create new Discord config</option>
|
<option selected id="new" value="{{ len }}">Create new Discord config</option>
|
||||||
{% for i in data %}
|
{% for i in data %}
|
||||||
<option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
|
<option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
|
||||||
@ -85,30 +85,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<script>
|
|
||||||
function changecat(value) {
|
|
||||||
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
|
||||||
|
|
||||||
if (value == "{{len}}"){
|
|
||||||
document.getElementById("name").value = "";
|
|
||||||
document.getElementById("submit").value = "Create !";
|
|
||||||
document.getElementById("successT").checked = false;
|
|
||||||
document.getElementById("errorsT").checked = false;
|
|
||||||
document.getElementById("successL").value = "";
|
|
||||||
document.getElementById("errorsL").value = "";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log(data[parseInt(value)]["successL"]);
|
|
||||||
document.getElementById("submit").value = "Update";
|
|
||||||
document.getElementById("successT").checked = data[parseInt(value)]["successT"] == "True";
|
|
||||||
document.getElementById("errorsT").checked = data[parseInt(value)]["errorsT"] == "True";
|
|
||||||
document.getElementById("successL").value = data[parseInt(value)]["successL"];
|
|
||||||
document.getElementById("errorsL").value = data[parseInt(value)]["errorsL"];
|
|
||||||
document.getElementById("name").value = data[parseInt(value)]["name"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -48,7 +48,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="comlumn-name"></td>
|
<td class="comlumn-name"></td>
|
||||||
<td>
|
<td>
|
||||||
<select name="select" onchange="changecat(this.value)">
|
<select name="select" onchange="change_proxy(this.value)">
|
||||||
<option selected id="new" value="{{ len }}">Create new proxy</option>
|
<option selected id="new" value="{{ len }}">Create new proxy</option>
|
||||||
{% for i in data %}
|
{% for i in data %}
|
||||||
<option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
|
<option id="{{data[i]['name']}}" value="{{i}}">{{data[i]['name']}}</option>
|
||||||
@ -81,25 +81,6 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function changecat(value) {
|
|
||||||
data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON
|
|
||||||
if (value == "{{len}}"){
|
|
||||||
document.getElementById("submit").value = "Create";
|
|
||||||
document.getElementById("address").value = "";
|
|
||||||
document.getElementById("port").value = "";
|
|
||||||
document.getElementById("name").value = "";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById("submit").value = "Update";
|
|
||||||
document.getElementById("address").value = data[parseInt(value)]["address"];
|
|
||||||
document.getElementById("port").value = data[parseInt(value)]["port"];
|
|
||||||
document.getElementById("name").value = data[parseInt(value)]["name"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<h2>TODO</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>TODO</li>
|
|
||||||
<li>reorder config</li>
|
<li>reorder config</li>
|
||||||
<li>real override</li>
|
<li>real override</li>
|
||||||
<li>ban button</li>
|
<li>ban button</li>
|
||||||
@ -63,8 +63,8 @@
|
|||||||
<li>logs viewer</li>
|
<li>logs viewer</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
<h2>Backup config files</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><h2>Backup config files</h2></li>
|
|
||||||
<li><a href="/download/configs.json">download account config</a></li>
|
<li><a href="/download/configs.json">download account config</a></li>
|
||||||
<li><a href="/download/discord.json">download discord config</a></li>
|
<li><a href="/download/discord.json">download discord config</a></li>
|
||||||
<li><a href="/download/flask.json">download flask config</a></li>
|
<li><a href="/download/flask.json">download flask config</a></li>
|
||||||
@ -76,8 +76,8 @@
|
|||||||
<h2>Upload your files</h2>
|
<h2>Upload your files</h2>
|
||||||
<form method="POST" action="/upload_file/" enctype=multipart/form-data>
|
<form method="POST" action="/upload_file/" enctype=multipart/form-data>
|
||||||
<table id="table">
|
<table id="table">
|
||||||
<li><input type="file" id="file1" name="file1" onchange='addline(0)'></li>
|
<tr><td><input type="file" id="file1" name="file1" onchange='addline(0)'></td></tr>
|
||||||
<li><input type="submit" name="settings" id="submit" value="send file" class="button"/></li>
|
<tr><td><input type="submit" name="settings" id="submit" value="send file" class="button"/></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user