Unify SSO and surface legacy ResellerClub hosting orders on the dashboard.
Deploy Ladill Hosting / deploy (push) Successful in 26s
Deploy Ladill Hosting / deploy (push) Successful in 26s
Add silent OAuth and session keepalive, and show imported RC orders alongside native hosting accounts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -60,6 +60,48 @@
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
@foreach ($legacyOrders ?? [] as $order)
|
||||
<a href="{{ route('hosting.legacy.show', $order) }}"
|
||||
class="group block rounded-xl border border-slate-200 bg-white p-5 hover:border-indigo-300 hover:shadow-md transition-all duration-200">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="flex h-12 w-12 items-center justify-center rounded-xl bg-amber-100">
|
||||
<svg class="h-6 w-6 text-amber-700" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="font-semibold text-slate-900 group-hover:text-indigo-600 transition">
|
||||
{{ $order->domain_name ?: 'Legacy hosting' }}
|
||||
</h3>
|
||||
<div class="flex items-center gap-3 mt-1">
|
||||
<span class="text-sm text-slate-500">{{ $order->cpanel_username ?: 'Legacy account' }}</span>
|
||||
<span class="text-sm text-slate-400">·</span>
|
||||
<span class="text-sm text-slate-500">{{ $order->plan_name ?? 'Legacy hosting' }}</span>
|
||||
<span class="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium
|
||||
@if($order->status === 'active') bg-emerald-100 text-emerald-700
|
||||
@elseif($order->status === 'suspended') bg-red-100 text-red-700
|
||||
@else bg-slate-100 text-slate-700 @endif">
|
||||
{{ ucfirst($order->status) }}
|
||||
</span>
|
||||
<span class="inline-flex items-center rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-800">Legacy</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="text-right hidden sm:block">
|
||||
@if($order->expires_at)
|
||||
<p class="text-xs text-slate-400">Expires {{ $order->expires_at->format('M j, Y') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<svg class="h-5 w-5 text-slate-400 group-hover:text-indigo-600 group-hover:translate-x-1 transition-all" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="mt-8 rounded-xl border border-dashed border-slate-300 bg-slate-50 p-6 text-center">
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
<div class="mt-6 rounded-2xl border border-slate-200 bg-white">
|
||||
<div class="flex items-center justify-between border-b border-slate-100 px-5 py-3.5">
|
||||
<h2 class="text-sm font-semibold text-slate-900">Hosting accounts</h2>
|
||||
@if ($accounts->count() > 5)
|
||||
@if ($accounts->count() + ($recentLegacyOrders ?? collect())->count() > 5)
|
||||
<a href="{{ route('hosting.accounts.index') }}" class="text-xs font-medium text-indigo-600 hover:underline">View all</a>
|
||||
@endif
|
||||
</div>
|
||||
@if ($recent->isEmpty())
|
||||
@if ($recent->isEmpty() && ($recentLegacyOrders ?? collect())->isEmpty())
|
||||
<div class="px-5 py-12 text-center">
|
||||
<p class="text-sm font-semibold text-slate-700">No hosting accounts yet</p>
|
||||
<p class="mx-auto mt-1 max-w-sm text-xs text-slate-400">Choose a plan to get started — single domain, multi domain, or WordPress hosting.</p>
|
||||
@@ -75,6 +75,27 @@
|
||||
])>{{ $account->status }}</span>
|
||||
</a>
|
||||
@endforeach
|
||||
@foreach ($recentLegacyOrders ?? [] as $order)
|
||||
<a href="{{ route('hosting.legacy.show', $order) }}" class="flex items-center justify-between px-5 py-3.5 transition hover:bg-slate-50">
|
||||
<div class="min-w-0">
|
||||
<p class="truncate text-sm font-medium text-slate-900">{{ $order->domain_name ?: 'Legacy hosting' }}</p>
|
||||
<p class="mt-0.5 text-xs text-slate-400">
|
||||
{{ $order->cpanel_username ?: 'Legacy account' }}
|
||||
· {{ $order->plan_name ?? 'Legacy hosting' }}
|
||||
· Legacy
|
||||
@if ($order->expires_at)
|
||||
· Expires {{ $order->expires_at->format('d M Y') }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<span @class([
|
||||
'shrink-0 rounded-full px-2.5 py-1 text-[11px] font-medium capitalize',
|
||||
'bg-emerald-50 text-emerald-700' => $order->status === 'active',
|
||||
'bg-red-50 text-red-700' => $order->status === 'suspended',
|
||||
'bg-slate-100 text-slate-600' => ! in_array($order->status, ['active', 'suspended'], true),
|
||||
])>{{ $order->status }}</span>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -56,5 +56,6 @@
|
||||
])
|
||||
@include('partials.afia')
|
||||
@endauth
|
||||
@include('partials.sso-keepalive')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -55,5 +55,6 @@
|
||||
])
|
||||
@include('partials.afia')
|
||||
@endauth
|
||||
@include('partials.sso-keepalive')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@if (auth()->check())
|
||||
{{-- Same-site iframe keeps the shared auth.ladill.com session warm while using this app. --}}
|
||||
<iframe src="https://{{ config('app.auth_domain') }}/sso/ping" hidden width="0" height="0" title=""></iframe>
|
||||
@endif
|
||||
Reference in New Issue
Block a user