diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2020-06-06 21:24:47 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2020-06-06 21:24:47 +0000 |
| commit | a5de8db579f6c50c1bbe5659e82bc29eaa588e7f (patch) | |
| tree | 9ab84c6012e3cb68484514920817862b91f1c25d /src/components/user_settings/mfa_totp.js | |
| parent | e47d0f210317c6e04e15fb89eb8f1d469137b779 (diff) | |
| parent | 68482fd3a6870514c7e8bd0fe433f24711e97ce9 (diff) | |
Merge branch 'settings-modal' into 'develop'
Settings modal
See merge request pleroma/pleroma-fe!1118
Diffstat (limited to 'src/components/user_settings/mfa_totp.js')
| -rw-r--r-- | src/components/user_settings/mfa_totp.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/components/user_settings/mfa_totp.js b/src/components/user_settings/mfa_totp.js deleted file mode 100644 index 8408d8e9..00000000 --- a/src/components/user_settings/mfa_totp.js +++ /dev/null @@ -1,49 +0,0 @@ -import Confirm from './confirm.vue' -import { mapState } from 'vuex' - -export default { - props: ['settings'], - data: () => ({ - error: false, - currentPassword: '', - deactivate: false, - inProgress: false // progress peform request to disable otp method - }), - components: { - 'confirm': Confirm - }, - computed: { - isActivated () { - return this.settings.totp - }, - ...mapState({ - backendInteractor: (state) => state.api.backendInteractor - }) - }, - methods: { - doActivate () { - this.$emit('activate') - }, - cancelDeactivate () { this.deactivate = false }, - doDeactivate () { - this.error = null - this.deactivate = true - }, - confirmDeactivate () { // confirm deactivate TOTP method - this.error = null - this.inProgress = true - this.backendInteractor.mfaDisableOTP({ - password: this.currentPassword - }) - .then((res) => { - this.inProgress = false - if (res.error) { - this.error = res.error - return - } - this.deactivate = false - this.$emit('deactivate') - }) - } - } -} |
