1
0
Fork 0
forked from fedi/mastodon

Update /admin/accounts/:id view for ActivityPub (#4600)

* Add protocol field
* Switch protocol specific information according to active protocol
* Hide PuSH subscription related buttons if ActivityPub is active
This commit is contained in:
unarist 2017-08-14 21:09:00 +09:00 committed by Eugen Rochko
parent 5f22c0189d
commit 5b9ae7981e
2 changed files with 31 additions and 15 deletions

View file

@ -31,6 +31,11 @@
%tr %tr
%th= t('admin.accounts.profile_url') %th= t('admin.accounts.profile_url')
%td= link_to @account.url, @account.url %td= link_to @account.url, @account.url
%tr
%th= t('admin.accounts.protocol')
%td= @account.protocol
- if @account.ostatus?
%tr %tr
%th= t('admin.accounts.feed_url') %th= t('admin.accounts.feed_url')
%td= link_to @account.remote_url, @account.remote_url %td= link_to @account.remote_url, @account.remote_url
@ -44,6 +49,13 @@
%tr %tr
%th= t('admin.accounts.salmon_url') %th= t('admin.accounts.salmon_url')
%td= link_to @account.salmon_url, @account.salmon_url %td= link_to @account.salmon_url, @account.salmon_url
- elsif @account.activitypub?
%tr
%th= t('admin.accounts.inbox_url')
%td= link_to @account.inbox_url, @account.inbox_url
%tr
%th= t('admin.accounts.outbox_url')
%td= link_to @account.outbox_url, @account.outbox_url
%tr %tr
%th= t('admin.accounts.follows') %th= t('admin.accounts.follows')
@ -74,6 +86,7 @@
- if @account.user&.otp_required_for_login? - if @account.user&.otp_required_for_login?
= link_to t('admin.accounts.disable_two_factor_authentication'), admin_user_two_factor_authentication_path(@account.user.id), method: :delete, class: 'button' = link_to t('admin.accounts.disable_two_factor_authentication'), admin_user_two_factor_authentication_path(@account.user.id), method: :delete, class: 'button'
- else - else
- if @account.ostatus?
= link_to @account.subscribed? ? t('admin.accounts.resubscribe') : t('admin.accounts.subscribe'), subscribe_admin_account_path(@account.id), method: :post, class: 'button' = link_to @account.subscribed? ? t('admin.accounts.resubscribe') : t('admin.accounts.subscribe'), subscribe_admin_account_path(@account.id), method: :post, class: 'button'
- if @account.subscribed? - if @account.subscribed?
= link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative' = link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative'

View file

@ -57,6 +57,7 @@ en:
feed_url: Feed URL feed_url: Feed URL
followers: Followers followers: Followers
follows: Follows follows: Follows
inbox_url: Inbox URL
ip: IP ip: IP
location: location:
all: All all: All
@ -76,8 +77,10 @@ en:
alphabetic: Alphabetic alphabetic: Alphabetic
most_recent: Most recent most_recent: Most recent
title: Order title: Order
outbox_url: Outbox URL
perform_full_suspension: Perform full suspension perform_full_suspension: Perform full suspension
profile_url: Profile URL profile_url: Profile URL
protocol: Protocol
public: Public public: Public
push_subscription_expires: PuSH subscription expires push_subscription_expires: PuSH subscription expires
redownload: Refresh avatar redownload: Refresh avatar