CI / Test (pull_request) Successful in 41s
- Rework RsAuthComponent into a card that shows the app, its device, an access summary and the permission status - Add RsAuthDetailsModalComponent with the full scope list, device, connected date and permission expiry, plus Launch and Revoke actions (built on the existing ModalComponent) - Add RemoteStorageAuthorization#device_name (parsed from the user agent) and #expired? - Sort connected apps by name Part of #254
36 lines
1.2 KiB
ERB
36 lines
1.2 KiB
ERB
<div class="flex flex-col h-full rounded border border-gray-200 p-4"
|
|
data-controller="modal" data-action="keydown.esc->modal#close">
|
|
<div class="flex items-center gap-4">
|
|
<div class="h-16 w-16 flex-none">
|
|
<%= render AppCatalog::WebAppIconComponent.new(web_app: @web_app) %>
|
|
</div>
|
|
<div class="flex-grow min-w-0">
|
|
<h4 class="mb-1 text-lg font-bold truncate"><%= name %></h4>
|
|
<p class="text-sm text-gray-500 truncate"><%= @auth.client_id %></p>
|
|
</div>
|
|
</div>
|
|
|
|
<dl class="mt-4 flex-grow space-y-1 text-sm text-gray-600">
|
|
<div class="flex justify-between gap-2">
|
|
<dt>Access</dt>
|
|
<dd class="text-right"><%= scope_summary %></dd>
|
|
</div>
|
|
<div class="flex justify-between gap-2">
|
|
<dt>Device</dt>
|
|
<dd class="text-right"><%= device_name %></dd>
|
|
</div>
|
|
<div class="flex justify-between gap-2">
|
|
<dt>Status</dt>
|
|
<dd class="text-right <%= "text-red-700" if @auth.expired? %>"><%= expiry_label %></dd>
|
|
</div>
|
|
</dl>
|
|
|
|
<div class="mt-4">
|
|
<button class="btn-md btn-outline w-full" data-action="click->modal#open">
|
|
Details
|
|
</button>
|
|
</div>
|
|
|
|
<%= render RsAuthDetailsModalComponent.new(auth: @auth) %>
|
|
</div>
|