Skip to content

Commit

Permalink
feat: add content deletion when deleting account
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyphyn committed Oct 2, 2023
1 parent 6234369 commit 2f01e6b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/routes/profile/(local_user)/settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
let deletion = {
modal: false,
password: '',
deleteContent: false,
}
async function deleteAccount(level: number) {
Expand Down Expand Up @@ -101,12 +102,10 @@
})
try {
const { jwt } = $profile
// TODO - add option to delete content
await getClient().deleteAccount({
password: deletion.password,
delete_content: false,
delete_content: deletion.deleteContent,
})
profileData.update((pd) => {
Expand Down Expand Up @@ -148,6 +147,12 @@
type="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>
{/if}

Expand Down

0 comments on commit 2f01e6b

Please sign in to comment.