diff options
| author | Zephyrrus <[email protected]> | 2020-07-09 02:24:40 +0300 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2020-07-09 02:24:40 +0300 |
| commit | fd3f6de51a082dcd72c2ef557747e031ef7b9c4a (patch) | |
| tree | 78e655286f6984b171604f3bc15e41eb52b01cef /src/site/pages/dashboard/account.vue | |
| parent | fix: register handler as a plugin (diff) | |
| download | host.fuwn.me-fd3f6de51a082dcd72c2ef557747e031ef7b9c4a.tar.xz host.fuwn.me-fd3f6de51a082dcd72c2ef557747e031ef7b9c4a.zip | |
refactor: refactor most of the admin pages to use the store instead of internal states
Diffstat (limited to 'src/site/pages/dashboard/account.vue')
| -rw-r--r-- | src/site/pages/dashboard/account.vue | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/site/pages/dashboard/account.vue b/src/site/pages/dashboard/account.vue index fb8b273..31ec8af 100644 --- a/src/site/pages/dashboard/account.vue +++ b/src/site/pages/dashboard/account.vue @@ -52,11 +52,11 @@ </b-field> <div class="mb2 mt2 text-center"> - <button - class="button is-primary" + <b-button + type="is-lolisafe" @click="changePassword"> Change password - </button> + </b-button> </div> <b-field @@ -69,19 +69,21 @@ expanded disabled /> <p class="control"> - <button class="button is-primary"> + <b-button + type="is-lolisafe" + @click="copyKey"> Copy - </button> + </b-button> </p> </b-field> </b-field> <div class="mb2 mt2 text-center"> - <button - class="button is-primary" + <b-button + type="is-lolisafe" @click="promptNewAPIKey"> Request new API key - </button> + </b-button> </div> </div> </div> @@ -154,6 +156,10 @@ export default { onConfirm: () => this.requestNewAPIKey(), }); }, + copyKey() { + this.$clipboard(this.apiKey); + this.$notifier.success('API key copied to clipboard'); + }, async requestNewAPIKey() { const response = await this.$store.dispatch('auth/requestAPIKey'); this.$buefy.toast.open(response.message); |