PluralKit/src/lib/system/Main.svelte
2021-12-12 10:31:08 +01:00

29 lines
772 B
Svelte

<script lang="ts">
import { Card, CardBody } from 'sveltestrap';
import CardsHeader from '../CardsHeader.svelte';
import Body from './Body.svelte';
import Privacy from './Privacy.svelte';
import Edit from './Edit.svelte';
import type Sys from '../../api/system';
export let user: Sys;
export let isPublic = true;
let loading = false;
let editMode = false;
</script>
<Card class="mb-4">
<CardsHeader bind:item={user} bind:loading/>
<CardBody style="border-left: 4px solid #{user.color}">
{#if !editMode}
<Body bind:user bind:editMode bind:isPublic/>
{:else}
<Edit bind:user bind:editMode bind:loading />
{/if}
</CardBody>
</Card>
{#if !isPublic}
<Privacy bind:user />
{/if}