about summary refs log tree commit diff
path: root/app/views/admin/accounts
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-09-09 20:11:48 -0400
committerGitHub <noreply@github.com>2017-09-09 20:11:48 -0400
commit3dff74eecf5387b92b862893248710d2efb90eec (patch)
tree0d29d8c952a0c62e7de4348a1d63963fd5eca237 /app/views/admin/accounts
parente18ed4bbc7ab4e258d05a3e2a5db0790f67a8f37 (diff)
parent14e1fb8d36763e5255e7b8e440ecaf02208db004 (diff)
Merge pull request #141 from yipdw/sync/upstream
Sync with upstream @ v1.6.0rc3

ohhhhhhhhhhh heck here we go
Diffstat (limited to 'app/views/admin/accounts')
-rw-r--r--app/views/admin/accounts/_account.html.haml3
-rw-r--r--app/views/admin/accounts/index.html.haml1
-rw-r--r--app/views/admin/accounts/show.html.haml47
3 files changed, 35 insertions, 16 deletions
diff --git a/app/views/admin/accounts/_account.html.haml b/app/views/admin/accounts/_account.html.haml
index c513776b7..5265d77f6 100644
--- a/app/views/admin/accounts/_account.html.haml
+++ b/app/views/admin/accounts/_account.html.haml
@@ -4,6 +4,9 @@
   %td.domain
     - unless account.local?
       = link_to account.domain, admin_accounts_path(by_domain: account.domain)
+  %td.protocol
+    - unless account.local?
+      = account.protocol.humanize
   %td.confirmed
     - if account.local?
       - if account.user_confirmed?
diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml
index 07c8d1632..1f36aeb31 100644
--- a/app/views/admin/accounts/index.html.haml
+++ b/app/views/admin/accounts/index.html.haml
@@ -55,6 +55,7 @@
     %tr
       %th= t('admin.accounts.username')
       %th= t('admin.accounts.domain')
+      %th= t('admin.accounts.protocol')
       %th= t('admin.accounts.confirmed')
       %th= fa_icon 'paper-plane-o'
       %th
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index 5ad1fd6ee..dc2f16cc9 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -24,7 +24,8 @@
         %th= t('admin.accounts.most_recent_activity')
         %td
           - if @account.user_current_sign_in_at
-            = l @account.user_current_sign_in_at
+            %time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) }
+              = l @account.user_current_sign_in_at
           - else
             Never
     - else
@@ -32,18 +33,31 @@
         %th= t('admin.accounts.profile_url')
         %td= link_to @account.url, @account.url
       %tr
-        %th= t('admin.accounts.feed_url')
-        %td= link_to @account.remote_url, @account.remote_url
-      %tr
-        %th= t('admin.accounts.push_subscription_expires')
-        %td
-          - if @account.subscribed?
-            = l @account.subscription_expires_at
-          - else
-            = t('admin.accounts.not_subscribed')
-      %tr
-        %th= t('admin.accounts.salmon_url')
-        %td= link_to @account.salmon_url, @account.salmon_url
+        %th= t('admin.accounts.protocol')
+        %td= @account.protocol.humanize
+
+      - if @account.ostatus?
+        %tr
+          %th= t('admin.accounts.feed_url')
+          %td= link_to @account.remote_url, @account.remote_url
+        %tr
+          %th= t('admin.accounts.push_subscription_expires')
+          %td
+            - if @account.subscribed?
+              %time.formatted{ datetime: @account.subscription_expires_at.iso8601, title: l(@account.subscription_expires_at) }
+                = l @account.subscription_expires_at
+            - else
+              = t('admin.accounts.not_subscribed')
+        %tr
+          %th= t('admin.accounts.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
       %th= t('admin.accounts.follows')
@@ -74,9 +88,10 @@
     - 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'
   - else
-    = 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?
-      = link_to t('admin.accounts.unsubscribe'), unsubscribe_admin_account_path(@account.id), method: :post, class: 'button negative'
+    - 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'
+      - 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.redownload'), redownload_admin_account_path(@account.id), method: :post, class: 'button'
 
 %div{ style: 'float: left' }