make report body actually editable on user report page

This commit is contained in:
2023-09-29 19:40:45 +02:00
parent 722026c938
commit 61ea07d371
2 changed files with 17 additions and 4 deletions

View File

@ -8,9 +8,14 @@
export let reportedName: string;
export let reason: string;
let body: string;
async function submitReport() {
await fetch(`${env.PUBLIC_BASE_PATH}/report/${$page.params.url_hash}`, {
method: 'POST'
method: 'POST',
body: JSON.stringify({
body: body
})
});
}
@ -24,12 +29,17 @@
<form on:submit|preventDefault={() => submitModal.show()}>
<div class="space-y-4 my-4">
<div>
<Input type="text" value={reason} required={true} pickyWidth={false}>
<Input type="text" bind:value={reason} required={true} pickyWidth={false}>
<span slot="label">Report Grund</span>
</Input>
</div>
<div>
<Textarea required={true} rows={4} label="Details über den Report Grund" />
<Textarea
required={true}
rows={4}
label="Details über den Report Grund"
bind:value={body}
/>
</div>
</div>
<div>