frontend for xcvr appview

make prettier a lil smidge

+66 -35
+25
src/routes/b/+page.svelte
··· 1 + <script lang="ts"> 2 + const base = import.meta.env.VITE_API_URL; 3 + </script> 4 + 5 + <main> 6 + <h1>try to ban someone</h1> 7 + <p>this probably shouldn't do anything unless you're me</p> 8 + <form action={`${base}/oauth/ban`} method="POST"> 9 + <div> 10 + <label for="user">user to ban: </label> 11 + <input type="text" name="user" id="user" required /> 12 + </div> 13 + <div> 14 + <label for="days">number of days to ban for: </label> 15 + <input type="text" name="days" id="days" /> 16 + </div> 17 + <div> 18 + <label for="reason">reason: </label> 19 + <input type="text" name="reason" id="reason" /> 20 + </div> 21 + <div> 22 + <input type="submit" value="ban" /> 23 + </div> 24 + </form> 25 + </main>
+41 -35
src/routes/b/[id]/+page.svelte
··· 8 8 const base = import.meta.env.VITE_API_URL; 9 9 </script> 10 10 11 - {#if data.ban} 12 - {#await fetchhandle(data.ban.did)} 13 - fetching handle 14 - {:then result} 15 - {result.alsoKnownAs[0]} 16 - {:catch} 17 - error fetching handle 18 - {/await} 19 - ({data.ban.did}) was banned {smartAbsoluteTimestamp(data.ban.bannedAt)} 20 - {#if data.ban.reason} 21 - for {data.ban.reason}. 22 - {/if} 23 - {#if data.ban.till} 24 - the ban will end on {dumbAbsoluteTimestamp(data.ban.till)}. 11 + <main> 12 + {#if data.ban} 13 + {#await fetchhandle(data.ban.did)} 14 + fetching handle 15 + {:then result} 16 + <h1>{result.alsoKnownAs[0]}</h1> 17 + {:catch} 18 + error fetching handle 19 + {/await} 20 + ({data.ban.did}) was banned {smartAbsoluteTimestamp( 21 + Date.parse(data.ban.bannedAt), 22 + )} 23 + {#if data.ban.reason} 24 + for {data.ban.reason}. 25 + {/if} 26 + {#if data.ban.till} 27 + the ban will end on {dumbAbsoluteTimestamp(data.ban.till)}. 28 + {/if} 29 + {:else} 30 + i can't find ban 25 31 {/if} 26 - {:else} 27 - i can't find ban 28 - {/if} 32 + </main> 29 33 30 34 {#if data.myProfile.loggedIn} 31 - try to ban user 32 - <form action={`${base}/oauth/ban`} method="POST"> 33 - <div> 34 - <label for="user">user to ban: </label> 35 - <input type="text" name="user" id="user" required /> 36 - </div> 37 - <div> 38 - <label for="days">number of days to ban for: </label> 39 - <input type="text" name="days" id="days" /> 40 - </div> 41 - <div> 42 - <label for="reason">reason: </label> 43 - <input type="text" name="reason" id="reason" /> 44 - </div> 45 - <div> 46 - <input type="submit" value="ban" /> 47 - </div> 48 - </form> 35 + <aside> 36 + <h3>try to ban user</h3> 37 + <form action={`${base}/oauth/ban`} method="POST"> 38 + <div> 39 + <label for="user">user to ban: </label> 40 + <input type="text" name="user" id="user" required /> 41 + </div> 42 + <div> 43 + <label for="days">number of days to ban for: </label> 44 + <input type="text" name="days" id="days" /> 45 + </div> 46 + <div> 47 + <label for="reason">reason: </label> 48 + <input type="text" name="reason" id="reason" /> 49 + </div> 50 + <div> 51 + <input type="submit" value="ban" /> 52 + </div> 53 + </form> 54 + </aside> 49 55 {/if}