From e6a78a0805dfb945db9bfc93998b1b61a362f1ba Mon Sep 17 00:00:00 2001 From: glass beadian Date: Mon, 12 Oct 2026 09:13:37 +0000 Subject: [PATCH] Hub nav: Chat tab (branded self-hosted Element at element.occupymedia.cc) --- apps/web/src/app/(main)/more/page.tsx | 26 +++++++++++++++++------ apps/web/src/components/shell/sidebar.tsx | 26 ++++++++++++++--------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/apps/web/src/app/(main)/more/page.tsx b/apps/web/src/app/(main)/more/page.tsx index d7b5d4a..092f6b2 100644 --- a/apps/web/src/app/(main)/more/page.tsx +++ b/apps/web/src/app/(main)/more/page.tsx @@ -11,16 +11,29 @@ const identity = (groups: GroupSummary[]): GroupSummary[] => groups; const identityDrafts = (drafts: DraftRecord[]): DraftRecord[] => drafts; const emptyDrafts: DraftRecord[] = []; -function Tile({ href, title, detail }: { href: string; title: string; detail: string }): React.ReactElement { - return +function Tile({ href, title, detail, external }: { href: string; title: string; detail: string; external?: boolean }): React.ReactElement { + const cls = "flex min-h-[92px] flex-col justify-between rounded-lg border border-border bg-surface p-3.5 hover:border-accent"; + if (external) { + return + ✦{title}{detail} + ; + } + return ✦{title}{detail} ; } -function Row({ href, title, detail }: { href: string; title: string; detail?: string }): React.ReactElement { - return - {title}{detail && {detail}} - +function Row({ href, title, detail, external }: { href: string; title: string; detail?: string; external?: boolean }): React.ReactElement { + const cls = "flex min-h-[56px] items-center justify-between rounded-lg border border-border bg-surface px-3.5 py-3 hover:border-accent"; + if (external) { + return + {title}{detail ? {detail} : null} + ↗ + ; + } + return + {title}{detail ? {detail} : null} + › ; } @@ -64,6 +77,7 @@ export default function MorePage(): React.ReactElement { + diff --git a/apps/web/src/components/shell/sidebar.tsx b/apps/web/src/components/shell/sidebar.tsx index 1e822cb..956bf91 100644 --- a/apps/web/src/components/shell/sidebar.tsx +++ b/apps/web/src/components/shell/sidebar.tsx @@ -8,7 +8,7 @@ import type { DraftRecord } from "../../lib/api-types"; import { LogoMark } from "../brand/logo"; import { NavIcon } from "../brand"; -const NAV = [ +const NAV: { href: string; label: string; external?: boolean }[] = [ { href: "/streams", label: "Streams" }, { href: "/compose", label: "Compose" }, { href: "/calendar", label: "Calendar" }, @@ -18,6 +18,7 @@ const NAV = [ { href: "/approvals", label: "Approvals" }, { href: "/archive", label: "Archive" }, { href: "/files", label: "Files" }, + { href: "https://element.occupymedia.cc", label: "Chat", external: true }, { href: "/analytics", label: "Analytics" }, { href: "/connections", label: "Channels" }, { href: "/team", label: "Team" }, @@ -49,15 +50,20 @@ export function Sidebar(): React.ReactElement {