ajout commande protondb

This commit is contained in:
Kepka Ludovic
2025-08-15 15:55:07 +02:00
committed by skylanix
parent b614e3238f
commit 488c49e42e
4 changed files with 76 additions and 39 deletions

View File

@@ -20,5 +20,7 @@ def updateConfiguration():
# Je fait ca car html n'envoi pas le parametre de checkbox quand il est décoché
if (request.form.get("humble_bundle_channel") != None and request.form.get("humble_bundle_enable") == None) :
ConfigurationHelper().createOrUpdate('humble_bundle_enable', False)
if (request.form.get("proton_db_api_id") != None and request.form.get("proton_db_enable_enable") == None) :
ConfigurationHelper().createOrUpdate('proton_db_enable_enable', False)
db.session.commit()
return redirect(url_for('openConfigurations'))

View File

@@ -20,6 +20,19 @@
<input type="Submit" value="Définir">
</form>
<h2>Proton DB</h2>
<form action="{{ url_for('updateConfiguration') }}" method="POST">
<label for="proton_db_enable_enable">Activer</label>
<input type="checkbox" name="proton_db_enable_enable" {% if configuration.getValue('proton_db_enable_enable') %}
checked="checked" {% endif %}>
<label>Activer la commande Proton DB</label>
<label for="proton_db_api_id">Api ID</label>
<input name="proton_db_api_id" type="text" value="{{ configuration.getValue('proton_db_api_id') }}" />
<label for="proton_db_api_key">Api KEY</label>
<input name="proton_db_api_key" type="text" value="{{ configuration.getValue('proton_db_api_key') }}" />
<input type="Submit" value="Définir">
</form>
<h2>Api</h2>
<form action="{{ url_for('updateConfiguration') }}" method="POST">
<label for="discord_token">Api Discord (cachée)</label>