Gab Social. All are welcome.
This commit is contained in:
3
app/views/oauth/authorizations/error.html.haml
Normal file
3
app/views/oauth/authorizations/error.html.haml
Normal file
@@ -0,0 +1,3 @@
|
||||
.form-container
|
||||
.flash-message#error_explanation
|
||||
= @pre_auth.error_response.body[:error_description]
|
||||
26
app/views/oauth/authorizations/new.html.haml
Normal file
26
app/views/oauth/authorizations/new.html.haml
Normal file
@@ -0,0 +1,26 @@
|
||||
- content_for :page_title do
|
||||
= t('doorkeeper.authorizations.new.title')
|
||||
|
||||
.form-container
|
||||
.oauth-prompt
|
||||
%h2= t('doorkeeper.authorizations.new.prompt', client_name: @pre_auth.client.name)
|
||||
|
||||
%p
|
||||
= t('doorkeeper.authorizations.new.able_to')
|
||||
!= @pre_auth.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.map { |s| "<strong>#{s}</strong>" }.to_sentence
|
||||
|
||||
= form_tag oauth_authorization_path, method: :post, class: 'simple_form' do
|
||||
= hidden_field_tag :client_id, @pre_auth.client.uid
|
||||
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
|
||||
= hidden_field_tag :state, @pre_auth.state
|
||||
= hidden_field_tag :response_type, @pre_auth.response_type
|
||||
= hidden_field_tag :scope, @pre_auth.scope
|
||||
= button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
|
||||
|
||||
= form_tag oauth_authorization_path, method: :delete, class: 'simple_form' do
|
||||
= hidden_field_tag :client_id, @pre_auth.client.uid
|
||||
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
|
||||
= hidden_field_tag :state, @pre_auth.state
|
||||
= hidden_field_tag :response_type, @pre_auth.response_type
|
||||
= hidden_field_tag :scope, @pre_auth.scope
|
||||
= button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'
|
||||
4
app/views/oauth/authorizations/show.html.haml
Normal file
4
app/views/oauth/authorizations/show.html.haml
Normal file
@@ -0,0 +1,4 @@
|
||||
.form-container
|
||||
.flash-message
|
||||
%p= t('doorkeeper.authorizations.show.title')
|
||||
%input{ type: 'text', class: 'oauth-code', readonly: true, value: params[:code], onClick: 'select()' }
|
||||
24
app/views/oauth/authorized_applications/index.html.haml
Normal file
24
app/views/oauth/authorized_applications/index.html.haml
Normal file
@@ -0,0 +1,24 @@
|
||||
- content_for :page_title do
|
||||
= t('doorkeeper.authorized_applications.index.title')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('doorkeeper.authorized_applications.index.application')
|
||||
%th= t('doorkeeper.authorized_applications.index.scopes')
|
||||
%th= t('doorkeeper.authorized_applications.index.created_at')
|
||||
%th
|
||||
%tbody
|
||||
- @applications.each do |application|
|
||||
%tr
|
||||
%td
|
||||
- if application.website.blank?
|
||||
= application.name
|
||||
- else
|
||||
= link_to application.name, application.website, target: '_blank', rel: 'noopener'
|
||||
%th!= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('<br />')
|
||||
%td= l application.created_at
|
||||
%td
|
||||
- unless application.superapp?
|
||||
= table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') }
|
||||
Reference in New Issue
Block a user