2018-03-05 18:18:51 +00:00
|
|
|
import React, { Component } from react
|
|
|
|
|
|
|
|
class MyComponent extends Component {
|
|
|
|
render = () => {
|
|
|
|
return (
|
2016-03-25 00:16:27 +00:00
|
|
|
<div id="yield">
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="centerContent showApp">
|
2016-03-25 00:16:27 +00:00
|
|
|
|
2018-03-05 17:33:16 +00:00
|
|
|
{ link_to t('doorkeeper.applications.buttons.back'), oauth_applications_path(), className: 'button link-button button-margin' }
|
2016-03-25 00:16:27 +00:00
|
|
|
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="page-header">
|
2018-03-04 02:25:42 +00:00
|
|
|
<h2>{ t('.title', name: @application.name) }</h2>
|
2016-03-25 00:16:27 +00:00
|
|
|
</div>
|
|
|
|
|
2018-03-04 02:25:42 +00:00
|
|
|
<h4>{ t('.application_id') }:</h4>
|
|
|
|
<p><code id="application_id">{ @application.uid }</code></p>
|
2016-03-25 00:16:27 +00:00
|
|
|
|
2018-03-04 02:25:42 +00:00
|
|
|
<h4>{ t('.secret') }:</h4>
|
|
|
|
<p><code id="secret">{ @application.secret }</code></p>
|
2016-03-25 00:16:27 +00:00
|
|
|
|
|
|
|
|
2018-03-04 02:25:42 +00:00
|
|
|
<h4>{ t('.callback_urls') }:</h4>
|
2016-03-25 00:16:27 +00:00
|
|
|
|
|
|
|
<table>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ @application.redirect_uri.split.each do |uri| }
|
2016-03-25 00:16:27 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2018-03-04 02:25:42 +00:00
|
|
|
<code>{ uri }</code>
|
2016-03-25 00:16:27 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2018-03-05 17:33:16 +00:00
|
|
|
{ link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code'), className: 'button link-button', target: '_blank' }
|
2016-03-25 00:16:27 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
2016-03-25 00:16:27 +00:00
|
|
|
</table>
|
|
|
|
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="inline-button">{ link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(@application), className: 'button link-button' }</div>
|
2016-03-25 00:16:27 +00:00
|
|
|
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="inline-button">{ render 'delete_form', application: @application, submit_btn_css: 'button red-button' }</div>
|
2016-03-25 00:16:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-05 18:18:51 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MyComponent
|