aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_settings/user_settings.vue
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-02-12 21:53:59 +0300
committerMaxim Filippov <colixer@gmail.com>2019-02-28 04:04:26 +0300
commit2c7406d9a8d8e961b99286f317c6ed0a48427853 (patch)
tree0812155e91d39de3bb4fc646aa76e827c7dcafa9 /src/components/user_settings/user_settings.vue
parent058238c3c631520d052327fcab47c997dfe23151 (diff)
Add OAuth Tokens management to settings
Diffstat (limited to 'src/components/user_settings/user_settings.vue')
-rw-r--r--src/components/user_settings/user_settings.vue36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index 983cbda0..ac75ad86 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -122,6 +122,30 @@
</div>
<div class="setting-item">
+ <h2>{{$t('settings.oauth_tokens')}}</h2>
+ <table class="oauth-tokens">
+ <thead>
+ <tr>
+ <th>Token</th>
+ <th>Refresh Token</th>
+ <th>Valid Until</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr v-for="oauthToken in oauthTokens" :key="oauthToken.id">
+ <td>{{oauthToken.token}}</td>
+ <td>{{oauthToken.refreshToken}}</td>
+ <td>{{oauthToken.validUntil}}</td>
+ <td class="actions">
+ <button class="btn btn-default" @click="revokeToken(oauthToken.id)">Revoke</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="setting-item">
<h2>{{$t('settings.delete_account')}}</h2>
<p v-if="!deletingAccount">{{$t('settings.delete_account_description')}}</p>
<div v-if="deletingAccount">
@@ -213,5 +237,17 @@
border-radius: $fallback--avatarRadius;
border-radius: var(--avatarRadius, $fallback--avatarRadius);
}
+
+ .oauth-tokens {
+ width: 100%;
+
+ th {
+ text-align: left;
+ }
+
+ .actions {
+ text-align: right;
+ }
+ }
}
</style>