diff --git a/src/lib/components/documents/Access.svelte b/src/lib/components/documents/Access.svelte index bae8c4851..a07c21644 100644 --- a/src/lib/components/documents/Access.svelte +++ b/src/lib/components/documents/Access.svelte @@ -32,7 +32,6 @@ import type { Access } from "@/lib/api/types"; import type { Level } from "$lib/components/inputs/AccessLevel.svelte"; - import SidebarItem from "$lib/components/sidebar/SidebarItem.svelte"; export let level: Level; diff --git a/src/lib/components/documents/Header.svelte b/src/lib/components/documents/Header.svelte index f6aad2a28..d31d90429 100644 --- a/src/lib/components/documents/Header.svelte +++ b/src/lib/components/documents/Header.svelte @@ -12,6 +12,7 @@ import { ALLOWED_TAGS, ALLOWED_ATTR } from "@/config/config.js"; import { remToPx } from "@/lib/utils/layout"; + import Access, { getLevel } from "./Access.svelte"; export let document: Document; @@ -27,37 +28,52 @@ function clean(html: string) { return DOMPurify.sanitize(html, { ALLOWED_TAGS, ALLOWED_ATTR }); } + + $: access = getLevel(document.access); -
-

{document.title}

+
+ {#if access} +
+ +
+ {/if} +

{document.title}

{#if description} -
+
{@html description}
{/if}