Unify Frontdesk secondary actions with shared button variants.
Deploy Ladill Frontdesk / deploy (push) Successful in 55s
Deploy Ladill Frontdesk / deploy (push) Successful in 55s
Add warning, danger, and link button styles plus x-btn and x-danger-zone components so ghost text actions match the primary pill UI across edit screens and tables. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -40,7 +40,14 @@
|
||||
<p class="text-xs font-medium uppercase text-slate-500">Device token</p>
|
||||
<code class="mt-1 block break-all text-xs text-slate-700">{{ $device->device_token }}</code>
|
||||
@if ($device->type === 'kiosk')
|
||||
<a href="{{ route('frontdesk.kiosk.device', $device->device_token) }}" target="_blank" class="mt-2 inline-block text-sm text-indigo-700 hover:underline">Open kiosk URL</a>
|
||||
<x-btn
|
||||
:href="route('frontdesk.kiosk.device', $device->device_token)"
|
||||
target="_blank"
|
||||
variant="link"
|
||||
size="sm"
|
||||
plain
|
||||
class="mt-2"
|
||||
>Open kiosk URL</x-btn>
|
||||
@if (! empty($kioskQrSvg))
|
||||
<div class="mt-4 rounded-xl border border-slate-200 bg-white p-4 text-center">
|
||||
<p class="text-sm font-medium text-slate-900">Provision Ladill Kiosk app</p>
|
||||
@@ -53,21 +60,33 @@
|
||||
@endif
|
||||
|
||||
<div class="flex gap-3 pt-2">
|
||||
<a href="{{ route('frontdesk.devices.index') }}" class="flex-1 rounded-lg border border-slate-200 py-2 text-center text-sm">Back</a>
|
||||
<button type="submit" class="btn-primary flex-1">Save</button>
|
||||
<x-btn href="{{ route('frontdesk.devices.index') }}" variant="secondary" class="flex-1 justify-center">Back</x-btn>
|
||||
<x-btn type="submit" class="flex-1">Save</x-btn>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@if ($device->device_token)
|
||||
<form method="POST" action="{{ route('frontdesk.devices.regenerate-token', $device) }}" class="mt-3">
|
||||
@csrf
|
||||
<button type="submit" class="text-sm text-amber-700 hover:underline" onclick="return confirm('Regenerate token? Existing kiosk sessions will stop working.')">Regenerate token</button>
|
||||
<x-danger-zone title="Device actions" class="mt-4">
|
||||
<form method="POST" action="{{ route('frontdesk.devices.regenerate-token', $device) }}" class="inline">
|
||||
@csrf
|
||||
<x-btn
|
||||
type="submit"
|
||||
variant="warning"
|
||||
onclick="return confirm('Regenerate token? Existing kiosk sessions will stop working.')"
|
||||
>Regenerate token</x-btn>
|
||||
</form>
|
||||
<form method="POST" action="{{ route('frontdesk.devices.destroy', $device) }}" class="inline" onsubmit="return confirm('Remove this device?')">
|
||||
@csrf @method('DELETE')
|
||||
<x-btn type="submit" variant="danger">Remove device</x-btn>
|
||||
</form>
|
||||
</x-danger-zone>
|
||||
@else
|
||||
<form method="POST" action="{{ route('frontdesk.devices.destroy', $device) }}" class="mt-4" onsubmit="return confirm('Remove this device?')">
|
||||
@csrf @method('DELETE')
|
||||
<x-danger-zone title="Device actions">
|
||||
<x-btn type="submit" variant="danger">Remove device</x-btn>
|
||||
</x-danger-zone>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('frontdesk.devices.destroy', $device) }}" class="mt-4" onsubmit="return confirm('Remove this device?')">
|
||||
@csrf @method('DELETE')
|
||||
<button type="submit" class="text-sm text-red-600 hover:underline">Remove device</button>
|
||||
</form>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user