feat: add content deletion when deleting account
This commit is contained in:
1 parent
623436933b
commit
2f01e6bf82
1 file changed
+9
-4
@@ -55,6 +55,7 @@
|
|||||||
let deletion = {
|
let deletion = {
|
||||||
modal: false,
|
modal: false,
|
||||||
password: '',
|
password: '',
|
||||||
|
deleteContent: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteAccount(level: number) {
|
async function deleteAccount(level: number) {
|
||||||
@@ -101,12 +102,10 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { jwt } = $profile
|
|
||||||
|
|
||||||
// TODO - add option to delete content
|
|
||||||
await getClient().deleteAccount({
|
await getClient().deleteAccount({
|
||||||
password: deletion.password,
|
password: deletion.password,
|
||||||
delete_content: false,
|
|
||||||
|
delete_content: deletion.deleteContent,
|
||||||
})
|
})
|
||||||
|
|
||||||
profileData.update((pd) => {
|
profileData.update((pd) => {
|
||||||
@@ -148,6 +147,12 @@
|
|||||||
type="password"
|
type="password"
|
||||||
bind:value={deletion.password}
|
bind:value={deletion.password}
|
||||||
/>
|
/>
|
||||||
|
<Checkbox bind:checked={deletion.deleteContent}>
|
||||||
|
Delete content
|
||||||
|
<span slot="description">
|
||||||
|
This will delete ALL of your account's posts and comments.
|
||||||
|
</span>
|
||||||
|
</Checkbox>
|
||||||
</Modal>
|
</Modal>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user