tangled
alpha
login
or
join now
moth11.net
/
xcvr
2
fork
atom
frontend for xcvr appview
2
fork
atom
overview
issues
pulls
pipelines
add ban form
moth11.net
5 months ago
d6821a5c
2e910c9d
+19
-1
1 changed file
expand all
collapse all
unified
split
src
routes
b
[id]
+page.svelte
+19
-1
src/routes/b/[id]/+page.svelte
···
5
5
const fetchhandle = async (did: string) => {
6
6
return fetch(`https://plc.directory/${did}`).then((res) => res.json());
7
7
};
8
8
+
const base = import.meta.env.VITE_API_URL;
8
9
</script>
9
10
10
11
{#if data.ban}
···
27
28
{/if}
28
29
29
30
{#if data.myProfile.loggedIn}
30
30
-
try to ban someone (TODO, MAKE UI FOR BAN)
31
31
+
try to ban user
32
32
+
<form action={`${base}/oauth/ban`} method="POST">
33
33
+
<div>
34
34
+
<label for="user">user to ban: </label>
35
35
+
<input type="text" name="user" id="user" required />
36
36
+
</div>
37
37
+
<div>
38
38
+
<label for="days">number of days to ban for: </label>
39
39
+
<input type="text" name="days" id="days" />
40
40
+
</div>
41
41
+
<div>
42
42
+
<label for="reason">reason: </label>
43
43
+
<input type="text" name="reason" id="reason" />
44
44
+
</div>
45
45
+
<div>
46
46
+
<input type="submit" value="ban" />
47
47
+
</div>
48
48
+
</form>
31
49
{/if}