@layouts.dash.app({ title: 'DEVICE' })
@card({ class: 'p-5 md:aspect-[5/3] flex justify-center items-center w-full h-full mb-5', })
@button({ type: 'button', class: 'w-full motion-preset-fade', 'data-button': 'pairing-code', style: 'display: none', onclick: 'deviceStart({ usePairingCode: true })', }) Start with Pairing Code @end @button({ type: 'button', class: 'w-full motion-preset-fade', 'data-button': 'qr-code', style: 'display: none', onclick: 'deviceStart({ usePairingCode: false })', }) Start with QR Code @end @button({ type: 'button', class: 'motion-preset-fade', 'data-button': 'start-session', style: 'display: none', onclick: 'deviceStart({ usePairingCode: false })', }) Start Device @end @button({ type: 'button', class: 'motion-preset-pop motion-duration-200', 'data-button': 'copy-code', onclick: 'copyCode()', style: 'display: none', }) Copy Code @end @button({ type: 'button', class: 'motion-preset-pop motion-duration-200', 'data-button': 'force-logout', style: 'display: none', onclick: 'deviceLogout()', }) Force Logout @end @button({ type: 'button', class: 'motion-preset-pop motion-duration-200', 'data-button': 'logout', style: 'display: none', onclick: 'deviceLogout()', }) Log Out @end @button({ type: 'button', class: 'motion-preset-pop motion-duration-200', 'data-button': 'stop-session', style: 'display: none', onclick: 'deviceStop()', }) Stop Session @end
@end
@card({ class: 'p-5 mb-5' })
Device Name: {{ device.name }}
Phone Number: {{ device.number }}
Registered On: {{ device.createdAt.toRelative() }}
@button({ type: 'button', class: 'w-full', 'x-data': '{}', 'x-dialog:toggle': 'token-modal', }) Token @end @button({ type: 'button', class: 'w-full', 'x-data': '{}', 'x-dialog:toggle': 'webhook-modal', }) Webhook @end
@button({ type: 'button', variant: 'destructive', class: 'w-full', onclick: 'deviceRemove()', }) Remove Device @end
@end
@card({ class: 'p-5' })
Log
@end
@dialog({ id: 'webhook-modal', class: '!max-w-md' }) @dialog.body({ class: 'p-5' }) @form({ id: 'update-webhook-form', action: route('device.updateWebhook', [ device.id ]), method: 'POST', class: 'space-y-5' }) {{ (typeof csrfField === 'function') ? csrfField() : '' }}
@!label({ for: 'webhook', label: 'Webhook URL' }) @!input({ id: 'webhook', type: 'text', name: 'webhook', value: device.webhook, class: 'w-full' })
@button({ type: 'submit', class: 'w-full', }) Save Changes @end @end @end @end @dialog({ id: 'token-modal', class: '!max-w-md' }) @dialog.body({ class: 'p-5' })
{{ token }}
@button({ type: 'button', class: 'w-full', onclick: 'resetToken(this)', }) Reset Token @end @end @end @end @pushTo('body') @end