Reorganize Woo Manager mobile header and store switcher placement.
Deploy Ladill Woo Manager / deploy (push) Successful in 1m7s

Desktop store switcher now sits after search; mobile shows route-based page titles, bottom nav, and store switching inside the profile sheet.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-07 02:45:14 +00:00
co-authored by Cursor
parent 26b1d5b433
commit 93bfc3e2d2
18 changed files with 165 additions and 20 deletions
@@ -122,6 +122,8 @@
</div>
@endif
@include('partials.store-switcher-menu', ['onNavigate' => 'profileOpen = false'])
@include('partials.user-profile-menu', [
'items' => $profileMenuItems,
'variant' => 'sheet',
@@ -0,0 +1,27 @@
@if(($wooActiveStores ?? collect())->count() > 0)
<div class="border-b border-slate-100 px-2 py-2">
<p class="px-2 py-1.5 text-xs font-semibold uppercase tracking-wide text-slate-400">Switch store</p>
@foreach($wooActiveStores as $store)
<form method="post" action="{{ route('woo.stores.switch') }}">
@csrf
<input type="hidden" name="store" value="{{ $store->id }}">
<button type="submit"
@if (! empty($onNavigate)) @click="{{ $onNavigate }}" @endif
class="flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-left text-sm font-medium transition hover:bg-slate-100 {{ $currentWooStore?->id === $store->id ? 'bg-indigo-50 text-indigo-700' : 'text-slate-700' }}">
<svg class="h-4 w-4 shrink-0 {{ $currentWooStore?->id === $store->id ? 'text-indigo-500' : 'text-slate-400' }}" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 21v-7.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75V21m-4.5 0H2.36m11.14 0H18m0 0h3.64m-1.39 0V9.349M3.75 21V9.349m0 0a3.001 3.001 0 0 0 3.75-.615A2.993 2.993 0 0 0 9.75 9.75c.896 0 1.7-.393 2.25-1.016a2.993 2.993 0 0 0 2.25 1.016c.896 0 1.7-.393 2.25-1.016a3.001 3.001 0 0 0 3.75.614m-16.5 0a3.004 3.004 0 0 1-.621-4.72L4.318 3.44A1.5 1.5 0 0 1 5.378 3h13.243a1.5 1.5 0 0 1 1.06.44l1.19 1.189a3 3 0 0 1-.621 4.72M6.75 18h3.75a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H6.75a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75Z" />
</svg>
<span class="min-w-0 flex-1 truncate">{{ $store->site_name ?? parse_url($store->site_url, PHP_URL_HOST) }}</span>
@if($currentWooStore?->id === $store->id)
<span class="shrink-0 text-xs font-medium text-indigo-600">Active</span>
@endif
</button>
</form>
@endforeach
<a href="{{ route('woo.stores.index') }}"
@if (! empty($onNavigate)) @click="{{ $onNavigate }}" @endif
class="mt-1 block rounded-xl px-3 py-2 text-xs font-medium text-indigo-600 hover:bg-indigo-50 hover:text-indigo-800">
Manage stores
</a>
</div>
@endif
@@ -1,5 +1,5 @@
@if(($wooActiveStores ?? collect())->count() > 0)
<div class="relative hidden lg:block" x-data="{ open: false }" @click.outside="open = false">
<div class="relative hidden shrink-0 lg:block" x-data="{ open: false }" @click.outside="open = false">
<button type="button" @click="open = !open"
class="flex max-w-[14rem] items-center gap-2 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-left text-sm text-slate-700 hover:bg-white">
<svg class="h-4 w-4 shrink-0 text-slate-400" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
+4 -2
View File
@@ -9,9 +9,9 @@
<svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
</button>
@include('partials.store-switcher')
@include('partials.mobile-topbar-title')
{{-- Desktop: search (customers) --}}
{{-- Desktop: search (orders) --}}
<form method="GET" action="{{ route('woo.orders.index') }}"
class="relative hidden w-full max-w-md lg:block"
x-data
@@ -22,6 +22,8 @@
class="w-full rounded-xl border border-slate-200 bg-slate-50 py-2 pl-9 pr-10 text-sm text-slate-700 placeholder-slate-400 transition focus:border-indigo-300 focus:bg-white focus:ring-2 focus:ring-indigo-100 focus:outline-none">
<kbd class="pointer-events-none absolute right-3 top-1/2 hidden -translate-y-1/2 rounded-md border border-slate-200 bg-white px-1.5 py-0.5 text-[10px] font-medium text-slate-400 sm:inline-block">/</kbd>
</form>
@include('partials.store-switcher')
</div>
<div class="flex items-center gap-3">