style(hosts,docker): Move search bar to its own row above filters
- Consistent with Kubernetes page layout - Search bar now takes full width on top row - Filter toggles on second row below search
This commit is contained in:
parent
fa5fde56e6
commit
ca8cd0e3b4
2 changed files with 400 additions and 406 deletions
|
|
@ -107,9 +107,9 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
|
||||
return (
|
||||
<Card class="docker-filter mb-3" padding="sm">
|
||||
<div class="flex flex-col lg:flex-row gap-3">
|
||||
<div class="flex gap-2 flex-1 items-center">
|
||||
<div class="relative flex-1">
|
||||
<div class="flex flex-col gap-3">
|
||||
{/* Search - full width on its own row */}
|
||||
<div class="relative">
|
||||
<input
|
||||
ref={(el) => {
|
||||
searchInputEl = el;
|
||||
|
|
@ -298,8 +298,8 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Filters - second row */}
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<Show when={props.statusFilter && props.setStatusFilter}>
|
||||
<div class="inline-flex rounded-lg bg-gray-100 p-0.5 dark:bg-gray-700">
|
||||
|
|
@ -307,8 +307,7 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
type="button"
|
||||
aria-pressed={props.statusFilter?.() === 'all'}
|
||||
onClick={() => props.setStatusFilter?.('all')}
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${
|
||||
props.statusFilter?.() === 'all'
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${props.statusFilter?.() === 'all'
|
||||
? 'bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-sm'
|
||||
: 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'
|
||||
}`}
|
||||
|
|
@ -322,8 +321,7 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
onClick={() =>
|
||||
props.setStatusFilter?.(props.statusFilter?.() === 'online' ? 'all' : 'online')
|
||||
}
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${
|
||||
props.statusFilter?.() === 'online'
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${props.statusFilter?.() === 'online'
|
||||
? 'bg-white dark:bg-gray-800 text-green-600 dark:text-green-400 shadow-sm'
|
||||
: 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'
|
||||
}`}
|
||||
|
|
@ -339,8 +337,7 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
props.statusFilter?.() === 'degraded' ? 'all' : 'degraded',
|
||||
)
|
||||
}
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${
|
||||
props.statusFilter?.() === 'degraded'
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${props.statusFilter?.() === 'degraded'
|
||||
? 'bg-white dark:bg-gray-800 text-amber-600 dark:text-amber-400 shadow-sm'
|
||||
: 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'
|
||||
}`}
|
||||
|
|
@ -356,8 +353,7 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
props.statusFilter?.() === 'offline' ? 'all' : 'offline',
|
||||
)
|
||||
}
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${
|
||||
props.statusFilter?.() === 'offline'
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${props.statusFilter?.() === 'offline'
|
||||
? 'bg-white dark:bg-gray-800 text-red-600 dark:text-red-400 shadow-sm'
|
||||
: 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'
|
||||
}`}
|
||||
|
|
@ -373,8 +369,7 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => props.setGroupingMode?.('grouped')}
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${
|
||||
props.groupingMode?.() === 'grouped'
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${props.groupingMode?.() === 'grouped'
|
||||
? 'bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-sm'
|
||||
: 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'
|
||||
}`}
|
||||
|
|
@ -384,8 +379,7 @@ export const DockerFilter: Component<DockerFilterProps> = (props) => {
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => props.setGroupingMode?.('flat')}
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${
|
||||
props.groupingMode?.() === 'flat'
|
||||
class={`px-2.5 py-1 text-xs font-medium rounded-md transition-all ${props.groupingMode?.() === 'flat'
|
||||
? 'bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-sm'
|
||||
: 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100'
|
||||
}`}
|
||||
|
|
|
|||
|
|
@ -109,9 +109,9 @@ export const HostsFilter: Component<HostsFilterProps> = (props) => {
|
|||
|
||||
return (
|
||||
<Card class="hosts-filter mb-3" padding="sm">
|
||||
<div class="flex flex-col lg:flex-row gap-3">
|
||||
<div class="flex gap-2 flex-1 items-center">
|
||||
<div class="relative flex-1">
|
||||
<div class="flex flex-col gap-3">
|
||||
{/* Search - full width on its own row */}
|
||||
<div class="relative">
|
||||
<input
|
||||
ref={(el) => {
|
||||
searchInputEl = el;
|
||||
|
|
@ -300,8 +300,8 @@ export const HostsFilter: Component<HostsFilterProps> = (props) => {
|
|||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Filters - second row */}
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<div class="inline-flex rounded-lg bg-gray-100 p-0.5 dark:bg-gray-700">
|
||||
<button
|
||||
|
|
|
|||
Loading…
Reference in a new issue