Deploy Ladill Transfer / deploy (push) Successful in 30s
Wallet balance peek rendered as a menu row directly under Billing, backed by a /wallet/balance endpoint (BillingClient) and guarded by Route::has. Also opens Afia via a direct window event for reliability. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
1.7 KiB
PHP
24 lines
1.7 KiB
PHP
{{-- Wallet balance peek (links to the account wallet on account.ladill.com). --}}
|
|
@php
|
|
$balanceRoute = (string) config('billing.wallet_balance_route', 'wallet.balance');
|
|
$balanceUrl = \Illuminate\Support\Facades\Route::has($balanceRoute) ? route($balanceRoute) : null;
|
|
@endphp
|
|
@if ($balanceUrl)
|
|
<a href="{{ ladill_account_url('/wallet') }}"
|
|
x-data="walletWidget({ url: {{ \Illuminate\Support\Js::from($balanceUrl) }} })" x-init="load()"
|
|
class="mx-1 flex items-center justify-between gap-3 rounded-xl border border-slate-100 bg-gradient-to-r from-indigo-50 to-slate-50 px-3 py-2.5 transition hover:border-indigo-200 hover:from-indigo-100/70">
|
|
<span class="flex items-center gap-2.5 min-w-0">
|
|
<span class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-indigo-100 text-indigo-600">
|
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="1.6" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M21 12a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 1 3 7.5m18 4.5v3.75A2.25 2.25 0 0 1 18.75 18H5.25A2.25 2.25 0 0 1 3 15.75V7.5m18 4.5h-3.75a1.5 1.5 0 0 0 0 3H21M3 7.5A2.25 2.25 0 0 1 5.25 5.25h11.25A2.25 2.25 0 0 1 18.75 7.5"/>
|
|
</svg>
|
|
</span>
|
|
<span class="min-w-0">
|
|
<span class="block text-[11px] font-medium text-slate-500">Wallet balance</span>
|
|
<span class="block truncate text-sm font-semibold text-slate-900" x-text="display"></span>
|
|
</span>
|
|
</span>
|
|
<svg class="h-4 w-4 shrink-0 text-slate-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m9 5 7 7-7 7"/></svg>
|
|
</a>
|
|
@endif
|