add quick group lookup

This commit is contained in:
Fulmine 2022-03-19 13:15:24 +01:00
parent a48ce4b526
commit 1ddfb68fa3

View File

@ -3,9 +3,11 @@
import { Link, navigate } from 'svelte-navigator';
import FaRocket from 'svelte-icons/fa/FaRocket.svelte';
import FaStar from 'svelte-icons/fa/FaStar.svelte'
import FaMoon from 'svelte-icons/fa/FaMoon.svelte'
let sysInput: string = "";
let memberInput: string = "";
let groupInput: string = "";
</script>
<Container>
@ -60,6 +62,31 @@
</Row>
</CardBody>
</Card>
<Card class="mb-4">
<CardHeader>
<CardTitle style="margin-top: 8px; outline: none;">
<div class="icon d-inline-block">
<FaMoon />
</div>Group Card
</CardTitle>
</CardHeader>
<CardBody>
Submit a <b>group ID</b> to view that group's profile.
<Row>
<Col xs={12} lg={9} class="my-2">
<Input on:keyup={(event) => {if (event.key === "Enter" && groupInput !== "") navigate(`/profile/g/${groupInput.toLowerCase().trim()}`)}} bind:value={groupInput} />
</Col>
<Col xs={12} lg={3} class="my-2 d-flex">
{#if groupInput !== ""}
<Link style="text-decoration: none; flex: 1 0 auto" to="/profile/g/{groupInput.toLowerCase().trim()}"><Button class="w-100" color="primary">View</Button></Link>
{:else}
<Button class="w-100" disabled color="primary">View</Button>
{/if}
</Col>
</Row>
</CardBody>
</Card>
</Col>
</Row>
</Container>