| 1 |
{{ define "title"}}{{ t "page.api_keys.title" }}{{ end }} |
| 2 |
|
| 3 |
{{ define "page_header"}} |
| 4 |
<section class="page-header" aria-labelledby="page-header-title"> |
| 5 |
<h1 id="page-header-title">{{ t "page.api_keys.title" }}</h1> |
| 6 |
{{ template "settings_menu" dict "user" .user }} |
| 7 |
</section> |
| 8 |
{{ end }} |
| 9 |
|
| 10 |
{{ define "content"}} |
| 11 |
{{ if .apiKeys }} |
| 12 |
{{ range .apiKeys }} |
| 13 |
<table> |
| 14 |
<tr> |
| 15 |
<th class="column-25">{{ t "page.api_keys.table.description" }}</th> |
| 16 |
<td>{{ .Description }}</td> |
| 17 |
</tr> |
| 18 |
<tr> |
| 19 |
<th>{{ t "page.api_keys.table.token" }}</th> |
| 20 |
<td>{{ .Token }}</td> |
| 21 |
</tr> |
| 22 |
<tr> |
| 23 |
<th>{{ t "page.api_keys.table.last_used_at" }}</th> |
| 24 |
<td> |
| 25 |
{{ if .LastUsedAt }} |
| 26 |
<time datetime="{{ isodate .LastUsedAt }}" title="{{ isodate .LastUsedAt }}">{{ elapsed $.user.Timezone .LastUsedAt }}</time> |
| 27 |
{{ else }} |
| 28 |
{{ t "page.api_keys.never_used" }} |
| 29 |
{{ end }} |
| 30 |
</td> |
| 31 |
</tr> |
| 32 |
<tr> |
| 33 |
<th>{{ t "page.api_keys.table.created_at" }}</th> |
| 34 |
<td> |
| 35 |
<time datetime="{{ isodate .CreatedAt }}" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</time> |
| 36 |
</td> |
| 37 |
</tr> |
| 38 |
<tr> |
| 39 |
<th>{{ t "page.api_keys.table.actions" }}</th> |
| 40 |
<td> |
| 41 |
<a href="#" |
| 42 |
data-confirm="true" |
| 43 |
data-label-question="{{ t "confirm.question" }}" |
| 44 |
data-label-yes="{{ t "confirm.yes" }}" |
| 45 |
data-label-no="{{ t "confirm.no" }}" |
| 46 |
data-label-loading="{{ t "confirm.loading" }}" |
| 47 |
data-url="{{ routePath "/keys/%d/delete" .ID }}">{{ t "action.remove" }}</a> |
| 48 |
</td> |
| 49 |
</tr> |
| 50 |
</table> |
| 51 |
<br> |
| 52 |
{{ end }} |
| 53 |
{{ end }} |
| 54 |
|
| 55 |
<h3>{{ t "page.integration.miniflux_api" }}</h3> |
| 56 |
<div class="panel"> |
| 57 |
<ul> |
| 58 |
<li> |
| 59 |
{{ t "page.integration.miniflux_api_endpoint" }} = <strong>{{ baseURL }}/v1/</strong> |
| 60 |
</li> |
| 61 |
<li> |
| 62 |
{{ t "page.integration.miniflux_api_username" }} = <strong>{{ .user.Username }}</strong> |
| 63 |
</li> |
| 64 |
<li> |
| 65 |
{{ t "page.integration.miniflux_api_password" }} = <strong>{{ t "page.integration.miniflux_api_password_value" }}</strong> |
| 66 |
</li> |
| 67 |
</ul> |
| 68 |
</div> |
| 69 |
|
| 70 |
<p> |
| 71 |
<a href="{{ routePath "/keys/create" }}" class="button button-primary">{{ t "menu.create_api_key" }}</a> |
| 72 |
</p> |
| 73 |
|
| 74 |
{{ end }} |