Compare commits
2 Commits
e2d107caa8
...
50f07bb32c
Author | SHA1 | Date |
---|---|---|
Fred Boniface | 50f07bb32c | |
Fred Boniface | 2b1478f685 |
|
@ -3,8 +3,10 @@
|
||||||
import Island from "$lib/islands/island.svelte";
|
import Island from "$lib/islands/island.svelte";
|
||||||
import Nav from "$lib/navigation/nav.svelte";
|
import Nav from "$lib/navigation/nav.svelte";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
import Loading from "$lib/navigation/loading.svelte";
|
||||||
|
|
||||||
const title = "Report Issue";
|
const title = "Report Issue";
|
||||||
|
let isLoading = false;
|
||||||
|
|
||||||
let reportType = "", reportSubject = "", reportMsg = "", reportCollected
|
let reportType = "", reportSubject = "", reportMsg = "", reportCollected
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
@ -26,6 +28,7 @@
|
||||||
|
|
||||||
async function send() {
|
async function send() {
|
||||||
console.log("SEND DATA REQUESTED")
|
console.log("SEND DATA REQUESTED")
|
||||||
|
isLoading = true
|
||||||
const formData = JSON.stringify({
|
const formData = JSON.stringify({
|
||||||
labels: [reportType],
|
labels: [reportType],
|
||||||
subject: reportSubject,
|
subject: reportSubject,
|
||||||
|
@ -37,7 +40,7 @@
|
||||||
`User Message:\n` +
|
`User Message:\n` +
|
||||||
`${reportMsg}`
|
`${reportMsg}`
|
||||||
})
|
})
|
||||||
const url = `https://owlboard.info/api/v1/issue`
|
const url = `https://owlboard.info/misc/issue`
|
||||||
const options = {
|
const options = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: formData
|
body: formData
|
||||||
|
@ -53,6 +56,10 @@
|
||||||
</script>
|
</script>
|
||||||
<Header {title} />
|
<Header {title} />
|
||||||
|
|
||||||
|
{#if isLoading}
|
||||||
|
<Loading />
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if !preFlight}
|
{#if !preFlight}
|
||||||
<p>Any data that you enter here will be visible publicly
|
<p>Any data that you enter here will be visible publicly
|
||||||
<a href="https://git.fjla.uk/OwlBoard/backend/issues" target="_blank">here</a>
|
<a href="https://git.fjla.uk/OwlBoard/backend/issues" target="_blank">here</a>
|
||||||
|
|
Loading…
Reference in New Issue