The code powering m.abunchtell.com https://m.abunchtell.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

154 rader
5.7 KiB

  1. - content_for :page_title do
  2. = @account.acct
  3. .table-wrapper
  4. %table.table
  5. %tbody
  6. %tr
  7. %th= t('admin.accounts.username')
  8. %td= @account.username
  9. %tr
  10. %th= t('admin.accounts.domain')
  11. %td= @account.domain
  12. %tr
  13. %th= t('admin.accounts.display_name')
  14. %td= @account.display_name
  15. - if @account.local?
  16. %tr
  17. %th= t('admin.accounts.email')
  18. %td= @account.user_email
  19. %tr
  20. %th= t('admin.accounts.most_recent_ip')
  21. %td= @account.user_current_sign_in_ip
  22. %tr
  23. %th= t('admin.accounts.most_recent_activity')
  24. %td
  25. - if @account.user_current_sign_in_at
  26. %time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) }
  27. = l @account.user_current_sign_in_at
  28. - else
  29. Never
  30. - else
  31. %tr
  32. %th= t('admin.accounts.profile_url')
  33. %td= link_to @account.url, @account.url
  34. %tr
  35. %th= t('admin.accounts.protocol')
  36. %td= @account.protocol.humanize
  37. %tr
  38. %th= t('admin.accounts.follows')
  39. %td= @account.following_count
  40. %tr
  41. %th= t('admin.accounts.followers')
  42. %td= @account.followers_count
  43. %tr
  44. %th= t('admin.accounts.statuses')
  45. %td= link_to @account.statuses_count, admin_account_statuses_path(@account.id)
  46. %tr
  47. %th= t('admin.accounts.media_attachments')
  48. %td
  49. = link_to @account.media_attachments.count, admin_account_statuses_path(@account.id, { media: true })
  50. = surround '(', ')' do
  51. = number_to_human_size @account.media_attachments.sum('file_file_size')
  52. %tr
  53. %th= t('.created_reports')
  54. %td= link_to pluralize(@account.reports.count, t('.report')), admin_reports_path(account_id: @account.id)
  55. %tr
  56. %th= t('.targeted_reports')
  57. %td= link_to pluralize(@account.targeted_reports.count, t('.report')), admin_reports_path(target_account_id: @account.id)
  58. %div{ style: 'overflow: hidden' }
  59. %div{ style: 'float: right' }
  60. - if @account.local?
  61. = link_to t('admin.accounts.reset_password'), admin_account_reset_path(@account.id), method: :create, class: 'button'
  62. - if @account.user&.otp_required_for_login?
  63. = link_to t('admin.accounts.disable_two_factor_authentication'), admin_user_two_factor_authentication_path(@account.user.id), method: :delete, class: 'button'
  64. - else
  65. = link_to t('admin.accounts.redownload'), redownload_admin_account_path(@account.id), method: :post, class: 'button'
  66. %div{ style: 'float: left' }
  67. - if @account.silenced?
  68. = link_to t('admin.accounts.undo_silenced'), admin_account_silence_path(@account.id), method: :delete, class: 'button'
  69. - else
  70. = link_to t('admin.accounts.silence'), admin_account_silence_path(@account.id), method: :post, class: 'button'
  71. - if @account.local?
  72. - unless @account.user_confirmed?
  73. = link_to t('admin.accounts.confirm'), admin_account_confirmation_path(@account.id), method: :post, class: 'button'
  74. - if @account.suspended?
  75. = link_to t('admin.accounts.undo_suspension'), admin_account_suspension_path(@account.id), method: :delete, class: 'button'
  76. - else
  77. = 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'
  78. - unless @account.local?
  79. %hr
  80. %h3 OStatus
  81. .table-wrapper
  82. %table.table
  83. %tbody
  84. %tr
  85. %th= t('admin.accounts.feed_url')
  86. %td= link_to @account.remote_url, @account.remote_url
  87. %tr
  88. %th= t('admin.accounts.push_subscription_expires')
  89. %td
  90. - if @account.subscribed?
  91. %time.formatted{ datetime: @account.subscription_expires_at.iso8601, title: l(@account.subscription_expires_at) }
  92. = l @account.subscription_expires_at
  93. - else
  94. = t('admin.accounts.not_subscribed')
  95. %tr
  96. %th= t('admin.accounts.salmon_url')
  97. %td= link_to @account.salmon_url, @account.salmon_url
  98. %div{ style: 'overflow: hidden' }
  99. %div{ style: 'float: right' }
  100. = link_to @account.subscribed? ? t('admin.accounts.resubscribe') : t('admin.accounts.subscribe'), subscribe_admin_account_path(@account.id), method: :post, class: 'button'
  101. - if @account.subscribed?
  102. = link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative'
  103. %hr
  104. %h3 ActivityPub
  105. .table-wrapper
  106. %table.table
  107. %tbody
  108. %tr
  109. %th= t('admin.accounts.inbox_url')
  110. %td= link_to @account.inbox_url, @account.inbox_url
  111. %tr
  112. %th= t('admin.accounts.outbox_url')
  113. %td= link_to @account.outbox_url, @account.outbox_url
  114. %tr
  115. %th= t('admin.accounts.shared_inbox_url')
  116. %td= link_to @account.shared_inbox_url, @account.shared_inbox_url
  117. %tr
  118. %th= t('admin.accounts.followers_url')
  119. %td= link_to @account.followers_url, @account.followers_url
  120. %hr
  121. %h3= t('admin.accounts.moderation_notes')
  122. = simple_form_for @account_moderation_note, url: admin_account_moderation_notes_path do |f|
  123. = render 'shared/error_messages', object: @account_moderation_note
  124. = f.input :content
  125. = f.hidden_field :target_account_id
  126. .actions
  127. = f.button :button, t('admin.account_moderation_notes.create'), type: :submit
  128. .table-wrapper
  129. %table.table
  130. %thead
  131. %tr
  132. %th
  133. %th= t('admin.account_moderation_notes.account')
  134. %th= t('admin.account_moderation_notes.created_at')
  135. %tbody
  136. = render @moderation_notes