2021-12-11 14:57:20 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import { Card, CardBody } from 'sveltestrap';
|
|
|
|
import CardsHeader from '../CardsHeader.svelte';
|
2021-12-12 07:01:51 +00:00
|
|
|
import Body from './Body.svelte';
|
|
|
|
import Privacy from './Privacy.svelte';
|
2021-12-12 06:46:57 +00:00
|
|
|
import Edit from './Edit.svelte';
|
2021-12-12 06:45:42 +00:00
|
|
|
import type Sys from '../../api/system';
|
2021-12-11 14:57:20 +00:00
|
|
|
|
2021-12-12 06:45:42 +00:00
|
|
|
export let user: Sys;
|
2021-12-11 17:41:21 +00:00
|
|
|
export let isPublic = true;
|
2021-12-12 09:31:08 +00:00
|
|
|
let loading = false;
|
2021-12-11 14:57:20 +00:00
|
|
|
|
2021-12-11 17:41:21 +00:00
|
|
|
let editMode = false;
|
2021-12-11 14:57:20 +00:00
|
|
|
</script>
|
|
|
|
|
2021-12-11 17:41:21 +00:00
|
|
|
<Card class="mb-4">
|
2021-12-12 06:46:57 +00:00
|
|
|
<CardsHeader bind:item={user} bind:loading/>
|
2021-12-11 14:57:20 +00:00
|
|
|
<CardBody style="border-left: 4px solid #{user.color}">
|
|
|
|
{#if !editMode}
|
2021-12-12 09:31:08 +00:00
|
|
|
<Body bind:user bind:editMode bind:isPublic/>
|
2021-12-11 14:57:20 +00:00
|
|
|
{:else}
|
2021-12-12 06:46:57 +00:00
|
|
|
<Edit bind:user bind:editMode bind:loading />
|
2021-12-11 14:57:20 +00:00
|
|
|
{/if}
|
|
|
|
</CardBody>
|
2021-12-11 17:41:21 +00:00
|
|
|
</Card>
|
|
|
|
|
|
|
|
{#if !isPublic}
|
2021-12-12 07:01:51 +00:00
|
|
|
<Privacy bind:user />
|
2021-12-11 17:41:21 +00:00
|
|
|
{/if}
|