aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2019-02-13 22:33:22 +0000
committerMark Felder <feld@FreeBSD.org>2019-02-13 22:33:22 +0000
commitf62c1d6266be1af59aa5e0fe05e438c54c330e74 (patch)
treed82338745412d6671fe7a190e31c793857de8947 /lib
parent99f955cd9e48ba956da438926dd8626fe43aa3a1 (diff)
downloadpleroma-f62c1d6266be1af59aa5e0fe05e438c54c330e74.tar.gz
Improve login error for OAuth flow
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/templates/layout/app.html.eex26
-rw-r--r--lib/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
index 8dd3284d6..520e4b3d5 100644
--- 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
index de2241ec9..32c458f0c 100644
--- 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" %>