]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Wed, 13 Mar 2019 14:16:02 +0000 (15:16 +0100)
committerThibaut Girka <thib@sitedethib.com>
Wed, 13 Mar 2019 14:16:02 +0000 (15:16 +0100)
Conflicts:
- app/controllers/about_controller.rb
- app/controllers/tags_controller.rb
- app/views/about/show.html.haml
- spec/views/about/show.html.haml_spec.rb

20 files changed:
1  2 
Gemfile.lock
app/controllers/about_controller.rb
app/controllers/accounts_controller.rb
app/controllers/tags_controller.rb
app/models/account.rb
app/presenters/instance_presenter.rb
app/services/remove_status_service.rb
app/views/layouts/public.html.haml
app/views/tags/show.html.haml
app/workers/activitypub/distribute_poll_update_worker.rb
config/locales/ca.yml
config/locales/en.yml
config/locales/es.yml
config/locales/ja.yml
config/locales/oc.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/routes.rb
spec/models/account_spec.rb
spec/views/about/show.html.haml_spec.rb

diff --cc Gemfile.lock
Simple merge
index ce1e8293ce2f8e7fd93fd2cf85c26852c99a6737,67bb2c87fa0bfabbd8d86ff8ec7bfae269521202..f459bab19de004e4e5ef49e4c681c452f2035f40
@@@ -1,8 -1,8 +1,9 @@@
  # frozen_string_literal: true
  
  class AboutController < ApplicationController
-   before_action :set_body_classes
 +  before_action :set_pack
+   layout 'public'
    before_action :set_instance_presenter, only: [:show, :more, :terms]
  
    def show
  
    helper_method :new_user
  
-     use_pack action_name == 'show' ? 'about' : 'common'
 +  def set_pack
++    use_pack 'common'
 +  end
 +
    def set_instance_presenter
      @instance_presenter = InstancePresenter.new
    end
index 186d276c23b8def4f9a6e9dc9fc442a66da9f693,66b18490117833a176ded1f937776f226ec348b1..5cb048c1a7dcfa5965af510d399f56223b835243
@@@ -13,9 -13,10 +13,11 @@@ class TagsController < ApplicationContr
  
      respond_to do |format|
        format.html do
-         serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer)
-         @initial_state_json   = serializable_resource.to_json
 +        use_pack 'about'
+         @initial_state_json = ActiveModelSerializers::SerializableResource.new(
+           InitialStatePresenter.new(settings: {}, token: current_session&.token),
+           serializer: InitialStateSerializer
+         ).to_json
        end
  
        format.rss do
Simple merge
Simple merge
Simple merge
index c1c0f4b871c05c11fed62766e18116ea80f0e181,15d819dfe36e481652f013338667ba6f7606ddcf..f26271cdc84465b1e23482a4e6d16530cee8d894
@@@ -1,22 -1,26 +1,23 @@@
 -- content_for :header_tags do
 -  = javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
 -
  - content_for :content do
    .public-layout
-     .container
-       %nav.header
-         .nav-left
-           = link_to root_url, class: 'brand' do
-             = image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
+     - unless @hide_navbar
+       .container
+         %nav.header
+           .nav-left
+             = link_to root_url, class: 'brand' do
+               = image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
  
-           - if Setting.profile_directory
-             = link_to t('directories.directory'), explore_path, class: 'nav-link optional'
-           = link_to t('about.about_this'), about_more_path, class: 'nav-link optional'
-           = link_to t('about.apps'), 'https://joinmastodon.org/apps', class: 'nav-link optional'
-         .nav-center
-         .nav-right
-           - if user_signed_in?
-             = link_to t('settings.back'), root_url, class: 'nav-link nav-button webapp-btn'
-           - else
-             = link_to t('auth.login'), new_user_session_path, class: 'webapp-btn nav-link nav-button'
-             = link_to t('auth.register'), open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started', class: 'webapp-btn nav-link nav-button'
+             - if Setting.profile_directory
+               = link_to t('directories.directory'), explore_path, class: 'nav-link optional'
+             = link_to t('about.about_this'), about_more_path, class: 'nav-link optional'
+             = link_to t('about.apps'), 'https://joinmastodon.org/apps', class: 'nav-link optional'
+           .nav-center
+           .nav-right
+             - if user_signed_in?
+               = link_to t('settings.back'), root_url, class: 'nav-link nav-button webapp-btn'
+             - else
+               = link_to t('auth.login'), new_user_session_path, class: 'webapp-btn nav-link nav-button'
+               = link_to t('auth.register'), open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started', class: 'webapp-btn nav-link nav-button'
  
      .container= yield
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 65124fcf2e1397212959d3349a5a1409131ad64b,c75c2875989fdded2dc2392815b4ab7e7b5bb542..26b1319779fe070c2584c1dcdee707a61cf2eda4
@@@ -11,21 -11,24 +13,25 @@@ describe 'about/show.html.haml', withou
    end
  
    it 'has valid open graph tags' do
-     instance_presenter = double(:instance_presenter,
-                                 site_title: 'something',
-                                 site_short_description: 'something',
-                                 site_description: 'something',
-                                 version_number: '1.0',
-                                 source_url: 'https://github.com/tootsuite/mastodon',
-                                 open_registrations: false,
-                                 thumbnail: nil,
-                                 hero: nil,
-                                 mascot: nil,
-                                 user_count: 0,
-                                 status_count: 0,
-                                 commit_hash: commit_hash,
-                                 contact_account: nil,
-                                 closed_registrations_message: 'yes')
+     instance_presenter = double(
+       :instance_presenter,
+       site_title: 'something',
+       site_short_description: 'something',
+       site_description: 'something',
+       version_number: '1.0',
+       source_url: 'https://github.com/tootsuite/mastodon',
+       open_registrations: false,
+       thumbnail: nil,
+       hero: nil,
+       mascot: nil,
+       user_count: 420,
+       status_count: 69,
+       active_user_count: 420,
++      commit_hash: commit_hash,
+       contact_account: nil,
+       sample_accounts: []
+     )
      assign(:instance_presenter, instance_presenter)
      render