diff --git a/apps/web/src/app/status-page/[domain]/_components/header.tsx b/apps/web/src/app/status-page/[domain]/_components/header.tsx index 59f084a9..e897c745 100644 --- a/apps/web/src/app/status-page/[domain]/_components/header.tsx +++ b/apps/web/src/app/status-page/[domain]/_components/header.tsx @@ -43,7 +43,7 @@ export function Header({ navigation, plan, page }: Props) { ) : null} - + {navigation.map(({ label, href, disabled, segment }) => { const active = segment === selectedSegment; return ( diff --git a/apps/web/src/components/dashboard/tabs-link.tsx b/apps/web/src/components/dashboard/tabs-link.tsx index b72830f6..8b7b2a74 100644 --- a/apps/web/src/components/dashboard/tabs-link.tsx +++ b/apps/web/src/components/dashboard/tabs-link.tsx @@ -4,28 +4,39 @@ import * as React from "react"; import type { LinkProps } from "next/link"; import Link from "next/link"; -import { Separator } from "@openstatus/ui"; - import { cn } from "@/lib/utils"; export interface TabsContainerProps - extends React.HTMLAttributes { - hideSeparator?: boolean; -} + extends React.HTMLAttributes, + Partial {} export function TabsContainer({ className, + direction = "horizontal", + position = "end", children, - hideSeparator = false, }: TabsContainerProps) { return ( - + + + ); } @@ -43,18 +54,24 @@ export function TabsLink({ disabled, ...props }: TabsLinkProps) { + const { direction, position } = useTabs(); return (
  • ); } + +// -------------- + +interface TabsContextProps { + direction: "horizontal" | "vertical"; + position: "start" | "end"; +} + +const TabsContext = React.createContext(null); + +const useTabs = () => { + const tabsContext = React.useContext(TabsContext); + + if (!tabsContext) { + throw new Error("useTabs has to be used within "); + } + + return tabsContext; +}; diff --git a/apps/web/src/components/data-table/monitor/columns.tsx b/apps/web/src/components/data-table/monitor/columns.tsx index f56dee7d..c1e94114 100644 --- a/apps/web/src/components/data-table/monitor/columns.tsx +++ b/apps/web/src/components/data-table/monitor/columns.tsx @@ -50,6 +50,15 @@ export const columns: ColumnDef<{ ); }, }, + { + // REMINDER: visibility is handled within the `` + accessorKey: "public", + accessorFn: (row) => row.monitor.public, + filterFn: (row, id, value) => { + if (!Array.isArray(value)) return true; + return value.includes(row.original.monitor.public); + }, + }, { accessorKey: "tags", header: "Tags", diff --git a/apps/web/src/components/data-table/monitor/data-table-toolbar.tsx b/apps/web/src/components/data-table/monitor/data-table-toolbar.tsx index 43903281..a4f7f858 100644 --- a/apps/web/src/components/data-table/monitor/data-table-toolbar.tsx +++ b/apps/web/src/components/data-table/monitor/data-table-toolbar.tsx @@ -40,6 +40,16 @@ export function DataTableToolbar({ }))} /> )} + {table.getColumn("public") && ( + + )} {isFiltered && (