about summary refs log tree commit diff
path: root/app/views/directories
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-03-07 11:38:52 +0100
committerGitHub <noreply@github.com>2022-03-07 11:38:52 +0100
commitdba4be1038063845a74e83aaa85d6ab08d5625dd (patch)
tree860f03ea524ae14d6e78a5f7aae0e7d2729a9d76 /app/views/directories
parent292c75aa319c877406356a1cb4fb41f4ab597cfd (diff)
Change appearance of account cards in web UI (#17689)
* Change appearance of account cards in web UI

* Various fixes and improvements

* Various fixes and improvements
Diffstat (limited to 'app/views/directories')
-rw-r--r--app/views/directories/index.html.haml57
1 files changed, 28 insertions, 29 deletions
diff --git a/app/views/directories/index.html.haml b/app/views/directories/index.html.haml
index 04639e32c..2b338115b 100644
--- a/app/views/directories/index.html.haml
+++ b/app/views/directories/index.html.haml
@@ -19,37 +19,36 @@
 - else
   .directory__list
     - @accounts.each do |account|
-      .directory__card
-        .directory__card__img
-          = image_tag account.header.url, alt: ''
-        .directory__card__bar
-          = link_to TagManager.instance.url_for(account), class: 'directory__card__bar__name' do
-            .avatar
-              = image_tag account.avatar.url, alt: '', class: 'u-photo'
-
+      .account-card
+        = link_to TagManager.instance.url_for(account), class: 'account-card__permalink' do
+          .account-card__header
+            = image_tag account.header.url, alt: ''
+          .account-card__title
+            .account-card__title__avatar
+              = image_tag account.avatar.url, alt: ''
             .display-name
               %bdi
                 %strong.emojify.p-name= display_name(account, custom_emojify: true)
-              %span= acct(account)
-          .directory__card__bar__relationship.account__relationship
-            = minimal_account_action_button(account)
-
-        .directory__card__extra
-          .account__header__content.emojify= Formatter.instance.simplified_format(account, custom_emojify: true)
-
-        .directory__card__extra
-          .accounts-table__count
-            = friendly_number_to_human account.statuses_count
-            %small= t('accounts.posts', count: account.statuses_count).downcase
-          .accounts-table__count
-            = friendly_number_to_human account.followers_count
-            %small= t('accounts.followers', count: account.followers_count).downcase
-          .accounts-table__count
-            - if account.last_status_at.present?
-              %time.time-ago{ datetime: account.last_status_at.to_date.iso8601, title: l(account.last_status_at.to_date) }= l account.last_status_at.to_date
-            - else
-              = t('accounts.never_active')
-
-            %small= t('accounts.last_active')
+              %span
+                = acct(account)
+                = fa_icon('lock') if account.locked?
+        - if account.note.present?
+          .account-card__bio.emojify
+            = Formatter.instance.simplified_format(account, custom_emojify: true)
+        - else
+          .flex-spacer
+        .account-card__actions
+          .account-card__counters
+            .account-card__counters__item
+              = friendly_number_to_human account.statuses_count
+              %small= t('accounts.posts', count: account.statuses_count).downcase
+            .account-card__counters__item
+              = friendly_number_to_human account.followers_count
+              %small= t('accounts.followers', count: account.followers_count).downcase
+            .account-card__counters__item
+              = friendly_number_to_human account.following_count
+              %small= t('accounts.following', count: account.following_count).downcase
+          .account-card__actions__button
+            = account_action_button(account)
 
   = paginate @accounts