make report body actually editable on user report page
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user