This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
import { statusValues, type Artefact, Status } from '$lib/artefact';
|
import { statusValues, type Artefact, Status } from '$lib/artefact';
|
||||||
import { Button, Card, Label, Modal, Select } from 'flowbite-svelte';
|
import { Button, Card, Label, Modal, Select } from 'flowbite-svelte';
|
||||||
import MarkdownEditor from './MarkdownEditor.svelte';
|
import MarkdownEditor from './MarkdownEditor.svelte';
|
||||||
import { updateArtefact } from '$lib/artefact.remote';
|
import { getArtefact, updateArtefact } from '$lib/artefact.remote';
|
||||||
let { artefact, tagClick = (_) => {} }: { artefact: Artefact; tagClick?: (tag: string) => void } =
|
let { artefact, tagClick = (_) => {} }: { artefact: Artefact; tagClick?: (tag: string) => void } =
|
||||||
$props();
|
$props();
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
title: '',
|
title: '',
|
||||||
description: '',
|
description: '',
|
||||||
content: '',
|
content: '',
|
||||||
|
dependencies: [],
|
||||||
status: Status.Fehlt
|
status: Status.Fehlt
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -63,6 +64,18 @@
|
|||||||
</button>
|
</button>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-span-2 flex flex-wrap items-start justify-start">
|
||||||
|
{#each artefact.dependencies as dep}
|
||||||
|
{#await getArtefact(dep) then artefact}
|
||||||
|
<a
|
||||||
|
href={`/project/1f30e10f-8ce1-4432-8974-25323e18b929/artefact/${artefact?.uuid}`}
|
||||||
|
class="m-1 flex h-8 items-center overflow-hidden rounded-2xl border-2 border-green-600 bg-green-200 text-sm transition hover:bg-green-300"
|
||||||
|
>
|
||||||
|
<span class="px-3 py-1 text-green-900">{artefact?.title ?? ''}</span>
|
||||||
|
</a>
|
||||||
|
{/await}
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
<p class="col-span-2 my-5">{artefact.description}</p>
|
<p class="col-span-2 my-5">{artefact.description}</p>
|
||||||
|
|
||||||
<p
|
<p
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
import '../app.css';
|
import '../app.css';
|
||||||
import { Navbar, NavBrand, NavLi, NavUl, NavHamburger, Select } from 'flowbite-svelte';
|
import { Navbar, NavBrand, NavLi, NavUl, NavHamburger, Select } from 'flowbite-svelte';
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|
||||||
|
$inspect(state.view);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- <svelte:head>Repo Mod</svelte:head> -->
|
<!-- <svelte:head>Repo Mod</svelte:head> -->
|
||||||
@@ -18,6 +20,9 @@
|
|||||||
<NavUl>
|
<NavUl>
|
||||||
<Select
|
<Select
|
||||||
value={state.view}
|
value={state.view}
|
||||||
|
onchange={(e) => {
|
||||||
|
state.view = (e.target as HTMLSelectElement).value;
|
||||||
|
}}
|
||||||
items={views.map((value) => ({
|
items={views.map((value) => ({
|
||||||
value,
|
value,
|
||||||
name: value
|
name: value
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { page } from '$app/stores';
|
||||||
|
import { getArtefact } from '$lib/artefact.remote';
|
||||||
|
import Artefact from '$lib/components/Artefact.svelte';
|
||||||
|
let artefact: Artefact | undefined = $state(undefined);
|
||||||
|
|
||||||
|
$effect(() => {
|
||||||
|
getArtefact($page.params.artefact_uuid ?? '').then((a) => (artefact = a));
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if artefact}
|
||||||
|
<Artefact {artefact} />
|
||||||
|
{/if}
|
||||||
Reference in New Issue
Block a user