From 3a4773c3c2bd0bbef244eb519b07208da9108e49 Mon Sep 17 00:00:00 2001 From: dcc Date: Sat, 2 Sep 2023 00:52:52 -0700 Subject: First --- .../templates/twitter_api/remote_follow/follow.html.eex | 11 +++++++++++ .../twitter_api/remote_follow/follow_login.html.eex | 14 ++++++++++++++ .../twitter_api/remote_follow/follow_mfa.html.eex | 13 +++++++++++++ .../templates/twitter_api/remote_follow/followed.html.eex | 5 +++++ 4 files changed, 43 insertions(+) create mode 100644 lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex create mode 100644 lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex create mode 100644 lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex create mode 100644 lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex (limited to 'lib/pleroma/web/templates/twitter_api/remote_follow') diff --git a/lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex b/lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex new file mode 100644 index 0000000..e2d251f --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex @@ -0,0 +1,11 @@ +<%= if @error == :error do %> +

<%= Gettext.dpgettext("static_pages", "remote follow error", "Error fetching user") %>

+<% else %> +

<%= Gettext.dpgettext("static_pages", "remote follow header", "Remote follow") %>

+ +

<%= @followee.nickname %>

+ <%= form_for @conn, Routes.remote_follow_path(@conn, :do_follow), [as: "user"], fn f -> %> + <%= hidden_input f, :id, value: @followee.id %> + <%= submit Gettext.dpgettext("static_pages", "remote follow authorization button", "Authorize") %> + <% end %> +<% end %> diff --git a/lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex b/lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex new file mode 100644 index 0000000..26340a9 --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex @@ -0,0 +1,14 @@ +<%= if @error do %> +

<%= @error %>

+<% end %> +

<%= Gettext.dpgettext("static_pages", "remote follow header, need login", "Log in to follow") %>

+

<%= @followee.nickname %>

+ +<%= form_for @conn, Routes.remote_follow_path(@conn, :do_follow), [as: "authorization"], fn f -> %> +<%= text_input f, :name, placeholder: Gettext.dpgettext("static_pages", "placeholder text for username entry", "Username"), required: true, autocomplete: "username" %> +
+<%= password_input f, :password, placeholder: Gettext.dpgettext("static_pages", "placeholder text for password entry", "Password"), required: true, autocomplete: "password" %> +
+<%= hidden_input f, :id, value: @followee.id %> +<%= submit Gettext.dpgettext("static_pages", "remote follow authorization button for login", "Authorize") %> +<% end %> diff --git a/lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex b/lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex new file mode 100644 index 0000000..638212c --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex @@ -0,0 +1,13 @@ +<%= if @error do %> +

<%= @error %>

+<% end %> +

<%= Gettext.dpgettext("static_pages", "remote follow mfa header", "Two-factor authentication") %>

+

<%= @followee.nickname %>

+ +<%= form_for @conn, Routes.remote_follow_path(@conn, :do_follow), [as: "mfa"], fn f -> %> +<%= text_input f, :code, placeholder: Gettext.dpgettext("static_pages", "placeholder text for auth code entry", "Authentication code"), required: true %> +
+<%= hidden_input f, :id, value: @followee.id %> +<%= hidden_input f, :token, value: @mfa_token %> +<%= submit Gettext.dpgettext("static_pages", "remote follow authorization button for mfa", "Authorize") %> +<% end %> diff --git a/lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex b/lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex new file mode 100644 index 0000000..2fb4cc5 --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex @@ -0,0 +1,5 @@ +<%= if @error do %> +

<%= Gettext.dpgettext("static_pages", "remote follow error", "Error following account") %>

+<% else %> +

<%= Gettext.dpgettext("static_pages", "remote follow success", "Account followed!") %>

+<% end %> -- cgit v1.2.3