mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 12:10:34 +09:00
Remove search provider dropdown when there's only a single provider
Resolves #1509
This commit is contained in:
@@ -185,7 +185,10 @@ $.when($.ready).then(() => {
|
||||
.on("input", "input[name=q]", function () {
|
||||
const search = this.value;
|
||||
const items = $("#sortable").find(".item-container");
|
||||
const provider = $("#search-container select[name=provider]").val();
|
||||
// Get provider from either select or hidden input
|
||||
const provider =
|
||||
$("#search-container select[name=provider]").val() ||
|
||||
$("#search-container input[name=provider]").val();
|
||||
|
||||
if (provider === "tiles") {
|
||||
hideAutocomplete();
|
||||
|
||||
@@ -926,6 +926,12 @@ div.create {
|
||||
max-width: 620px;
|
||||
position: relative;
|
||||
z-index: 4;
|
||||
|
||||
// Reduce width when there's no select dropdown (only has hidden input)
|
||||
&:has(input[name="provider"][type="hidden"]) {
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
form {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -944,6 +950,11 @@ div.create {
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
}
|
||||
// When there's no select dropdown, round the input's left corners
|
||||
input[name="q"]:first-child {
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
button {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
@@ -967,6 +978,11 @@ div.create {
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
// When select exists, remove input's left border radius
|
||||
select ~ input[name="q"] {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#search-autocomplete {
|
||||
|
||||
Reference in New Issue
Block a user