Some bug and visuals improvements.

This commit is contained in:
charlesgauthereau
2025-07-26 22:23:00 +02:00
parent 847a567c52
commit 7be542f676
21 changed files with 410 additions and 322 deletions
@@ -1,28 +1,20 @@
"use client";
import { authClient } from "@/lib/auth/auth-client";
import { PageParams } from "@/types/next";
import {Page, PageHeader, PageTitle} from "@/features/layout/page";
export default function RoutePage(props: PageParams<{}>) {
const { data: activeOrganization } = authClient.useActiveOrganization();
export default async function RoutePage(props: PageParams<{}>) {
return (
<Page>
<PageHeader>
<PageTitle>Dashboard</PageTitle>
</PageHeader>
<div className="flex flex-1 flex-col gap-4">
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
<div className="aspect-video rounded-xl bg-muted/50" />
<div className="aspect-video rounded-xl bg-muted/50" />
<div className="aspect-video rounded-xl bg-muted/50" />
</div>
{/*<div className="min-h-[100vh] flex-1 rounded-xl bg-muted/50 md:min-h-min" />*/}
{/*{JSON.stringify(activeOrganization)}*/}
{/*{activeOrganization?.name}*/}
</div>
</Page>
);
@@ -69,7 +69,12 @@ export default async function RoutePage(props: PageParams<{
numberOfColumns={1}
extendedProps={proj}
/>
) : null}
) : (
<div className="flex flex-col items-center justify-center h-full text-muted-foreground py-20">
<p className="text-lg font-medium">No databases found</p>
<p className="text-sm mt-2">You havent added any databases to this project yet.</p>
</div>
)}
</PageContent>
</Page>
);
@@ -41,7 +41,7 @@ export default async function RoutePage(props: PageParams<{ }>) {
)}
</PageHeader>
<PageContent className="mt-10">
<PageContent>
{projects.length > 0 ? (
<CardsWithPagination organizationSlug={organization.slug} data={projects} cardItem={ProjectCard}
cardsPerPage={4} numberOfColumns={1}/>
@@ -7,6 +7,9 @@ import {
DeleteOrganizationButton
} from "@/components/wrappers/dashboard/organization/DeleteOrganization/DeleteOrganizationButton";
import {EditButtonSettings} from "@/components/wrappers/dashboard/settings/EditButtonSettings/EditButtonSettings";
import {
SettingsOrganizationMembersTable
} from "@/components/wrappers/dashboard/settings/settings-organization-members-table";
export default async function RoutePage(props: PageParams<{ slug: string }>) {
@@ -17,11 +20,14 @@ export default async function RoutePage(props: PageParams<{ slug: string }>) {
notFound();
}
console.log(organization);
return (
<Page>
<PageHeader>
<PageTitle className="flex items-center">
Settings
Organization settings
{organization.slug != "default" ?
<EditButtonSettings/>
: null}
@@ -32,11 +38,11 @@ export default async function RoutePage(props: PageParams<{ slug: string }>) {
: null}
</PageActions>
</PageHeader>
<PageDescription>
Manage your organization settings.
</PageDescription>
{/*<PageDescription>*/}
{/* Manage your organization settings.*/}
{/*</PageDescription>*/}
<PageContent>
{/* TODO add the list of organisation members (add, remove, edit) */}
<SettingsOrganizationMembersTable organization={organization} />
</PageContent>
</Page>
)