save stylesheet

This commit is contained in:
Adrien MALINGREY 2023-04-25 16:51:09 +02:00
parent 4587f5a147
commit 6520a25cb9
2 changed files with 4 additions and 1 deletions

3
app.js
View File

@ -401,6 +401,8 @@ class Settings {
for (let input of this.form.getElementsByTagName("input")) {
if (localStorage[input.name]) input.value = localStorage[input.name]
}
if (localStorage["stylesheet"]) stylesheetSelect.value = localStorage["stylesheet"]
document.selectedStyleSheetSet=stylesheetSelect.value
}
@ -408,6 +410,7 @@ class Settings {
for (let input of this.form.getElementsByTagName("input")) {
localStorage[input.name] = input.value
}
localStorage["stylesheet"] = stylesheetSelect.value
}
init() {

View File

@ -100,7 +100,7 @@
<legend class="text-start">Feuille de style</legend>
<label for="stylesheetSelect" class="col-sm-2 col-form-label text-center">Style</label>
<div class="col-sm-4">
<select id="stylesheetSelect" class="form-select" onclick="document.selectedStyleSheetSet=this.value">
<select name="stylesheet" id="stylesheetSelect" class="form-select" onclick="document.selectedStyleSheetSet=this.value">
<option selected>Classique</option>
<option>Électro</option>
<option>Pop</option>