1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-20 19:52:09 +00:00
This commit is contained in:
skn 2025-09-24 16:44:58 +02:00 committed by GitHub
commit 539c9d8685
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 4989 additions and 2 deletions

View file

@ -0,0 +1,91 @@
{% extends "layout.html.twig" %}
{% block title %}{{ 'oauth.consent.title'|trans }}{% endblock %}
{% block content %}
<div class="row">
<div class="col s12">
<div class="card-panel">
<div class="row">
<div class="col s12">
<h4>{{ 'oauth.consent.authorize_application'|trans }}</h4>
<p class="flow-text">
<strong>{{ client.name ?? 'oauth.consent.unnamed_application'|trans }}</strong>
{{ 'oauth.consent.wants_access'|trans }}
</p>
{% if scopes|length > 0 %}
<h5>{{ 'oauth.consent.requested_permissions'|trans }}</h5>
<ul class="collection">
{% for scope, description in scopes %}
<li class="collection-item">
<i class="material-icons left">check</i>
<strong>{{ ('oauth.scope.' ~ scope)|trans }}</strong><br>
<span class="grey-text text-darken-1">{{ description }}</span>
</li>
{% endfor %}
</ul>
{% endif %}
<div class="row">
<div class="col s12">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">
<i class="material-icons left">security</i>
{{ 'oauth.consent.security_notice'|trans }}
</span>
<p>{{ 'oauth.consent.security_description'|trans }}</p>
</div>
</div>
</div>
</div>
<form method="post" action="{{ path('oauth2_authorize_consent') }}">
<input type="hidden" name="_token" value="{{ csrf_token('oauth_consent') }}" />
<div class="row">
<div class="col s6">
<button type="submit" name="action" value="deny" class="btn waves-effect waves-light red">
<i class="material-icons left">cancel</i>
{{ 'oauth.consent.deny'|trans }}
</button>
</div>
<div class="col s6 right-align">
<button type="submit" name="action" value="allow" class="btn waves-effect waves-light green">
<i class="material-icons left">check</i>
{{ 'oauth.consent.allow'|trans }}
</button>
</div>
</div>
</form>
<div class="row">
<div class="col s12">
<p class="grey-text text-darken-1">
<small>
<i class="material-icons tiny">info_outline</i>
{{ 'oauth.consent.revoke_info'|trans }}
</small>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ parent() }}
<script>
// Auto-focus the allow button for better UX
document.addEventListener('DOMContentLoaded', function() {
const allowButton = document.querySelector('button[value="allow"]');
if (allowButton) {
allowButton.focus();
}
});
</script>
{% endblock %}