]> cat aescling's git repositories - mastodon.git/commitdiff
Make share intent modal to make "signed in as" shown. (#4611)
authorClworld <clworld@ggtea.org>
Wed, 16 Aug 2017 14:48:44 +0000 (23:48 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 16 Aug 2017 14:48:44 +0000 (16:48 +0200)
* Make share intent modal to make "signed in as" shown.

* fix glitch on mobile.

app/controllers/shares_controller.rb
app/javascript/styles/containers.scss

index d70d66ff8f49149c34d5c1a4d5ed0607042f30f1..994742c3df6b2ae61ab7c0907a3bc431c70ba185 100644 (file)
@@ -1,9 +1,10 @@
 # frozen_string_literal: true
 
 class SharesController < ApplicationController
-  layout 'public'
+  layout 'modal'
 
   before_action :authenticate_user!
+  before_action :set_body_classes
 
   def show
     serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer)
@@ -22,4 +23,8 @@ class SharesController < ApplicationController
       text: params[:text],
     }
   end
+
+  def set_body_classes
+    @body_classes = 'compose-standalone'
+  end
 end
index 063db44dbfb4eb00dc16c6117f6f4ee68dda24c3..cfe8ea6438bcfd97a70ed5ab97efbcef69d118bc 100644 (file)
@@ -53,6 +53,7 @@
     box-sizing: border-box;
 
     @media screen and (max-width: 400px) {
+      width: 100%;
       margin-top: 0;
       padding: 20px;
     }