about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/authorize_follows_controller.rb2
-rw-r--r--app/javascript/styles/forms.scss9
-rw-r--r--app/views/authorize_follows/success.html.haml16
3 files changed, 26 insertions, 1 deletions
diff --git a/app/controllers/authorize_follows_controller.rb b/app/controllers/authorize_follows_controller.rb
index da4ef022a..dccd1c209 100644
--- a/app/controllers/authorize_follows_controller.rb
+++ b/app/controllers/authorize_follows_controller.rb
@@ -15,7 +15,7 @@ class AuthorizeFollowsController < ApplicationController
     if @account.nil?
       render :error
     else
-      redirect_to web_url("accounts/#{@account.id}")
+      render :success
     end
   rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError
     render :error
diff --git a/app/javascript/styles/forms.scss b/app/javascript/styles/forms.scss
index 7a181f36b..414dc4fe8 100644
--- a/app/javascript/styles/forms.scss
+++ b/app/javascript/styles/forms.scss
@@ -375,3 +375,12 @@ code {
     width: 50%;
   }
 }
+
+.post-follow-actions {
+  text-align: center;
+  color: $ui-primary-color;
+
+  div {
+    margin-bottom: 4px;
+  }
+}
diff --git a/app/views/authorize_follows/success.html.haml b/app/views/authorize_follows/success.html.haml
new file mode 100644
index 000000000..f0b495689
--- /dev/null
+++ b/app/views/authorize_follows/success.html.haml
@@ -0,0 +1,16 @@
+- content_for :page_title do
+  = t('authorize_follow.title', acct: @account.acct)
+
+.form-container
+  .follow-prompt
+    - if @account.locked?
+      %h2= t('authorize_follow.follow_request')
+    - else
+      %h2= t('authorize_follow.following')
+
+    = render 'card', account: @account
+
+  .post-follow-actions
+    %div= link_to t('authorize_follow.post_follow.web'), web_url("accounts/#{@account.id}"), class: 'button button--block'
+    %div= link_to t('authorize_follow.post_follow.return'), @account.url, class: 'button button--block'
+    %div= t('authorize_follow.post_follow.close')