]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Fri, 30 Aug 2019 11:38:41 +0000 (13:38 +0200)
committerThibaut Girka <thib@sitedethib.com>
Fri, 30 Aug 2019 11:38:41 +0000 (13:38 +0200)
Conflicts:
- app/views/directories/index.html.haml
  Upstream has redesigned the profile directory, and we
  had a glitch-soc-specific change to hide follower counts.
  Ported that change to the new design.

17 files changed:
1  2 
Gemfile
Gemfile.lock
app/controllers/application_controller.rb
app/controllers/directories_controller.rb
app/controllers/remote_follow_controller.rb
app/controllers/remote_interaction_controller.rb
app/helpers/statuses_helper.rb
app/javascript/styles/mastodon/components.scss
app/models/account.rb
app/models/media_attachment.rb
app/serializers/rest/account_serializer.rb
app/views/directories/index.html.haml
app/views/settings/profiles/show.html.haml
config/locales/en.yml
config/locales/simple_form.en.yml
config/routes.rb
package.json

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
index f2d1f56619db56d7144e91dc367bffe549098911,7da975a23ff6bd3af22efaab9ad047fee4ec4a66..bbfdde8af3adcf6339d0cb2882fa6554512c4acd
@@@ -7,9 -7,7 +7,8 @@@ class DirectoriesController < Applicati
    before_action :require_enabled!
    before_action :set_instance_presenter
    before_action :set_tag, only: :show
-   before_action :set_tags
    before_action :set_accounts
 +  before_action :set_pack
  
    def index
      render :index
index 46dd444a4d2df9643a39987616f2e0dcfe145120,ba963a7a06c35bb28cb8dfb7fd0f7dac0d760a74..65dfa35db0f1b11be2ffef80dd7e768d52a9c9ed
@@@ -30,13 -29,9 +30,13 @@@ class RemoteFollowController < Applicat
    end
  
    def session_params
-     { acct: session[:remote_follow] }
+     { acct: session[:remote_follow] || current_account&.username }
    end
  
 +  def set_pack
 +    use_pack 'modal'
 +  end
 +
    def set_body_classes
      @body_classes = 'modal-layout'
      @hide_header  = true
Simple merge
Simple merge
Simple merge
index 6608a5dcbc4a6eef33d6d5b4044ea3357ce7e9f9,30daa6bb1ad98ad5f0db80ff8149cc2fa8a0e93a..811080eb4a446a213239cfea96918f326ae39d35
    %h1= t('directories.explore_mastodon', title: site_title)
    %p= t('directories.explanation')
  
- .grid
-   .column-0
-     - if @accounts.empty?
-       = nothing_here
-     - else
-       .directory
-         %table.accounts-table
-           %tbody
-             - @accounts.each do |account|
-               %tr
-                 %td= account_link_to account
-                 %td.accounts-table__count.optional
-                   = number_to_human account.statuses_count, strip_insignificant_zeros: true
-                   %small= t('accounts.posts', count: account.statuses_count).downcase
-                 %td.accounts-table__count.optional
-                   = hide_followers_count?(account) ? '-' : (number_to_human account.followers_count, strip_insignificant_zeros: true)
-                   %small= t('accounts.followers', count: account.followers_count).downcase
-                 %td.accounts-table__count
-                   - if account.last_status_at.present?
-                     %time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at
-                   - else
-                     \-
-                   %small= t('accounts.last_active')
-       = paginate @accounts
-   .column-1
-     - if user_signed_in?
-       .box-widget.notice-widget
-         - if current_account.discoverable?
-           - if current_account.followers_count < Account::MIN_FOLLOWERS_DISCOVERY
-             %p= t('directories.enabled_but_waiting', min_followers: Account::MIN_FOLLOWERS_DISCOVERY)
-           - else
-             %p= t('directories.enabled')
-         - else
-           %p= t('directories.how_to_enable')
-           = link_to settings_profile_path do
-             = t('settings.edit_profile')
-             = fa_icon 'chevron-right fw'
-     - if @tags.empty? && !user_signed_in?
-       .nothing-here
-     - else
-       - @tags.each do |tag|
-         .directory__tag{ class: tag.id == @tag&.id ? 'active' : nil }
-           = link_to explore_hashtag_path(tag) do
-             %h4
-               = fa_icon 'hashtag'
-               = tag.name
-               %small= t('directories.people', count: tag.accounts_count)
-             .avatar-stack
-               - tag.cached_sample_accounts.each do |account|
-                 = image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar'
+ - if @accounts.empty?
+   = nothing_here
+ - 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: '', width: 48, height: 48, class: 'u-photo'
+             .display-name
+               %span{ id: "default_account_display_name", style: "display: none" }= account.username
+               %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
+             = number_to_human account.statuses_count, strip_insignificant_zeros: true
+             %small= t('accounts.posts', count: account.statuses_count).downcase
+           .accounts-table__count
 -            = number_to_human account.followers_count, strip_insignificant_zeros: true
++            = hide_followers_count?(account) ? '-' : (number_to_human account.followers_count, strip_insignificant_zeros: true)
+             %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.iso8601, title: l(account.last_status_at) }= l account.last_status_at
+             - else
+               = t('invites.expires_in_prompt')
+             %small= t('accounts.last_active')
+   = paginate @accounts
Simple merge
Simple merge
Simple merge
diff --cc package.json
Simple merge