Skip to content

Commit

Permalink
feat:#684 - Delete account
Browse files Browse the repository at this point in the history
  • Loading branch information
sana7044 committed Jan 2, 2025
1 parent 48d2b54 commit d69c179
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/components/Profile/SettingsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,24 @@
<strong>{{ userStore.getUser.displayName }}</strong>
, are you sure you want to delete your account? This action is irreversible.
</q-card-section>
<q-card-section>
<q-input
v-model="confirmationText"
label="Type DELETE to confirm"
filled
:rules="[(val) => val === 'DELETE' || 'You must type DELETE to confirm']"
/>
</q-card-section>
<q-card-actions align="right">
<q-btn flat label="Cancel" color="primary" v-close-popup />
<q-btn data-test="delete-button" flat label="Delete" color="negative" @click="onDeleteAccount" />
<q-btn
data-test="delete-button"
flat
label="Delete"
color="negative"
:disable="confirmationText !== 'DELETE'"
@click="onDeleteAccount"
/>
</q-card-actions>
</q-card>
</q-dialog>
Expand All @@ -42,6 +57,7 @@ const deleteDialog = ref({
show: false,
author: userStore.getUser
})
const confirmationText = ref('')
function onLogout() {
if (customWeb3modal.getAddress()) {
Expand All @@ -53,6 +69,7 @@ function onLogout() {
function openDeleteConfirmationDialog() {
deleteDialog.value.show = true
confirmationText.value = ''
}
async function onDeleteAccount() {
Expand Down

0 comments on commit d69c179

Please sign in to comment.