From 00531fe2b07efa77417d77a0d1bf3fbfcc81b961 Mon Sep 17 00:00:00 2001 From: Wilfred Asomani Date: Tue, 1 Aug 2023 15:13:18 +0000 Subject: [PATCH] web/satellite/vuetify: add disable MFA dialog Added disable MFA dialog and functionality. Issue: https://github.com/storj/storj/issues/6091 Change-Id: I24cf863b2a04cc147894ab0640e1e1491acc430d --- .../components/dialogs/DisableMFADialog.vue | 198 ++++++++++++++++++ .../components/dialogs/EnableMFADialog.vue | 12 +- .../vuetify-poc/src/views/AccountSettings.vue | 8 +- 3 files changed, 209 insertions(+), 9 deletions(-) create mode 100644 web/satellite/vuetify-poc/src/components/dialogs/DisableMFADialog.vue diff --git a/web/satellite/vuetify-poc/src/components/dialogs/DisableMFADialog.vue b/web/satellite/vuetify-poc/src/components/dialogs/DisableMFADialog.vue new file mode 100644 index 000000000..d939f8867 --- /dev/null +++ b/web/satellite/vuetify-poc/src/components/dialogs/DisableMFADialog.vue @@ -0,0 +1,198 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + \ No newline at end of file diff --git a/web/satellite/vuetify-poc/src/components/dialogs/EnableMFADialog.vue b/web/satellite/vuetify-poc/src/components/dialogs/EnableMFADialog.vue index c0ecdf843..07613e4da 100644 --- a/web/satellite/vuetify-poc/src/components/dialogs/EnableMFADialog.vue +++ b/web/satellite/vuetify-poc/src/components/dialogs/EnableMFADialog.vue @@ -22,7 +22,7 @@ size="small" color="default" :disabled="isLoading" - @click="closeDialog" + @click="model = false" /> @@ -97,7 +97,7 @@ block :disabled="isLoading" :loading="isLoading" - @click="closeDialog" + @click="model = false" > Cancel @@ -130,7 +130,7 @@ color="primary" variant="flat" block - @click="closeDialog" + @click="model = false" > Done @@ -260,11 +260,6 @@ async function showCodes() { } } -function closeDialog() { - model.value = false; - isError.value = false; -} - watch(canvas, async val => { if (!val) return; try { @@ -283,5 +278,6 @@ watch(innerContent, newContent => { // dialog has been closed step.value = 0; confirmPasscode.value = ''; + isError.value = false; }); \ No newline at end of file diff --git a/web/satellite/vuetify-poc/src/views/AccountSettings.vue b/web/satellite/vuetify-poc/src/views/AccountSettings.vue index 6b1e1e137..d5440be11 100644 --- a/web/satellite/vuetify-poc/src/views/AccountSettings.vue +++ b/web/satellite/vuetify-poc/src/views/AccountSettings.vue @@ -88,7 +88,7 @@ @@ -152,6 +152,10 @@ v-model="isEnableMFADialogShown" /> + + @@ -182,6 +186,7 @@ import { Duration } from '@/utils/time'; import ChangePasswordDialog from '@poc/components/dialogs/ChangePasswordDialog.vue'; import ChangeNameDialog from '@poc/components/dialogs/ChangeNameDialog.vue'; import EnableMFADialog from '@poc/components/dialogs/EnableMFADialog.vue'; +import DisableMFADialog from '@poc/components/dialogs/DisableMFADialog.vue'; import SetSessionTimeoutDialog from '@poc/components/dialogs/SetSessionTimeoutDialog.vue'; const usersStore = useUsersStore(); @@ -190,6 +195,7 @@ const notify = useNotify(); const isChangePasswordDialogShown = ref(false); const isChangeNameDialogShown = ref(false); const isEnableMFADialogShown = ref(false); +const isDisableMFADialogShown = ref(false); const isSetSessionTimeoutDialogShown = ref(false); /**