about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-07-31 11:44:12 +0200
committerThibG <thib@sitedethib.com>2018-07-31 16:26:36 +0200
commit88b593a63ff3d607d6f98553654c46bc7cfc0b7b (patch)
tree458ac146f6fcc2264e6d96b1e2f3677b527b0ea9 /app/views
parentc4bec9263cabdd141d5e83e57869dec97426c0d9 (diff)
Drop glitch-style account bio fields
Upstream's implementation has been merged a while ago and is the preferred
way to set fields, as it is the only one compatible with upstream and is
more user-friendly.

This commit deletes the legacy glitch-soc FrontMatter functionality in order
to clean up the code and make it easier to maintain.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/accounts/_header.html.haml12
1 files changed, 3 insertions, 9 deletions
diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml
index b5653f161..4098d6778 100644
--- a/app/views/accounts/_header.html.haml
+++ b/app/views/accounts/_header.html.haml
@@ -1,4 +1,3 @@
-- processed_bio = FrontmatterHandler.instance.process_bio Formatter.instance.simplified_format(account, custom_emojify: true)
 .card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
   .card__illustration
     = render 'accounts/follow_button', account: account
@@ -24,21 +23,16 @@
         .roles
           .account-role.moderator
             = t 'accounts.roles.moderator'
+
     .bio
-      .account__header__content.p-note.emojify!=processed_bio[:text]
+      .account__header__content.p-note.emojify= Formatter.instance.simplified_format(account, custom_emojify: true)
 
-      - if !account.fields.empty?
+      - unless account.fields.empty?
         .account__header__fields
           - account.fields.each do |field|
             %dl
               %dt.emojify{ title: field.name }= field.name
               %dd.emojify{ title: field.value }= Formatter.instance.format_field(account, field.value, custom_emojify: true)
-      - elsif processed_bio[:metadata].length > 0
-        .account__header__fields
-          - processed_bio[:metadata].each do |i|
-            %dl
-              %dt.emojify{ title: i[0] }!= i[0]
-              %dd.emojify{ title: i[1] }!= i[1]
 
     .details-counters
       .counter{ class: active_nav_class(short_account_url(account)) }