Resolve #2017
This commit is contained in:
parent
7174a55846
commit
3409a51cca
10 changed files with 253 additions and 29 deletions
|
|
@ -101,6 +101,13 @@
|
|||
<ui-button @click="doExport()"><fa :icon="faDownload"/> {{ $t('export') }}</ui-button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<details>
|
||||
<summary>{{ $t('danger-zone') }}</summary>
|
||||
<ui-button @click="deleteAccount()">{{ $t('delete-account') }}</ui-button>
|
||||
</details>
|
||||
</section>
|
||||
</ui-card>
|
||||
</template>
|
||||
|
||||
|
|
@ -283,6 +290,25 @@ export default Vue.extend({
|
|||
type: 'info',
|
||||
text: this.$t('export-requested')
|
||||
});
|
||||
},
|
||||
|
||||
async deleteAccount() {
|
||||
const { canceled: canceled, result: password } = await this.$root.dialog({
|
||||
title: this.$t('enter-password'),
|
||||
input: {
|
||||
type: 'password'
|
||||
}
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
this.$root.api('i/delete-account', {
|
||||
password
|
||||
}).then(() => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('account-deleted')
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue