diff --git a/crates/templates/src/res/components/button.html b/crates/templates/src/res/components/button.html index 2fe71a32..4e93715c 100644 --- a/crates/templates/src/res/components/button.html +++ b/crates/templates/src/res/components/button.html @@ -18,6 +18,10 @@ limitations under the License. px-4 py-2 border-2 rounded-lg font-medium text-center focus:ring-0 focus:outline-0 focus:border-black dark:focus:border-white {%- endmacro %} +{% macro plain_error_class() -%} + {{ self::common_class() }} border-alert bg-alert text-white hover:opacity-75 +{%- endmacro %} + {% macro plain_class() -%} {{ self::common_class() }} border-accent bg-accent text-white hover:opacity-75 {%- endmacro %} diff --git a/crates/templates/src/res/pages/consent.html b/crates/templates/src/res/pages/consent.html index 4a335196..bf2155e5 100644 --- a/crates/templates/src/res/pages/consent.html +++ b/crates/templates/src/res/pages/consent.html @@ -16,16 +16,81 @@ limitations under the License. {% extends "base.html" %} +{% block navbar_start %} + {{ back_to_client::link( + text="← Back", + uri=grant.redirect_uri, + mode=grant.response_mode, + params=dict(error="access_denied", state=grant.state) + ) }} +{% endblock %} + {% block content %}

Authorize {{ grant.client.client_name | default(value=grand.client.client_id) }}

+ +
+
+
+ {% if grant.client.logo_uri %} + + {% endif %} +
+
+
+ {{ grant.client.client_name }} +
+ + {% if grant.client.client_uri %} + + {% endif %} +
+
+ + {% if grant.client.policy_uri or grant.client.tos_uri %} +
+ {% if grant.client.policy_uri %} + {{ button::link_ghost(href=grant.client.policy_uri, text="Privacy policy", class="flex-auto mx-2") }} + {% endif %} + + {% if grant.client.tos_uri %} + {{ button::link_ghost(href=grant.client.tos_uri, text="Terms of services", class="flex-auto mx-2") }} + {% endif %} +
+ {% endif %} +
+
Scope: {{ grant.scope }}
+ - {{ button::button(text="Allow") }} + +
+ {{ button::button(text="Allow") }} + + {{ back_to_client::link( + text="Deny", + class=button::plain_error_class(), + uri=grant.redirect_uri, + mode=grant.response_mode, + params=dict(error="access_denied", state=grant.state) + ) }} +
+ +
+ {{ back_to_client::link( + text="Return to application", + class=button::text_class(), + uri=grant.redirect_uri, + mode=grant.response_mode, + params=dict(error="access_denied", state=grant.state) + ) }} +
{% endblock content %}