From 7d8aeba9aca2a7d51a251ae577c4046b5b01825e Mon Sep 17 00:00:00 2001 From: Leo dev Date: Tue, 21 Oct 2025 18:59:46 +0200 Subject: [PATCH 1/6] Black theme --- src/app/globals.css | 36 +++++++++++++++++++++++++- src/components/app/SidebarChannels.tsx | 2 +- src/components/app/SidebarDMs.tsx | 2 +- src/lib/clientSettings.ts | 2 +- src/types/settings.ts | 4 +-- 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 7923716..e26f406 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -102,7 +102,7 @@ --chart-3: oklch(0.769 0.188 70.08); --chart-4: oklch(0.627 0.265 303.9); --chart-5: oklch(0.645 0.246 16.439); - --sidebar: oklch(0.205 0 0); + --sidebar: oklch(0.145 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376); --sidebar-primary-foreground: oklch(0.985 0 0); @@ -112,6 +112,40 @@ --sidebar-ring: oklch(0.556 0 0); } +.black { + --background: oklch(0.050 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.150 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.150 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.922 0 0); + --primary-foreground: oklch(0.150 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.215 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.200 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.704 0.191 22.216); + --border: oklch(0.3 0 0 / 70%); + --input: oklch(1 0 0 / 15%); + --ring: oklch(0.556 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.150 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.150 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.556 0 0); +} + @layer base { * { @apply border-border outline-ring/50; diff --git a/src/components/app/SidebarChannels.tsx b/src/components/app/SidebarChannels.tsx index 875740e..15cdc4b 100644 --- a/src/components/app/SidebarChannels.tsx +++ b/src/components/app/SidebarChannels.tsx @@ -26,7 +26,7 @@ export function ChannelItem({ channel }: { channel: Channel }) { export default function SidebarChannels({ server }: { server: Server }) { return ( -
+

{server.name}

diff --git a/src/components/app/SidebarDMs.tsx b/src/components/app/SidebarDMs.tsx index 331be33..9e88f46 100644 --- a/src/components/app/SidebarDMs.tsx +++ b/src/components/app/SidebarDMs.tsx @@ -46,7 +46,7 @@ export default function SidebarDMs({ app }: { app: App }) { }, [query, app.messages, app.profile]); return ( -
+
Date: Wed, 22 Oct 2025 11:55:32 +0200 Subject: [PATCH 2/6] Small sidebar fix --- src/components/app/AppLayout.tsx | 32 +++++++++++++++++++++++-------- src/components/app/SidebarDMs.tsx | 13 +------------ 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/components/app/AppLayout.tsx b/src/components/app/AppLayout.tsx index ec5797b..abed679 100644 --- a/src/components/app/AppLayout.tsx +++ b/src/components/app/AppLayout.tsx @@ -12,6 +12,7 @@ import { Server, Message } from "@/types/types"; import SidebarServers from "./SidebarServers"; import SidebarDMs from "./SidebarDMs"; import SidebarChannels from "./SidebarChannels"; +import DMItem from "./DMItem"; export default function AppLayout({ children, @@ -70,15 +71,30 @@ export default function AppLayout({ app.sidebarOpen && isMobile ? "w-5xl md:w-md" : "w-0 md:w-md" )} > - {/* Left column — servers */} - +
+ +
- {/* Right column — DMs or server channels */} - {server ? ( - - ) : ( - - )} +
+
+ {server ? ( + + ) : ( + + )} +
+ +
+ +
+
{app.sidebarOpen && isMobile ? ( diff --git a/src/components/app/SidebarDMs.tsx b/src/components/app/SidebarDMs.tsx index 9e88f46..c1be647 100644 --- a/src/components/app/SidebarDMs.tsx +++ b/src/components/app/SidebarDMs.tsx @@ -76,7 +76,7 @@ export default function SidebarDMs({ app }: { app: App }) {
- -
- -
); } From 0747cd9440b4b5e845b4ba7b29becaffb89735d5 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Wed, 22 Oct 2025 12:02:59 +0200 Subject: [PATCH 3/6] Start new DM --- src/app/chat/StartNewDM.tsx | 56 +++++++++++++++++++++++++++++++++++++ src/app/chat/page.tsx | 6 ++-- 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 src/app/chat/StartNewDM.tsx diff --git a/src/app/chat/StartNewDM.tsx b/src/app/chat/StartNewDM.tsx new file mode 100644 index 0000000..bfdca60 --- /dev/null +++ b/src/app/chat/StartNewDM.tsx @@ -0,0 +1,56 @@ +"use client"; + +import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuTrigger, + DropdownMenuItem, +} from "@/components/ui/dropdown-menu"; +import { Input } from "@/components/ui/input"; +import { PlusCircle } from "lucide-react"; +import { UserProfile } from "@/hooks/get-user"; +import { useRouter } from "next/navigation"; +import axios from "axios"; + +export default function StartNewDM() { + const [username, setUsername] = useState(""); + const router = useRouter(); + + const handleStartDM = async () => { + const res = await axios.get("/api/profile", { + params: { username }, + }); + const user = res.data as UserProfile; + router.push(`/chat/${user.id}`); + setUsername(""); + }; + + return ( + + + + + + setUsername(e.target.value)} + autoComplete="off" + spellCheck={false} + autoCorrect="off" + autoCapitalize="none" + /> + + + + + ); +} diff --git a/src/app/chat/page.tsx b/src/app/chat/page.tsx index e4bac80..bd85e54 100644 --- a/src/app/chat/page.tsx +++ b/src/app/chat/page.tsx @@ -19,6 +19,7 @@ import { ChevronRight, } from "lucide-react"; import Link from "next/link"; +import StartNewDM from "./StartNewDM"; export default function ChatHub() { const app = useApp(); @@ -122,10 +123,7 @@ export default function ChatHub() {

Quick Actions

- + - +
@@ -46,7 +48,7 @@ export default function LandingPage() { with real-time messaging, secure channels, and seamless collaboration.

-