Match layout to Firefly III

This commit is contained in:
James Cole
2018-02-04 15:58:03 +01:00
parent 31a6565e17
commit ae3b369e9a
3 changed files with 55 additions and 55 deletions

View File

@@ -11,41 +11,44 @@
<template> <template>
<div> <div>
<div v-if="tokens.length > 0"> <div v-if="tokens.length > 0">
<div class="panel panel-default"> <div class="box box-primary">
<div class="panel-heading">Authorized Applications</div> <div class="box-header with-border">
<h3 class="box-title">
<div class="panel-body"> Authorized Applications
</h3>
</div>
<div class="box-body">
<!-- Authorized Tokens --> <!-- Authorized Tokens -->
<table class="table table-borderless m-b-none"> <table class="table table-borderless m-b-none">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Scopes</th> <th>Scopes</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="token in tokens"> <tr v-for="token in tokens">
<!-- Client Name --> <!-- Client Name -->
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
{{ token.client.name }} {{ token.client.name }}
</td> </td>
<!-- Scopes --> <!-- Scopes -->
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
<span v-if="token.scopes.length > 0"> <span v-if="token.scopes.length > 0">
{{ token.scopes.join(', ') }} {{ token.scopes.join(', ') }}
</span> </span>
</td> </td>
<!-- Revoke Button --> <!-- Revoke Button -->
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
<a class="action-link text-danger" @click="revoke(token)"> <a class="action-link btn btn-danger btn-xs" @click="revoke(token)">
Revoke Revoke
</a> </a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@@ -92,9 +95,9 @@
*/ */
getTokens() { getTokens() {
axios.get('/oauth/tokens') axios.get('/oauth/tokens')
.then(response => { .then(response => {
this.tokens = response.data; this.tokens = response.data;
}); });
}, },
/** /**
@@ -102,9 +105,9 @@
*/ */
revoke(token) { revoke(token) {
axios.delete('/oauth/tokens/' + token.id) axios.delete('/oauth/tokens/' + token.id)
.then(response => { .then(response => {
this.getTokens(); this.getTokens();
}); });
} }
} }
} }

View File

@@ -10,20 +10,14 @@
<template> <template>
<div> <div>
<div class="panel panel-default"> <div class="box box-primary">
<div class="panel-heading"> <div class="box-header with-border">
<div style="display: flex; justify-content: space-between; align-items: center;"> <h3 class="box-title">
<span>
OAuth Clients OAuth Clients
</span> </h3>
<a class="action-link" @click="showCreateClientForm">
Create New Client
</a>
</div>
</div> </div>
<div class="panel-body"> <div class="box-body">
<!-- Current Clients --> <!-- Current Clients -->
<p class="m-b-none" v-if="clients.length === 0"> <p class="m-b-none" v-if="clients.length === 0">
You have not created any OAuth clients. You have not created any OAuth clients.
@@ -59,14 +53,14 @@
<!-- Edit Button --> <!-- Edit Button -->
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
<a class="action-link" @click="edit(client)"> <a class="action-link btn btn-default btn-xs" @click="edit(client)">
Edit Edit
</a> </a>
</td> </td>
<!-- Delete Button --> <!-- Delete Button -->
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
<a class="action-link text-danger" @click="destroy(client)"> <a class="action-link btn btn-danger btn-xs" @click="destroy(client)">
Delete Delete
</a> </a>
</td> </td>
@@ -74,6 +68,11 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="box-footer">
<a class="action-link btn btn-success" @click="showCreateClientForm">
Create New Client
</a>
</div>
</div> </div>
<!-- Create Client Modal --> <!-- Create Client Modal -->

View File

@@ -11,20 +11,13 @@
<template> <template>
<div> <div>
<div> <div>
<div class="panel panel-default"> <div class="box box-primary">
<div class="panel-heading"> <div class="box-header with-border">
<div style="display: flex; justify-content: space-between; align-items: center;"> <h3 class="box-title">
<span>
Personal Access Tokens Personal Access Tokens
</span> </h3>
<a class="action-link" @click="showCreateTokenForm">
Create New Token
</a>
</div>
</div> </div>
<div class="box-body">
<div class="panel-body">
<!-- No Tokens Notice --> <!-- No Tokens Notice -->
<p class="m-b-none" v-if="tokens.length === 0"> <p class="m-b-none" v-if="tokens.length === 0">
You have not created any personal access tokens. You have not created any personal access tokens.
@@ -56,6 +49,11 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="box-footer">
<a class="action-link btn btn-success" @click="showCreateTokenForm">
Create New Token
</a>
</div>
</div> </div>
</div> </div>