闭社主体 forked from https://github.com/tootsuite/mastodon
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.

110 lines
4.5 KiB

  1. - content_for :page_title do
  2. = @account.acct
  3. %table.table
  4. %tbody
  5. %tr
  6. %th= t('admin.accounts.username')
  7. %td= @account.username
  8. %tr
  9. %th= t('admin.accounts.domain')
  10. %td= @account.domain
  11. %tr
  12. %th= t('admin.accounts.display_name')
  13. %td= @account.display_name
  14. - if @account.local?
  15. %tr
  16. %th= t('admin.accounts.email')
  17. %td= @account.user_email
  18. %tr
  19. %th= t('admin.accounts.most_recent_ip')
  20. %td= @account.user_current_sign_in_ip
  21. %tr
  22. %th= t('admin.accounts.most_recent_activity')
  23. %td
  24. - if @account.user_current_sign_in_at
  25. %time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) }
  26. = l @account.user_current_sign_in_at
  27. - else
  28. Never
  29. - else
  30. %tr
  31. %th= t('admin.accounts.profile_url')
  32. %td= link_to @account.url, @account.url
  33. %tr
  34. %th= t('admin.accounts.protocol')
  35. %td= @account.protocol.humanize
  36. - if @account.ostatus?
  37. %tr
  38. %th= t('admin.accounts.feed_url')
  39. %td= link_to @account.remote_url, @account.remote_url
  40. %tr
  41. %th= t('admin.accounts.push_subscription_expires')
  42. %td
  43. - if @account.subscribed?
  44. %time.formatted{ datetime: @account.subscription_expires_at.iso8601, title: l(@account.subscription_expires_at) }
  45. = l @account.subscription_expires_at
  46. - else
  47. = t('admin.accounts.not_subscribed')
  48. %tr
  49. %th= t('admin.accounts.salmon_url')
  50. %td= link_to @account.salmon_url, @account.salmon_url
  51. - elsif @account.activitypub?
  52. %tr
  53. %th= t('admin.accounts.inbox_url')
  54. %td= link_to @account.inbox_url, @account.inbox_url
  55. %tr
  56. %th= t('admin.accounts.outbox_url')
  57. %td= link_to @account.outbox_url, @account.outbox_url
  58. %tr
  59. %th= t('admin.accounts.follows')
  60. %td= @account.following_count
  61. %tr
  62. %th= t('admin.accounts.followers')
  63. %td= @account.followers_count
  64. %tr
  65. %th= t('admin.accounts.statuses')
  66. %td= link_to @account.statuses_count, admin_account_statuses_path(@account.id)
  67. %tr
  68. %th= t('admin.accounts.media_attachments')
  69. %td
  70. = link_to @account.media_attachments.count, admin_account_statuses_path(@account.id, { media: true })
  71. = surround '(', ')' do
  72. = number_to_human_size @account.media_attachments.sum('file_file_size')
  73. %tr
  74. %th= t('.created_reports')
  75. %td= link_to pluralize(@account.reports.count, t('.report')), admin_reports_path(account_id: @account.id)
  76. %tr
  77. %th= t('.targeted_reports')
  78. %td= link_to pluralize(@account.targeted_reports.count, t('.report')), admin_reports_path(target_account_id: @account.id)
  79. %div{ style: 'float: right' }
  80. - if @account.local?
  81. = link_to t('admin.accounts.reset_password'), admin_account_reset_path(@account.id), method: :create, class: 'button'
  82. - if @account.user&.otp_required_for_login?
  83. = link_to t('admin.accounts.disable_two_factor_authentication'), admin_user_two_factor_authentication_path(@account.user.id), method: :delete, class: 'button'
  84. - else
  85. - if @account.ostatus?
  86. = link_to @account.subscribed? ? t('admin.accounts.resubscribe') : t('admin.accounts.subscribe'), subscribe_admin_account_path(@account.id), method: :post, class: 'button'
  87. - if @account.subscribed?
  88. = link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative'
  89. = link_to t('admin.accounts.redownload'), redownload_admin_account_path(@account.id), method: :post, class: 'button'
  90. %div{ style: 'float: left' }
  91. - if @account.silenced?
  92. = link_to t('admin.accounts.undo_silenced'), admin_account_silence_path(@account.id), method: :delete, class: 'button'
  93. - else
  94. = link_to t('admin.accounts.silence'), admin_account_silence_path(@account.id), method: :post, class: 'button'
  95. - if @account.local?
  96. - unless @account.user_confirmed?
  97. = link_to t('admin.accounts.confirm'), admin_account_confirmation_path(@account.id), method: :post, class: 'button'
  98. - if @account.suspended?
  99. = link_to t('admin.accounts.undo_suspension'), admin_account_suspension_path(@account.id), method: :delete, class: 'button'
  100. - else
  101. = link_to t('admin.accounts.perform_full_suspension'), admin_account_suspension_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'