fixed editor missing peaces
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 0s

This commit is contained in:
2025-03-15 23:48:44 +01:00
parent d9ed115e56
commit 1597d4f113
29 changed files with 203 additions and 141 deletions
+13 -7
View File
@@ -1,5 +1,6 @@
import RenderArticle from "@/components/article/render-article";
import BreadNavigator from "@/components/bread-navigator";
import RenderContent from "@/components/editor/render-content";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { appRoutes } from "@/config";
import { hasPermission, Role } from "@/lib/validation/permissions";
@@ -21,8 +22,9 @@ async function Page({ params }: { params: Promise<{ slug: string }> }) {
return (
<div className="space-y-2">
<div className="flex w-full items-center justify-between">
<div className="w-full">
<div className="flex w-full items-center gap-4">
<BreadNavigator
className="w-full"
links={[
...(article?.category
? [
@@ -38,7 +40,14 @@ async function Page({ params }: { params: Promise<{ slug: string }> }) {
/>
</div>
{isEditor && (
<div className="flex w-full justify-end space-x-2">
<div className="flex w-full items-center justify-end space-x-2">
<Badge
className="size-max"
variant={article.published ? "outline" : "destructive"}
>
{article.published ? "Veröffentlicht" : "Draft"}
</Badge>
<Button asChild variant={"outline"}>
<Link href={appRoutes.editArticle(article.slug)}>
<Edit className="size-4" />
@@ -52,10 +61,7 @@ async function Page({ params }: { params: Promise<{ slug: string }> }) {
)}
</div>
<h1 className="text-4xl font-bold">{article.title}</h1>
{article?.content?.length ? (
<RenderArticle content={article.content} />
) : null}
{article.content && <RenderContent content={article.content} />}
</div>
);
}