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/password/invalid_token.html.eex | 1 + .../web/templates/twitter_api/password/reset.html.eex | 13 +++++++++++++ .../templates/twitter_api/password/reset_failed.html.eex | 6 ++++++ .../templates/twitter_api/password/reset_success.html.eex | 2 ++ .../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 +++++ .../templates/twitter_api/util/status_interact.html.eex | 10 ++++++++++ .../web/templates/twitter_api/util/subscribe.html.eex | 10 ++++++++++ 10 files changed, 85 insertions(+) create mode 100644 lib/pleroma/web/templates/twitter_api/password/invalid_token.html.eex create mode 100644 lib/pleroma/web/templates/twitter_api/password/reset.html.eex create mode 100644 lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex create mode 100644 lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex 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 create mode 100644 lib/pleroma/web/templates/twitter_api/util/status_interact.html.eex create mode 100644 lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex (limited to 'lib/pleroma/web/templates/twitter_api') diff --git a/lib/pleroma/web/templates/twitter_api/password/invalid_token.html.eex b/lib/pleroma/web/templates/twitter_api/password/invalid_token.html.eex new file mode 100644 index 0000000..5ac0aa4 --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/password/invalid_token.html.eex @@ -0,0 +1 @@ +

<%= Gettext.dpgettext("static_pages", "password reset invalid token message", "Invalid Token") %>

diff --git a/lib/pleroma/web/templates/twitter_api/password/reset.html.eex b/lib/pleroma/web/templates/twitter_api/password/reset.html.eex new file mode 100644 index 0000000..6a544af --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/password/reset.html.eex @@ -0,0 +1,13 @@ +

Password Reset for <%= @user.nickname %>

+<%= form_for @conn, Routes.reset_password_path(@conn, :do_reset), [as: "data"], fn f -> %> +
+ <%= label f, :password, Gettext.dpgettext("static_pages", "password reset form password prompt", "Password") %> + <%= password_input f, :password %> +
+
+ <%= label f, :password_confirmation, Gettext.dpgettext("static_pages", "password reset form confirm password prompt", "Confirmation") %> + <%= password_input f, :password_confirmation %> +
+ <%= hidden_input f, :token, value: @token.token %> + <%= submit Gettext.dpgettext("static_pages", "password reset button", "Reset") %> +<% end %> diff --git a/lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex b/lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex new file mode 100644 index 0000000..774e346 --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex @@ -0,0 +1,6 @@ +

<%= Gettext.dpgettext("static_pages", "password reset failed message", "Password reset failed") %>

+

+ + <%= Gettext.dpgettext("static_pages", "password reset failed homepage link", "Homepage") %> + +

diff --git a/lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex b/lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex new file mode 100644 index 0000000..40f6bb3 --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex @@ -0,0 +1,2 @@ +

<%= Gettext.dpgettext("static_pages", "password reset successful message", "Password changed!") %>

+

<%= Gettext.dpgettext("static_pages", "password reset successful homepage link", "Homepage") %>

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 %> diff --git a/lib/pleroma/web/templates/twitter_api/util/status_interact.html.eex b/lib/pleroma/web/templates/twitter_api/util/status_interact.html.eex new file mode 100644 index 0000000..d771749 --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/util/status_interact.html.eex @@ -0,0 +1,10 @@ +<%= if @error do %> +

<%= Gettext.dpgettext("static_pages", "status interact error", "Error: %{error}", error: @error) %>

+<% else %> +

<%= raw Gettext.dpgettext("static_pages", "status interact header", "Interacting with %{nickname}'s %{status_link}", nickname: safe_to_string(html_escape(@nickname)), status_link: safe_to_string(link(Gettext.dpgettext("static_pages", "status interact header - status link text", "status"), to: @status_link))) %>

+ <%= form_for @conn, Routes.util_path(@conn, :remote_subscribe), [as: "status"], fn f -> %> + <%= hidden_input f, :status_id, value: @status_id %> + <%= text_input f, :profile, placeholder: Gettext.dpgettext("static_pages", "placeholder text for account id", "Your account ID, e.g. lain@quitter.se") %> + <%= submit Gettext.dpgettext("static_pages", "status interact authorization button", "Interact") %> + <% end %> +<% end %> diff --git a/lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex b/lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex new file mode 100644 index 0000000..848660f --- /dev/null +++ b/lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex @@ -0,0 +1,10 @@ +<%= if @error do %> +

<%= Gettext.dpgettext("static_pages", "remote follow error", "Error: %{error}", error: @error) %>

+<% else %> +

<%= Gettext.dpgettext("static_pages", "remote follow header", "Remotely follow %{nickname}", nickname: @nickname) %>

+ <%= form_for @conn, Routes.util_path(@conn, :remote_subscribe), [as: "user"], fn f -> %> + <%= hidden_input f, :nickname, value: @nickname %> + <%= text_input f, :profile, placeholder: Gettext.dpgettext("static_pages", "placeholder text for account id", "Your account ID, e.g. lain@quitter.se") %> + <%= submit Gettext.dpgettext("static_pages", "remote follow authorization button for following with a remote account", "Follow") %> + <% end %> +<% end %> -- cgit v1.2.3