logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

show.html.eex (3403B)


  1. <%= if Phoenix.Flash.get(@flash, :info) do %>
  2. <p class="alert alert-info" role="alert"><%= Phoenix.Flash.get(@flash, :info) %></p>
  3. <% end %>
  4. <%= if Phoenix.Flash.get(@flash, :error) do %>
  5. <p class="alert alert-danger" role="alert"><%= Phoenix.Flash.get(@flash, :error) %></p>
  6. <% end %>
  7. <%= form_for @conn, Routes.o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %>
  8. <%= if @user do %>
  9. <div class="account-header">
  10. <div class="account-header__banner" style="background-image: url('<%= Pleroma.User.banner_url(@user) %>')"></div>
  11. <div class="account-header__avatar" style="background-image: url('<%= Pleroma.User.avatar_url(@user) %>')"></div>
  12. <div class="account-header__meta">
  13. <div class="account-header__display-name"><%= @user.name %></div>
  14. <div class="account-header__nickname">@<%= Pleroma.User.full_nickname(@user.nickname) %></div>
  15. </div>
  16. </div>
  17. <% end %>
  18. <div class="container__content">
  19. <%= if @app do %>
  20. <p><%= raw Gettext.dpgettext("static_pages", "oauth authorize message", "Application <strong>%{client_name}</strong> is requesting access to your account.", client_name: safe_to_string(html_escape(@app.client_name))) %></p>
  21. <%= render Phoenix.Controller.view_module(@conn), "_scopes.html", Map.merge(assigns, %{form: f}) %>
  22. <% end %>
  23. <%= if @user do %>
  24. <div class="actions">
  25. <a class="button button--cancel" href="/">
  26. <%= Gettext.dpgettext("static_pages", "oauth authorize cancel button", "Cancel") %>
  27. </a>
  28. <%= submit Gettext.dpgettext("static_pages", "oauth authorize approve button", "Approve"), class: "button--approve" %>
  29. </div>
  30. <% else %>
  31. <%= if @params["registration"] in ["true", true] do %>
  32. <h3><%= Gettext.dpgettext("static_pages", "oauth register page title", "This is the first time you visit! Please enter your Pleroma handle.") %></h3>
  33. <p><%= Gettext.dpgettext("static_pages", "oauth register nickname unchangeable warning", "Choose carefully! You won't be able to change this later. You will be able to change your display name, though.") %></p>
  34. <div class="input">
  35. <%= label f, :nickname, Gettext.dpgettext("static_pages", "oauth register nickname prompt", "Pleroma Handle") %>
  36. <%= text_input f, :nickname, placeholder: "lain", autocomplete: "username" %>
  37. </div>
  38. <%= hidden_input f, :name, value: @params["name"] %>
  39. <%= hidden_input f, :password, value: @params["password"] %>
  40. <br>
  41. <% else %>
  42. <div class="input">
  43. <%= label f, :name, Gettext.dpgettext("static_pages", "oauth login username prompt", "Username") %>
  44. <%= text_input f, :name %>
  45. </div>
  46. <div class="input">
  47. <%= label f, :password, Gettext.dpgettext("static_pages", "oauth login password prompt", "Password") %>
  48. <%= password_input f, :password %>
  49. </div>
  50. <%= submit Gettext.dpgettext("static_pages", "oauth login button", "Log In") %>
  51. <% end %>
  52. <% end %>
  53. </div>
  54. <%= hidden_input f, :client_id, value: @client_id %>
  55. <%= hidden_input f, :response_type, value: @response_type %>
  56. <%= hidden_input f, :redirect_uri, value: @redirect_uri %>
  57. <%= hidden_input f, :state, value: @state %>
  58. <% end %>
  59. <%= if Pleroma.Config.oauth_consumer_enabled?() do %>
  60. <%= render Phoenix.Controller.view_module(@conn), Pleroma.Web.Auth.WrapperAuthenticator.oauth_consumer_template(), assigns %>
  61. <% end %>