about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-29 16:54:54 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-29 16:54:54 +0100
commitd7dc84439c60069a0cb9eeca81dc61c297a8667b (patch)
tree167ee6db4fdc7008e2e517a0e983edb9721f4a7a /config
parent8b94d283fb45f054ee5193b0cec8586461d636b1 (diff)
Add ability to use remote follow function on other sites
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/locales/en.yml5
-rw-r--r--config/routes.rb4
3 files changed, 10 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb
index 091f9c535..79ace8521 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -45,7 +45,7 @@ module Mastodon
     config.browserify_rails.commandline_options = '--transform [ babelify --presets [ es2015 react ] ] --extension=".jsx"'
 
     config.to_prepare do
-      Doorkeeper::AuthorizationsController.layout 'auth'
+      Doorkeeper::AuthorizationsController.layout 'public'
     end
 
     config.action_dispatch.default_headers = {
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 760078862..f57c72026 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -26,6 +26,11 @@ en:
     resend_confirmation: Resend confirmation instructions
     reset_password: Reset password
     set_new_password: Set new password
+  authorize_follow:
+    error: Unfortunately, there was an error looking up the remote account
+    follow: Follow
+    prompt_html: 'You (<strong>%{self}</strong>) have requested to follow:'
+    title: Follow %{acct}
   datetime:
     distance_in_words:
       about_x_hours: "%{count}h"
diff --git a/config/routes.rb b/config/routes.rb
index 985d6583d..1468d426b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -48,6 +48,10 @@ Rails.application.routes.draw do
   resources :media, only: [:show]
   resources :tags,  only: [:show]
 
+  # Remote follow
+  get  :authorize_follow, to: 'authorize_follow#new'
+  post :authorize_follow, to: 'authorize_follow#create'
+
   namespace :admin do
     resources :pubsubhubbub, only: [:index]
     resources :domain_blocks, only: [:index, :create]