Files
akkounts/app/components/rs_auth_component.html.erb
T
raucao 0b4bb21aa7
CI / Test (pull_request) Successful in 43s
Address review nits in the storage dashboard
- Move the app display name and a root-access helper onto
  RemoteStorageAuthorization, used by both components and the controller,
  removing the duplicated fallback chain and the unused OauthHelper includes
- Summarise the card's categories from the union of the app's authorizations'
  scopes, so an older token with broader access is not understated

Part of #254
2026-11-03 11:44:27 +04:00

29 lines
1.2 KiB
ERB

<div class="h-full" data-controller="modal" data-action="keydown.esc->modal#close">
<button type="button"
class="rs-auth-card group flex h-full w-full items-center gap-4 rounded-lg border
border-gray-200 bg-white p-5 text-left transition
hover:border-gray-400 hover:bg-gray-50
focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"
data-action="click->modal#open">
<div class="h-14 w-14 flex-none">
<%= render AppCatalog::WebAppIconComponent.new(web_app: @web_app) %>
</div>
<div class="min-w-0 flex-grow">
<h4 class="text-lg font-bold truncate"><%= @auth.display_name %></h4>
<p class="text-sm text-gray-500 truncate"><%= @auth.client_id %></p>
<p class="mt-2 text-sm text-gray-600">
<%= device_summary %>
<span class="mx-1 text-gray-300">·</span>
<%= category_summary %>
</p>
</div>
<span class="flex-none text-gray-300 transition group-hover:text-gray-500" aria-hidden="true">
<%= render partial: "icons/chevron-right", locals: { custom_class: "h-5 w-5" } %>
</span>
</button>
<%= render RsAuthDetailsModalComponent.new(authorizations: @authorizations) %>
</div>