Improve soundbox ops dashboard and registry editing
This commit is contained in:
@ -165,7 +165,7 @@
|
||||
<div class="flex items-center gap-6 flex-1">
|
||||
<div class="relative w-full max-w-md">
|
||||
<span class="material-symbols-outlined absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 text-lg">search</span>
|
||||
<input class="w-full bg-slate-50 border-none rounded-xl pl-10 pr-4 py-2 text-body-md focus:ring-2 focus:ring-primary/20 transition-all" placeholder="Search transactions, devices..." type="text"/>
|
||||
<input id="merchant-dashboard-search" class="w-full bg-slate-50 border-none rounded-xl pl-10 pr-4 py-2 text-body-md focus:ring-2 focus:ring-primary/20 transition-all" placeholder="Search transactions, devices..." type="text"/>
|
||||
</div>
|
||||
<div class="hidden md:flex items-center gap-8">
|
||||
<a class="text-primary border-b-2 border-primary font-bold py-6 text-body-md" href="#">Dashboard</a>
|
||||
@ -463,7 +463,7 @@
|
||||
});
|
||||
|
||||
// Search Bar Focus Effect
|
||||
const searchInput = document.querySelector('input[type="text"]');
|
||||
const searchInput = document.getElementById('merchant-dashboard-search');
|
||||
if (searchInput) {
|
||||
searchInput.addEventListener('focus', () => {
|
||||
searchInput.parentElement.classList.add('ring-2', 'ring-primary/20');
|
||||
@ -471,6 +471,15 @@
|
||||
searchInput.addEventListener('blur', () => {
|
||||
searchInput.parentElement.classList.remove('ring-2', 'ring-primary/20');
|
||||
});
|
||||
searchInput.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'Escape' && searchInput.value) {
|
||||
searchInput.value = '';
|
||||
return;
|
||||
}
|
||||
if (event.key === 'Enter' && searchInput.value.trim()) {
|
||||
window.location.href = `/ui/merchant-settlement-history?q=${encodeURIComponent(searchInput.value.trim())}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<!-- ui-nav -->
|
||||
@ -482,4 +491,4 @@
|
||||
<a href="/ui/admin-dashboard-overview" style="margin-right:0;color:#2563eb;text-decoration:none;font-weight:600">Dashboard</a>
|
||||
</div>
|
||||
'
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
||||
Reference in New Issue
Block a user