Fix search dropdown, async artist add, OOB swaps
- Fix search results dropdown: absolute position relative to search wrapper - Make release group fetching async via Vert.x executeBlocking (avoid blocking add) - Add OOB swap for artist list so +Add works from any page - Simplify search-results template styling - Add Response type for combined OOB responses
This commit is contained in:
@@ -7,12 +7,16 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/daisyui@4.12.23/dist/full.min.css" rel="stylesheet">
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"></script>
|
||||
<style>
|
||||
.search-dropdown {
|
||||
#search-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
#search-results {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 50;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
@@ -40,7 +44,7 @@
|
||||
</div>
|
||||
|
||||
<div class="navbar-center">
|
||||
<div class="relative">
|
||||
<div id="search-wrapper" class="w-48 md:w-64">
|
||||
<form hx-get="/api/artists/search"
|
||||
hx-target="#search-results"
|
||||
hx-swap="innerHTML"
|
||||
@@ -48,18 +52,18 @@
|
||||
<input id="search-input"
|
||||
type="text"
|
||||
placeholder="Search artists..."
|
||||
class="input input-bordered input-sm w-48 md:w-64"
|
||||
class="input input-bordered input-sm w-full"
|
||||
name="q"
|
||||
autocomplete="off">
|
||||
</form>
|
||||
<div id="search-results" class="search-dropdown"></div>
|
||||
<div id="search-results"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar-end gap-2">
|
||||
<select class="select select-bordered select-sm w-full max-w-[8rem]"
|
||||
onchange="setTheme(this)">
|
||||
<option value="dark">Dark</option>
|
||||
<option value="dark" selected>Dark</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="synthwave">Synthwave</option>
|
||||
<option value="retro">Retro</option>
|
||||
|
||||
Reference in New Issue
Block a user