update
This commit is contained in:
@@ -49,7 +49,7 @@ def set_shutdown(time, now):
|
|||||||
|
|
||||||
def remove_shutdown():
|
def remove_shutdown():
|
||||||
print("[BS Shutdown] Removed shutdown")
|
print("[BS Shutdown] Removed shutdown")
|
||||||
# subprocess.run(["shutdown", "/s", "/t", (time - now), " "])
|
# subprocess.run(["shutdown", "/a"])
|
||||||
|
|
||||||
def update():
|
def update():
|
||||||
global LAST_VALUE
|
global LAST_VALUE
|
||||||
@@ -58,8 +58,8 @@ def update():
|
|||||||
|
|
||||||
if data is not None and data["noshutdown"] == 1:
|
if data is not None and data["noshutdown"] == 1:
|
||||||
if (LAST_VALUE != 0):
|
if (LAST_VALUE != 0):
|
||||||
|
remove_shutdown() # In case
|
||||||
LAST_VALUE = 0
|
LAST_VALUE = 0
|
||||||
remove_shutdown()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if data is None:
|
if data is None:
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
||||||
|
|
||||||
<div class="container py-4">
|
<div class="container py-4">
|
||||||
|
|
||||||
<div class="card bg-dark bg-opacity-75 p-3 mb-4">
|
<div class="card bg-dark bg-opacity-75 p-3 mb-4">
|
||||||
@@ -30,12 +32,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<button type="submit" class="btn btn-secondary">
|
<button type="submit" class="btn btn-primary">
|
||||||
Ajouter
|
<i class="bi bi-plus-lg"></i> Ajouter
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<form method="post" action="/submit-default" class="row g-2 align-items-center justify-content-start">
|
||||||
|
<select name="default-time" class="form-select bg-dark text-white" id="default-time-select">
|
||||||
|
{% for hour in range(0, 24) %}
|
||||||
|
<option value="{{ '%02d:00'|format(hour) }}">{{ '%02d:00'|format(hour) }}</option>
|
||||||
|
<option value="{{ '%02d:30'|format(hour) }}">{{ '%02d:30'|format(hour) }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">
|
||||||
|
<i class="bi bi-save"></i>Sauvegarder
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card bg-dark bg-opacity-75 p-3">
|
<div class="card bg-dark bg-opacity-75 p-3">
|
||||||
@@ -70,7 +85,9 @@
|
|||||||
<div class="col-2 text-end">
|
<div class="col-2 text-end">
|
||||||
<form method="post" action="/delete" class="m-0">
|
<form method="post" action="/delete" class="m-0">
|
||||||
<input type="hidden" name="item_name" value="{{ item.name }}">
|
<input type="hidden" name="item_name" value="{{ item.name }}">
|
||||||
<button type="submit" class="btn btn-sm btn-danger">×</button>
|
<button type="submit" class="btn btn-sm btn-danger">
|
||||||
|
<i class="bi bi-x-lg"></i>Supprimer
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user