ca avance

This commit is contained in:
piair 2023-09-28 15:03:08 +02:00
parent 5d8ebc379b
commit 48abf0874c
6 changed files with 44 additions and 43 deletions

View File

@ -371,11 +371,14 @@ def stats():
@app.route("/override/", methods=["POST"]) @app.route("/override/", methods=["POST"])
def override_post(): def override_post():
print(request.form)
return(render_template("vnc_post.html")) return(render_template("vnc_post.html"))
@app.route("/override/", methods=["GET"]) @app.route("/override/", methods=["GET"])
def override_get(): def override_get():
return(render_template("vnc_get.html")) with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile:
configs = json.load(inFile)
return(render_template("vnc_get.html", configs=configs))
@app.route('/download/<path:filename>', methods=['GET', 'POST']) @app.route('/download/<path:filename>', methods=['GET', 'POST'])
@login_required @login_required

View File

@ -241,7 +241,7 @@ body {
*/ */
input[type=checkbox]{ input.toogle[type=checkbox]{
height: 0; height: 0;
width: 0; width: 0;
visibility: hidden; visibility: hidden;

View File

@ -25,11 +25,11 @@
</tr> </tr>
<tr> <tr>
<td class="comlumn-name">Send errors</td> <td class="comlumn-name">Send errors</td>
<td><input type="checkbox" id="errorsT" name="errorsT" /><label for="errorsT">Toggle</label></td> <td><input type="checkbox" id="errorsT" name="errorsT" class="toogle"/><label for="errorsT">Toggle</label></td>
</tr> </tr>
<tr> <tr>
<td class="comlumn-name">Send success</td> <td class="comlumn-name">Send success</td>
<td><input type="checkbox" id="successT" name="successT" /><label for="successT">Toggle</label></td> <td><input type="checkbox" id="successT" name="successT" class="toogle"/><label for="successT">Toggle</label></td>
</tr> </tr>
<tr> <tr>
<td class="comlumn-name">Success link</td> <td class="comlumn-name">Success link</td>

View File

@ -16,7 +16,7 @@
<input type="time" id="{{i}}" name="time{{i}}" value="{{data[i]['time']}}" required> <input type="time" id="{{i}}" name="time{{i}}" value="{{data[i]['time']}}" required>
</td> </td>
<td> <td>
<input type="checkbox" id="switch{{i}}" name="switch{{i}}" {{ "checked" if data[i]['enabled'] == True else "" }} /> <input type="checkbox" class="toogle" id="switch{{i}}" name="switch{{i}}" {{ "checked" if data[i]['enabled'] == True else "" }} />
<label for="switch{{i}}"> <label for="switch{{i}}">
Toggle Toggle
</label> </label>

View File

@ -7,47 +7,45 @@
{%if not current_user.is_authenticated %} {%if not current_user.is_authenticated %}
<button class="unselected" onclick="location.href = '/login';">login</button> <button class="unselected" onclick="location.href = '/login';">login</button>
{% else %} {% else %}
<script>data = JSON.parse('{{configs|tojson}}'); </script>
<form method="post" action="/config/"> <script>
<table>
<tr> function change_override(value, data) {
<td style="width: 10%;">config : </td> for (let i = 1; i < 6; i++) {
<td style="width: 40%;"> document.getElementById("compte_"+ i).innerHTML = data[parseInt(value)]['accounts'][i]["mail"];
<select onchange="change_config(this.value, data2, '{{len}}')" name="config"> }
<option id="config" value="{{len}}">New config</option> }
</script>
<form method="post" action="/override/" height="90%">
<select onchange="change_override(this.value, data)" name="config">
{% 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>
{% endfor %} {% endfor %}
</select> </select>
</td> <table height="90%" class="lines">
<td style="width: 10%;">name : </td>
<td>
<input type="text" id="name" name="name" value = "">
</td>
</tr>
<tr> <tr>
<td style="width: 10%;">Proxy : </td> <td width="30%">name</td>
<td style="width: 40%;"> <td width="14%">Unban</td>
<select id="proxy" name="proxy"> <td width="14%">tout</td>
<option id="" value="-1">No proxy</option> <td width="14%">pc</td>
{% for i in proxys %} <td width="14%">mobile</td>
<option id="{{proxys[i]['name']}}" value="{{i}}">{{proxys[i]['name']}}</option> <td width="14%">log points</td>
{% endfor %}
</select>
</td>
<td style="width: 10%;">Discord : </td>
<td>
<select id="discord" name="discord">
<option id="no discord" value="-1">No discord (not sure about the support)</option>
{% for i in discords %}
<option id="{{discords[i]['name']}}" value="{{i}}">{{discords[i]['name']}}</option>
{% endfor %}
</select>
</td>
</tr> </tr>
{% for i in range(1,6) %}
<tr heigh="15%">
<td id="compte_{{i}}"></td>
<td><input type="checkbox" id="compte_{{i}}" value="unban"></td>
<td><input type="checkbox" id="compte_{{i}}" value="tout"></td>
<td><input type="checkbox" id="compte_{{i}}" value="pc"></td>
<td><input type="checkbox" id="compte_{{i}}" value="mobile"></td>
<td><input type="checkbox" id="compte_{{i}}" value="log_points"></td>
</tr>
{% endfor %}
</table> </table>
<input type="submit" name="VNC" id="submit" value="Start" class="confirm" style="width:60%;"/>
</form>
{% endif %} {% endif %}
{%endblock %} {%endblock %}

View File

@ -1 +1 @@
v6.6.22 v6.6.23