logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 1ef474186141354bba03f28850fdeb4c1945d912
parent: 99f955cd9e48ba956da438926dd8626fe43aa3a1
Author: kaniini <nenolod@gmail.com>
Date:   Wed, 13 Feb 2019 23:42:11 +0000

Merge branch 'feature/better-login-errors' into 'develop'

Improve login error for OAuth flow

See merge request pleroma/pleroma!824

Diffstat:

Mlib/pleroma/web/templates/layout/app.html.eex26++++++++++++++++++++++++++
Mlib/pleroma/web/templates/o_auth/o_auth/show.html.eex4++++
2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/lib/pleroma/web/templates/layout/app.html.eex b/lib/pleroma/web/templates/layout/app.html.eex @@ -67,6 +67,32 @@ font-weight: 500; font-size: 16px; } + + .alert-danger { + box-sizing: border-box; + width: 100%; + color: #D8000C; + background-color: #FFD2D2; + border-radius: 4px; + border: none; + padding: 10px; + margin-top: 20px; + font-weight: 500; + font-size: 16px; + } + + .alert-info { + box-sizing: border-box; + width: 100%; + color: #00529B; + background-color: #BDE5F8; + border-radius: 4px; + border: none; + padding: 10px; + margin-top: 20px; + font-weight: 500; + font-size: 16px; + } </style> </head> <body> diff --git a/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex b/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex @@ -1,5 +1,9 @@ +<%= if get_flash(@conn, :info) do %> <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p> +<% end %> +<%= if get_flash(@conn, :error) do %> <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p> +<% end %> <h2>OAuth Authorization</h2> <%= form_for @conn, o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %> <%= label f, :name, "Name or email" %>