discourse/app/assets/javascripts/admin/templates/api-keys.hbs

36 lines
1006 B
Handlebars
Raw Normal View History

{{#if model}}
2018-07-02 23:14:53 -04:00
<table class='api-keys grid'>
<thead>
<th>{{i18n 'admin.api.key'}}</th>
<th>{{i18n 'admin.api.user'}}</th>
<th>&nbsp;</th>
2018-07-02 23:14:53 -04:00
</thead>
<tbody>
{{#each model as |k|}}
<tr>
<td class='key'>{{k.key}}</td>
<td class="key-user">
{{#if k.user}}
{{#link-to 'adminUser' k.user}}
{{avatar k.user imageSize="small"}}
{{/link-to}}
{{else}}
{{i18n 'admin.api.all_users'}}
{{/if}}
</td>
<td class="key-controls">
{{d-button action="regenerateKey" actionParam=k icon="undo" label='admin.api.regenerate'}}
{{d-button action="revokeKey" actionParam=k icon="times" label='admin.api.revoke'}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
<p>{{i18n 'admin.api.none'}}</p>
{{/if}}
{{#unless hasMasterKey}}
2018-07-02 23:14:53 -04:00
<button class='btn btn-icon no-text btn-primary' {{action "generateMasterKey"}}>{{d-icon "key"}}</button>
{{/unless}}