aboutsummaryrefslogtreecommitdiff
path: root/src/site/pages/dashboard/account.vue
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-03-19 07:58:36 +0000
committerPitu <[email protected]>2019-03-19 07:58:36 +0000
commit107d1f4750e8f82a628b528c4ec200e918be271d (patch)
tree0225bca3fd2a27e81b2ff711e53278cee890fdab /src/site/pages/dashboard/account.vue
parentadd restart at the end of update command (diff)
downloadhost.fuwn.me-107d1f4750e8f82a628b528c4ec200e918be271d.tar.xz
host.fuwn.me-107d1f4750e8f82a628b528c4ec200e918be271d.zip
API key WIP
Diffstat (limited to 'src/site/pages/dashboard/account.vue')
-rw-r--r--src/site/pages/dashboard/account.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/site/pages/dashboard/account.vue b/src/site/pages/dashboard/account.vue
index 3ff6c70..b0b90a3 100644
--- a/src/site/pages/dashboard/account.vue
+++ b/src/site/pages/dashboard/account.vue
@@ -67,7 +67,8 @@
message="This API key lets you use the service from other apps"
horizontal>
<b-input v-model="user.apiKey"
- expanded />
+ expanded
+ disabled />
</b-field>
<div class="mb2 mt2 text-center">
@@ -130,7 +131,8 @@ export default {
},
promptNewAPIKey() {
this.$dialog.confirm({
- message: 'Are you sure you want to regenerate your API key?',
+ type: 'is-danger',
+ message: 'Are you sure you want to regenerate your API key? If you had a previous API key generated it will stop working. Make sure to write it down as this is the only time its gonna be displayed to you.',
onConfirm: () => this.requestNewAPIKey()
});
},
@@ -139,6 +141,7 @@ export default {
const response = await this.axios.post(`${this.config.baseURL}/user/apikey/change`);
this.user.apiKey = response.data.apiKey;
this.$toast.open(response.data.message);
+ this.$forceUpdate();
} catch (error) {
this.$onPromiseError(error);
}