metamaps--metamaps/views/doorkeeper/applications/show.js

47 lines
1.4 KiB
JavaScript
Raw Normal View History

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