Skip to content

Commit

Permalink
Aggiornamenti Pagina setting
Browse files Browse the repository at this point in the history
- Aggiunto un Alert() per indicare che le modifiche saranno effettiva al prossimo riavvio
- Aggiunto uno slider per il periodo di tempo tra una scansione e l'altra.
  • Loading branch information
MainKronos committed Feb 18, 2021
1 parent f8c22af commit 308d91e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
6 changes: 4 additions & 2 deletions config/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def append_anime():
appendAnime(data)
return redirect(url_for('index'))

@app.route('/delete_anime', methods=['POST']) # Per aggiungere un anime
@app.route('/delete_anime', methods=['POST']) # Per cancellare un anime
def delete_anime():
res = request.form
# print(res, flush=True)
Expand All @@ -51,6 +51,7 @@ def settings_update():
"LogLevel": request.form.get("LogLevel"),
"RenameEp": False if request.form.get("RenameEp") is None or request.form.get("MoveEp") is None else True,
"MoveEp": False if request.form.get("MoveEp") is None else True,
"ScanDalay": int(request.form.get("ScanDalay"))
}

WriteSettings(settings)
Expand Down Expand Up @@ -138,7 +139,8 @@ def ReadSettings():
data = {
"LogLevel":"DEBUG",
"RenameEp":True,
"MoveEp":True
"MoveEp":True,
"ScanDalay": 30
}

json_location = "json/settings.json"
Expand Down
26 changes: 26 additions & 0 deletions config/app/static/css/my.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,30 @@ input{

.switch label .lever:before{
background-color: rgba(159, 168, 218, 0.2) !important;
}

input[type=range]{
border: 1px solid rgba(0,0,0,0.1) !important;
position: relative;
background-color: transparent;
border: none;
outline: none;
width: 100%;
margin: 15px 0;
padding: 0;
}

input[type=range]::-webkit-slider-thumb {
background-color: #8f97c4;
}
input[type=range]::-moz-range-thumb {
background-color: #8f97c4;
}
input[type=range]::-ms-thumb {
background-color: #8f97c4;
}

/***** These are to edit the thumb and the text inside the thumb *****/
input[type=range] + .thumb {
background-color: #9FA8DA !important;
}
14 changes: 12 additions & 2 deletions config/app/templates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,21 @@
</div>
</div>
</div>
<div class="col s12 m6 l4">
<div class="card dark">
<div class="card-content">
<span class="card-title">Intervallo Scan</span>
<p class="range-field">
<input type="range" id="ScanDalay" name='ScanDalay' min="30" max="1440" value='{{ settings.ScanDalay }}' />
</p>
</div>
</div>
</div>
</div>
</div>
<div class="card-action">
<button class="btn waves-effect waves-light dark" type="submit">Save
<i class="material-icons right">save</i>
<button class="btn waves-effect waves-light dark" type="submit" onclick="return alert('Le modifiche saranno effettive al prossimo riavvio.')">Save
<i class="material-icons right">save</i>
</button>
</div>
</form>
Expand Down

0 comments on commit 308d91e

Please sign in to comment.