diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-03-01 22:49:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 22:49:29 +0100 |
commit | 1cfa870821c92bdd6854171c8c073ed16529b6df (patch) | |
tree | 76a26e5351c5583290b8656741de7885a928593c /settings/src/components/AuthTokenSection.vue | |
parent | ba155a98db1a03e328972ae3737097eb4d300092 (diff) | |
parent | 102f700d96556424e4b59fcc9fadd65c1a377225 (diff) | |
download | nextcloud-server-1cfa870821c92bdd6854171c8c073ed16529b6df.tar.gz nextcloud-server-1cfa870821c92bdd6854171c8c073ed16529b6df.zip |
Merge pull request #14457 from nextcloud/refactor/auth-tokens-initial-state
Load auth tokens with the initial state API
Diffstat (limited to 'settings/src/components/AuthTokenSection.vue')
-rw-r--r-- | settings/src/components/AuthTokenSection.vue | 23 |
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); |