Files
ladill-woo-manager/resources/views/partials/store-switcher-menu.blade.php
T
isaaccladandCursor 93bfc3e2d2
Deploy Ladill Woo Manager / deploy (push) Successful in 1m7s
Reorganize Woo Manager mobile header and store switcher placement.
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>
2026-07-07 02:45:14 +00:00

28 lines
2.3 KiB
PHP

@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