You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
2.0 KiB

  1. - content_for :page_title do
  2. = t('doorkeeper.authorized_applications.index.title')
  3. %p= t('doorkeeper.authorized_applications.index.description_html')
  4. %hr.spacer/
  5. .applications-list
  6. - @applications.each do |application|
  7. .applications-list__item
  8. - if application.website.present?
  9. = link_to application.name, application.website, target: '_blank', rel: 'noopener noreferrer', class: 'announcements-list__item__title'
  10. - else
  11. %strong.announcements-list__item__title
  12. = application.name
  13. - if application.superapp?
  14. %span.account-role.moderator= t('doorkeeper.authorized_applications.index.superapp')
  15. .announcements-list__item__action-bar
  16. .announcements-list__item__meta
  17. - if application.most_recently_used_access_token
  18. = t('doorkeeper.authorized_applications.index.last_used_at', date: l(application.most_recently_used_access_token.last_used_at.to_date))
  19. - else
  20. = t('doorkeeper.authorized_applications.index.never_used')
  21. = t('doorkeeper.authorized_applications.index.authorized_at', date: l(application.created_at.to_date))
  22. - unless application.superapp? || current_account.suspended?
  23. %div
  24. = table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') }
  25. .announcements-list__item__permissions
  26. %ul.permissions-list
  27. - grouped_scopes(application.scopes).each do |scope|
  28. %li.permissions-list__item
  29. .permissions-list__item__icon
  30. = fa_icon('check')
  31. .permissions-list__item__text
  32. .permissions-list__item__text__title
  33. = t(scope.key, scope: [:doorkeeper, :grouped_scopes, :title])
  34. .permissions-list__item__text__type
  35. = t(scope.access, scope: [:doorkeeper, :grouped_scopes, :access])