added styling on theme selector

This commit is contained in:
2023-05-09 23:28:45 +02:00
parent 77a853e980
commit 4350ab9bd9
4 changed files with 32 additions and 6 deletions

View File

@@ -27,9 +27,13 @@ let adBlock: HTMLInputElement,
function getThemeFiles() {
const selectElement = document.getElementById("themesList") as HTMLSelectElement;
const fileNames = fs.readdirSync(process.resourcesPath).filter((file) => file.endsWith(".css"));
const fileNames = fs
.readdirSync(process.resourcesPath)
.filter((file) => file.endsWith(".css"))
.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
const options = fileNames.map((name) => {
return new Option(name, name);
return new Option(name.replace(".css", ""), name);
});
// empty old options

View File

@@ -291,7 +291,7 @@
<p>
Select a theme below or "Tidal - Default" to return to the original Tidal look.
</p>
<select id="themesList" name="themesList">
<select class="select-input" id="themesList" name="themesList">
</select>
</div>

View File

@@ -230,8 +230,6 @@ html {
border-color: $tidal-blue;
color: $white;
}
// --- Switch slider component ---
}
}
}
@@ -415,3 +413,26 @@ html {
outline: none;
}
}
.select-input {
display: block;
width: 100%;
margin-bottom: 10px;
padding: 5px 0;
transition: 0.2s;
border: 0;
border-bottom: solid 1px $grey-333;
outline: none;
background: transparent;
color: $tidal-grey;
font-size: 14px;
&:focus {
border-color: $tidal-blue;
color: $white;
}
option {
background-color: $tidal-grey-darkest;
}
}