summaryrefslogtreecommitdiffstats
path: root/settings/src/components/AuthTokenSection.vue
diff options
context:
space:
mode:
Diffstat (limited to 'settings/src/components/AuthTokenSection.vue')
-rw-r--r--settings/src/components/AuthTokenSection.vue23
1 files changed, 6 insertions, 17 deletions
diff --git a/settings/src/components/AuthTokenSection.vue b/settings/src/components/AuthTokenSection.vue
index e5be46fba15..6d70059abd6 100644
--- a/settings/src/components/AuthTokenSection.vue
+++ b/settings/src/components/AuthTokenSection.vue
@@ -24,7 +24,6 @@
<h2>{{ t('settings', 'Devices & sessions') }}</h2>
<p class="settings-hint hidden-when-empty">{{ t('settings', 'Web, desktop and mobile clients currently logged in to your account.') }}</p>
<AuthTokenList :tokens="tokens"
- :loading="loading"
@toggleScope="toggleTokenScope"
@rename="rename"
@delete="deleteToken"/>
@@ -48,31 +47,21 @@
export default {
name: "AuthTokenSection",
+ props: {
+ tokens: {
+ type: Array,
+ requried: true,
+ },
+ },
components: {
AuthTokenSetupDialogue,
AuthTokenList
},
data() {
return {
- loading: true,
baseUrl: OC.generateUrl('/settings/personal/authtokens'),
- tokens: [],
}
},
- mounted() {
- Axios.get(this.baseUrl)
- .then(resp => resp.data)
- .then(tokens => {
- console.debug('loaded app tokens', tokens);
- this.loading = false;
- this.tokens = tokens;
- })
- .catch(err => {
- OC.Notification.showTemporary(t('core', 'Error while loading browser sessions and device tokens'));
- console.error('could not load app tokens', err);
- throw err;
- });
- },
methods: {
addNewToken (name) {
console.debug('creating a new app token', name);