From 396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b Mon Sep 17 00:00:00 2001 From: Fuwn <50817549+Fuwn@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:09:50 +0000 Subject: Initial commit Created from https://vercel.com/new --- .../admin/websites/AdminWebsitesDataTable.tsx | 13 ++++ .../(main)/admin/websites/AdminWebsitesPage.tsx | 19 +++++ .../(main)/admin/websites/AdminWebsitesTable.tsx | 89 ++++++++++++++++++++++ .../websites/[websiteId]/AdminWebsitePage.tsx | 14 ++++ src/app/(main)/admin/websites/[websiteId]/page.tsx | 12 +++ src/app/(main)/admin/websites/page.tsx | 9 +++ 6 files changed, 156 insertions(+) create mode 100644 src/app/(main)/admin/websites/AdminWebsitesDataTable.tsx create mode 100644 src/app/(main)/admin/websites/AdminWebsitesPage.tsx create mode 100644 src/app/(main)/admin/websites/AdminWebsitesTable.tsx create mode 100644 src/app/(main)/admin/websites/[websiteId]/AdminWebsitePage.tsx create mode 100644 src/app/(main)/admin/websites/[websiteId]/page.tsx create mode 100644 src/app/(main)/admin/websites/page.tsx (limited to 'src/app/(main)/admin/websites') diff --git a/src/app/(main)/admin/websites/AdminWebsitesDataTable.tsx b/src/app/(main)/admin/websites/AdminWebsitesDataTable.tsx new file mode 100644 index 0000000..2105992 --- /dev/null +++ b/src/app/(main)/admin/websites/AdminWebsitesDataTable.tsx @@ -0,0 +1,13 @@ +import { DataGrid } from '@/components/common/DataGrid'; +import { useWebsitesQuery } from '@/components/hooks'; +import { AdminWebsitesTable } from './AdminWebsitesTable'; + +export function AdminWebsitesDataTable() { + const query = useWebsitesQuery(); + + return ( + + {props => } + + ); +} diff --git a/src/app/(main)/admin/websites/AdminWebsitesPage.tsx b/src/app/(main)/admin/websites/AdminWebsitesPage.tsx new file mode 100644 index 0000000..1c2ac92 --- /dev/null +++ b/src/app/(main)/admin/websites/AdminWebsitesPage.tsx @@ -0,0 +1,19 @@ +'use client'; +import { Column } from '@umami/react-zen'; +import { PageHeader } from '@/components/common/PageHeader'; +import { Panel } from '@/components/common/Panel'; +import { useMessages } from '@/components/hooks'; +import { AdminWebsitesDataTable } from './AdminWebsitesDataTable'; + +export function AdminWebsitesPage() { + const { formatMessage, labels } = useMessages(); + + return ( + + + + + + + ); +} diff --git a/src/app/(main)/admin/websites/AdminWebsitesTable.tsx b/src/app/(main)/admin/websites/AdminWebsitesTable.tsx new file mode 100644 index 0000000..cfda595 --- /dev/null +++ b/src/app/(main)/admin/websites/AdminWebsitesTable.tsx @@ -0,0 +1,89 @@ +import { DataColumn, DataTable, Dialog, Icon, MenuItem, Modal, Row, Text } from '@umami/react-zen'; +import Link from 'next/link'; +import { useState } from 'react'; +import { WebsiteDeleteForm } from '@/app/(main)/websites/[websiteId]/settings/WebsiteDeleteForm'; +import { DateDistance } from '@/components/common/DateDistance'; +import { useMessages } from '@/components/hooks'; +import { Edit, Trash, Users } from '@/components/icons'; +import { MenuButton } from '@/components/input/MenuButton'; + +export function AdminWebsitesTable({ data = [] }: { data: any[] }) { + const { formatMessage, labels } = useMessages(); + const [deleteWebsite, setDeleteWebsite] = useState(null); + + return ( + <> + + + {(row: any) => ( + + {row.name} + + )} + + + {(row: any) => {row.domain}} + + + {(row: any) => { + if (row?.team) { + return ( + + + + + + {row?.team?.name} + + + ); + } + return ( + + {row?.user?.username} + + ); + }} + + + {(row: any) => } + + + {(row: any) => { + const { id } = row; + + return ( + + + + + + + {formatMessage(labels.edit)} + + + setDeleteWebsite(id)} + data-test="link-button-delete" + > + + + + + {formatMessage(labels.delete)} + + + + ); + }} + + + + + setDeleteWebsite(null)} /> + + + + ); +} diff --git a/src/app/(main)/admin/websites/[websiteId]/AdminWebsitePage.tsx b/src/app/(main)/admin/websites/[websiteId]/AdminWebsitePage.tsx new file mode 100644 index 0000000..5da82af --- /dev/null +++ b/src/app/(main)/admin/websites/[websiteId]/AdminWebsitePage.tsx @@ -0,0 +1,14 @@ +'use client'; +import { WebsiteSettings } from '@/app/(main)/websites/[websiteId]/settings/WebsiteSettings'; +import { WebsiteProvider } from '@/app/(main)/websites/WebsiteProvider'; +import { Panel } from '@/components/common/Panel'; + +export function AdminWebsitePage({ websiteId }: { websiteId: string }) { + return ( + + + + + + ); +} diff --git a/src/app/(main)/admin/websites/[websiteId]/page.tsx b/src/app/(main)/admin/websites/[websiteId]/page.tsx new file mode 100644 index 0000000..557adbd --- /dev/null +++ b/src/app/(main)/admin/websites/[websiteId]/page.tsx @@ -0,0 +1,12 @@ +import type { Metadata } from 'next'; +import { WebsiteSettingsPage } from '@/app/(main)/settings/websites/[websiteId]/WebsiteSettingsPage'; + +export default async function ({ params }: { params: Promise<{ websiteId: string }> }) { + const { websiteId } = await params; + + return ; +} + +export const metadata: Metadata = { + title: 'Website', +}; diff --git a/src/app/(main)/admin/websites/page.tsx b/src/app/(main)/admin/websites/page.tsx new file mode 100644 index 0000000..d6da9f6 --- /dev/null +++ b/src/app/(main)/admin/websites/page.tsx @@ -0,0 +1,9 @@ +import type { Metadata } from 'next'; +import { AdminWebsitesPage } from './AdminWebsitesPage'; + +export default function () { + return ; +} +export const metadata: Metadata = { + title: 'Websites', +}; -- cgit v1.2.3