⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
feat: adding dynamic titles
Andrej6c7d5f2a0901
diff --git a/apps/web/src/components/page-title.tsx b/apps/web/src/components/page-title.tsxnew file mode 100644index 000000000..7ed7eba5a--- /dev/null+++ b/apps/web/src/components/page-title.tsx@@ -0,0 +1,24 @@+import { useEffect } from "react";++interface PageTitleProps {+ title: string;+ suffix?: string;+ hideAppName?: boolean;+}++export default function PageTitle({+ title,+ suffix = "Kaneo",+ hideAppName = false,+}: PageTitleProps) {+ useEffect(() => {+ const formattedTitle = hideAppName+ ? title+ : suffix+ ? `${title} · ${suffix}`+ : title;+ document.title = formattedTitle;+ }, [title, suffix, hideAppName]);++ return null;+}diff --git a/apps/web/src/routes/auth/sign-in.tsx b/apps/web/src/routes/auth/sign-in.tsxindex a69e4fc34..ac4a3fbb0 100644--- a/apps/web/src/routes/auth/sign-in.tsx+++ b/apps/web/src/routes/auth/sign-in.tsx@@ -1,3 +1,4 @@+import PageTitle from "@/components/page-title";import { createFileRoute } from "@tanstack/react-router";import { AuthLayout } from "../../components/auth/layout";import { SignInForm } from "../../components/auth/sign-in-form";@@ -9,16 +10,19 @@ export const Route = createFileRoute("/auth/sign-in")({function SignIn() {return (- <AuthLayout- title="Welcome back"- subtitle="Enter your credentials to access your workspace"- >- <SignInForm />- <AuthToggle- message="Don't have an account?"- linkText="Create account"- linkTo="/auth/sign-up"- />- </AuthLayout>+ <>+ <PageTitle title="Sign In" />+ <AuthLayout+ title="Welcome back"+ subtitle="Enter your credentials to access your workspace"+ >+ <SignInForm />+ <AuthToggle+ message="Don't have an account?"+ linkText="Create account"+ linkTo="/auth/sign-up"+ />+ </AuthLayout>+ </>);}diff --git a/apps/web/src/routes/auth/sign-up.tsx b/apps/web/src/routes/auth/sign-up.tsxindex acfbfca9e..b96a054ab 100644--- a/apps/web/src/routes/auth/sign-up.tsx+++ b/apps/web/src/routes/auth/sign-up.tsx@@ -1,6 +1,7 @@import { AuthLayout } from "@/components/auth/layout";import { SignUpForm } from "@/components/auth/sign-up-form";import { AuthToggle } from "@/components/auth/toggle";+import PageTitle from "@/components/page-title";import { createFileRoute } from "@tanstack/react-router";export const Route = createFileRoute("/auth/sign-up")({@@ -9,16 +10,19 @@ export const Route = createFileRoute("/auth/sign-up")({function SignUp() {return (- <AuthLayout- title="Create account"- subtitle="Get started with your free workspace"- >- <SignUpForm />- <AuthToggle- message="Already have an account?"- linkText="Sign in"- linkTo="/auth/sign-in"- />- </AuthLayout>+ <>+ <PageTitle title="Create Account" />+ <AuthLayout+ title="Create account"+ subtitle="Get started with your free workspace"+ >+ <SignUpForm />+ <AuthToggle+ message="Already have an account?"+ linkText="Sign in"+ linkTo="/auth/sign-in"+ />+ </AuthLayout>+ </>);}diff --git a/apps/web/src/routes/dashboard.tsx b/apps/web/src/routes/dashboard.tsxindex e6d8ab735..a12923eff 100644--- a/apps/web/src/routes/dashboard.tsx+++ b/apps/web/src/routes/dashboard.tsx@@ -1,5 +1,6 @@import { Sidebar } from "@/components/common/sidebar";import { DemoAlert } from "@/components/demo-alert";+import PageTitle from "@/components/page-title";import EmptyWorkspaceState from "@/components/workspace/empty-state";import SelectWorkspaceState from "@/components/workspace/select-workspace-state";import { isDemoMode } from "@/constants/urls";@@ -35,6 +36,7 @@ function DashboardIndexRouteComponent() {return (<>+ <PageTitle title="Dashboard" hideAppName={!workspace?.name} /><Sidebar /><main className="w-full overflow-auto scroll-smooth flex flex-col">{isDemoMode && <DemoAlert />}diff --git a/apps/web/src/routes/dashboard/settings/appearance.tsx b/apps/web/src/routes/dashboard/settings/appearance.tsxindex 99f7a6121..45ee1d957 100644--- a/apps/web/src/routes/dashboard/settings/appearance.tsx+++ b/apps/web/src/routes/dashboard/settings/appearance.tsx@@ -1,3 +1,4 @@+import PageTitle from "@/components/page-title";import useTheme from "@/components/providers/theme-provider/hooks/use-theme";import { Switch } from "@/components/ui/switch";import { cn } from "@/lib/cn";@@ -15,130 +16,133 @@ function AppearanceSettings() {const { isSidebarOpened, setIsSidebarOpened } = useUserPreferencesStore();return (- <div className="w-full p-4 md:p-8 max-w-4xl mx-auto">- <motion.div- initial={{ opacity: 0, y: 20 }}- animate={{ opacity: 1, y: 0 }}- className="space-y-6 md:space-y-8"- >- <div>- <h1 className="text-xl md:text-2xl font-semibold text-zinc-900 dark:text-zinc-100">- Appearance- </h1>- <p className="text-sm text-zinc-500 dark:text-zinc-400 mt-1">- Customize how Kaneo looks on your device.- </p>- </div>-- <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">- <div className="p-4 md:p-6">- <h2 className="text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1">- Theme- </h2>- <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-4 md:mb-6">- Select your preferred theme for Kaneo's interface.+ <>+ <PageTitle title="Appearance Settings" />+ <div className="w-full p-4 md:p-8 max-w-4xl mx-auto">+ <motion.div+ initial={{ opacity: 0, y: 20 }}+ animate={{ opacity: 1, y: 0 }}+ className="space-y-6 md:space-y-8"+ >+ <div>+ <h1 className="text-xl md:text-2xl font-semibold text-zinc-900 dark:text-zinc-100">+ Appearance+ </h1>+ <p className="text-sm text-zinc-500 dark:text-zinc-400 mt-1">+ Customize how Kaneo looks on your device.</p>+ </div>- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-4">- {[- {- id: "light",- name: "Light",- icon: Sun,- description: "Light mode for bright environments",- },- {- id: "dark",- name: "Dark",- icon: Moon,- description: "Dark mode for low-light environments",- },- {- id: "system",- name: "System",- icon: Monitor,- description: "Follows your system preferences",- },- ].map((theme) => (- <button- key={theme.id}- onClick={() => {- setSelectedTheme(theme.id as "dark" | "light" | "system");- }}- type="button"- className={cn(- "relative p-4 rounded-lg border transition-all duration-200 text-left",- selectedTheme === theme.id- ? "border-indigo-500 bg-indigo-50 dark:bg-indigo-500/10"- : "border-zinc-200 dark:border-zinc-800 bg-white hover:border-zinc-300 dark:bg-zinc-900 dark:hover:border-zinc-700",- )}- >- <div className="flex flex-col items-start">- <div className="flex items-center gap-2 mb-2">- <theme.icon- className={cn(- "w-5 h-5",- selectedTheme === theme.id- ? "text-indigo-500 dark:text-indigo-400"- : "text-zinc-500 dark:text-zinc-400",- )}- />- <span- className={cn(- "font-medium",- selectedTheme === theme.id- ? "text-indigo-500 dark:text-indigo-400"- : "text-zinc-900 dark:text-zinc-100",- )}- >- {theme.name}- </span>+ <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">+ <div className="p-4 md:p-6">+ <h2 className="text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1">+ Theme+ </h2>+ <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-4 md:mb-6">+ Select your preferred theme for Kaneo's interface.+ </p>++ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-4">+ {[+ {+ id: "light",+ name: "Light",+ icon: Sun,+ description: "Light mode for bright environments",+ },+ {+ id: "dark",+ name: "Dark",+ icon: Moon,+ description: "Dark mode for low-light environments",+ },+ {+ id: "system",+ name: "System",+ icon: Monitor,+ description: "Follows your system preferences",+ },+ ].map((theme) => (+ <button+ key={theme.id}+ onClick={() => {+ setSelectedTheme(theme.id as "dark" | "light" | "system");+ }}+ type="button"+ className={cn(+ "relative p-4 rounded-lg border transition-all duration-200 text-left",+ selectedTheme === theme.id+ ? "border-indigo-500 bg-indigo-50 dark:bg-indigo-500/10"+ : "border-zinc-200 dark:border-zinc-800 bg-white hover:border-zinc-300 dark:bg-zinc-900 dark:hover:border-zinc-700",+ )}+ >+ <div className="flex flex-col items-start">+ <div className="flex items-center gap-2 mb-2">+ <theme.icon+ className={cn(+ "w-5 h-5",+ selectedTheme === theme.id+ ? "text-indigo-500 dark:text-indigo-400"+ : "text-zinc-500 dark:text-zinc-400",+ )}+ />+ <span+ className={cn(+ "font-medium",+ selectedTheme === theme.id+ ? "text-indigo-500 dark:text-indigo-400"+ : "text-zinc-900 dark:text-zinc-100",+ )}+ >+ {theme.name}+ </span>+ </div>+ <p className="text-sm text-zinc-500 dark:text-zinc-400">+ {theme.description}+ </p></div>- <p className="text-sm text-zinc-500 dark:text-zinc-400">- {theme.description}- </p>- </div>- </button>- ))}+ </button>+ ))}+ </div></div></div>- </div>- <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">- <div className="p-4 md:p-6">- <h2 className="text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1">- Interface Preferences- </h2>- <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-4 md:mb-6">- Customize your interface preferences.- </p>+ <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">+ <div className="p-4 md:p-6">+ <h2 className="text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1">+ Interface Preferences+ </h2>+ <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-4 md:mb-6">+ Customize your interface preferences.+ </p>- <div className="space-y-4">- <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">- <div>- <label- htmlFor="sidebar-navigation"- className="text-sm font-medium text-zinc-900 dark:text-zinc-100"- >- Sidebar navigation- </label>- <p className="text-sm text-zinc-500 dark:text-zinc-400">- Show or hide the sidebar- </p>- </div>- <div className="flex items-center">- <Switch- id="sidebar-navigation"- checked={isSidebarOpened}- onCheckedChange={() => setIsSidebarOpened()}- className="data-[state=checked]:bg-indigo-500"- />+ <div className="space-y-4">+ <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">+ <div>+ <label+ htmlFor="sidebar-navigation"+ className="text-sm font-medium text-zinc-900 dark:text-zinc-100"+ >+ Sidebar navigation+ </label>+ <p className="text-sm text-zinc-500 dark:text-zinc-400">+ Show or hide the sidebar+ </p>+ </div>+ <div className="flex items-center">+ <Switch+ id="sidebar-navigation"+ checked={isSidebarOpened}+ onCheckedChange={() => setIsSidebarOpened()}+ className="data-[state=checked]:bg-indigo-500"+ />+ </div></div></div></div></div>- </div>- </motion.div>- </div>+ </motion.div>+ </div>+ </>);}diff --git a/apps/web/src/routes/dashboard/teams/$workspaceId/_layout.tsx b/apps/web/src/routes/dashboard/teams/$workspaceId/_layout.tsxindex c54324476..c76becc73 100644--- a/apps/web/src/routes/dashboard/teams/$workspaceId/_layout.tsx+++ b/apps/web/src/routes/dashboard/teams/$workspaceId/_layout.tsx@@ -1,7 +1,6 @@+import PageTitle from "@/components/page-title";import { Button } from "@/components/ui/button";-import useGetWorkspace from "@/hooks/queries/workspace/use-get-workspace";import { cn } from "@/lib/cn";-import useWorkspaceStore from "@/store/workspace";import {Link,Outlet,@@ -11,7 +10,7 @@ import {import { AnimatePresence, motion } from "framer-motion";import { Shield, Users } from "lucide-react";import { Menu } from "lucide-react";-import { useEffect, useState } from "react";+import { useState } from "react";export const Route = createFileRoute("/dashboard/teams/$workspaceId/_layout")({component: RouteComponent,@@ -21,132 +20,124 @@ function RouteComponent() {const [isMobileNavOpen, setIsMobileNavOpen] = useState(false);const pathname = useRouterState({ select: (s) => s.location.pathname });const { workspaceId } = Route.useParams();- const { setWorkspace } = useWorkspaceStore();-- const { data: workspace } = useGetWorkspace({- workspaceId,- });-- useEffect(() => {- if (workspace) {- setWorkspace(workspace);- }- }, [workspace, setWorkspace]);return (- <div className="flex-1 flex flex-col md:flex-row h-screen">- <motion.div- className="md:hidden border-b border-zinc-200 dark:border-zinc-800 p-4"- initial={{ opacity: 0, y: -10 }}- animate={{ opacity: 1, y: 0 }}- transition={{ duration: 0.2 }}- >- <Button- variant="outline"- size="sm"- onClick={() => setIsMobileNavOpen(!isMobileNavOpen)}- className="flex items-center gap-2 group"+ <>+ <PageTitle title="Team Members" />+ <div className="flex-1 flex flex-col md:flex-row h-screen">+ <motion.div+ className="md:hidden border-b border-zinc-200 dark:border-zinc-800 p-4"+ initial={{ opacity: 0, y: -10 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ duration: 0.2 }}>- <Menu className="w-4 h-4 transition-transform duration-200 ease-in-out group-hover:rotate-90" />- <span>{isMobileNavOpen ? "Close Menu" : "Menu"}</span>- </Button>- </motion.div>-- <AnimatePresence mode="wait">- {(isMobileNavOpen || window.innerWidth >= 768) && (- <motion.aside- initial={{- x: -50,- opacity: 0,- }}- animate={{- x: 0,- opacity: 1,- }}- exit={{- x: -50,- opacity: 0,- }}- transition={{- duration: 0.2,- ease: "easeOut",- }}- className={cn(- "border-b md:border-b-0 md:border-r border-zinc-200 dark:border-zinc-800",- "md:w-64 bg-white dark:bg-zinc-950",- "md:block", // Always show on desktop- isMobileNavOpen ? "block" : "hidden", // Toggle on mobile- )}+ <Button+ variant="outline"+ size="sm"+ onClick={() => setIsMobileNavOpen(!isMobileNavOpen)}+ className="flex items-center gap-2 group">- <div className="p-4 md:p-6">- <motion.h2- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- transition={{ delay: 0.1 }}- className="text-lg font-semibold text-zinc-900 dark:text-zinc-100 mb-4"- >- Team- </motion.h2>- <nav className="space-y-1">- <motion.div- initial={{ opacity: 0, y: 10 }}- animate={{ opacity: 1, y: 0 }}- transition={{ delay: 0.2 }}+ <Menu className="w-4 h-4 transition-transform duration-200 ease-in-out group-hover:rotate-90" />+ <span>{isMobileNavOpen ? "Close Menu" : "Menu"}</span>+ </Button>+ </motion.div>++ <AnimatePresence mode="wait">+ {(isMobileNavOpen || window.innerWidth >= 768) && (+ <motion.aside+ initial={{+ x: -50,+ opacity: 0,+ }}+ animate={{+ x: 0,+ opacity: 1,+ }}+ exit={{+ x: -50,+ opacity: 0,+ }}+ transition={{+ duration: 0.2,+ ease: "easeOut",+ }}+ className={cn(+ "border-b md:border-b-0 md:border-r border-zinc-200 dark:border-zinc-800",+ "md:w-64 bg-white dark:bg-zinc-950",+ "md:block", // Always show on desktop+ isMobileNavOpen ? "block" : "hidden", // Toggle on mobile+ )}+ >+ <div className="p-4 md:p-6">+ <motion.h2+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ transition={{ delay: 0.1 }}+ className="text-lg font-semibold text-zinc-900 dark:text-zinc-100 mb-4">- <Link- className={cn(- "flex items-center px-3 py-2 rounded-lg text-sm transition-all duration-200 ease-in-out",- pathname.includes("/members")- ? "bg-indigo-50 text-indigo-600 dark:bg-indigo-500/10 dark:text-indigo-400"- : "text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-800",- )}- to="/dashboard/teams/$workspaceId/members"- params={{- workspaceId,- }}- onClick={() => setIsMobileNavOpen(false)}+ Team+ </motion.h2>+ <nav className="space-y-1">+ <motion.div+ initial={{ opacity: 0, y: 10 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ delay: 0.2 }}>- <Users className="w-4 h-4 mr-3" />- Members- </Link>- </motion.div>+ <Link+ className={cn(+ "flex items-center px-3 py-2 rounded-lg text-sm transition-all duration-200 ease-in-out",+ pathname.includes("/members")+ ? "bg-indigo-50 text-indigo-600 dark:bg-indigo-500/10 dark:text-indigo-400"+ : "text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-800",+ )}+ to="/dashboard/teams/$workspaceId/members"+ params={{+ workspaceId,+ }}+ onClick={() => setIsMobileNavOpen(false)}+ >+ <Users className="w-4 h-4 mr-3" />+ Members+ </Link>+ </motion.div>- <motion.div- initial={{ opacity: 0, y: 10 }}- animate={{ opacity: 1, y: 0 }}- transition={{ delay: 0.4 }}- >- <div- className={cn(- "flex items-center px-3 py-2 rounded-lg text-sm opacity-50 cursor-not-allowed transition-all duration-200 ease-in-out",- "text-zinc-400 dark:text-zinc-600",- )}+ <motion.div+ initial={{ opacity: 0, y: 10 }}+ animate={{ opacity: 1, y: 0 }}+ transition={{ delay: 0.4 }}>- <Shield className="w-4 h-4 mr-3" />- <span className="flex items-center gap-2">- Roles- <span className="text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400">- Soon+ <div+ className={cn(+ "flex items-center px-3 py-2 rounded-lg text-sm opacity-50 cursor-not-allowed transition-all duration-200 ease-in-out",+ "text-zinc-400 dark:text-zinc-600",+ )}+ >+ <Shield className="w-4 h-4 mr-3" />+ <span className="flex items-center gap-2">+ Roles+ <span className="text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400">+ Soon+ </span></span>- </span>- </div>- </motion.div>- </nav>- </div>- </motion.aside>- )}- </AnimatePresence>+ </div>+ </motion.div>+ </nav>+ </div>+ </motion.aside>+ )}+ </AnimatePresence>- <motion.div- className="flex-1"- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- transition={{ duration: 0.3 }}- >- <div className="h-full overflow-auto">- <Outlet />- </div>- </motion.div>- </div>+ <motion.div+ className="flex-1"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ transition={{ duration: 0.3 }}+ >+ <div className="h-full overflow-auto">+ <Outlet />+ </div>+ </motion.div>+ </div>+ </>);}diff --git a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/board.tsx b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/board.tsxindex 93f4f9bb3..0631a1246 100644--- a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/board.tsx+++ b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/board.tsx@@ -3,6 +3,7 @@ import BoardFilters, {} from "@/components/filters";import KanbanBoard from "@/components/kanban-board";import ListView from "@/components/list-view";+import PageTitle from "@/components/page-title";import useGetTasks from "@/hooks/queries/task/use-get-tasks";import useProjectStore from "@/store/project";import { useUserPreferencesStore } from "@/store/user-preferences";@@ -102,6 +103,9 @@ function RouteComponent() {return (<div className="flex flex-col flex-1">+ <PageTitle+ title={`${project?.name || "Board"} · ${viewMode === "board" ? "Kanban" : "List"}`}+ /><div className="p-4 border-b border-zinc-200 dark:border-zinc-800 flex items-center justify-between flex-wrap gap-2"><h1 className="text-lg font-medium text-zinc-900 dark:text-zinc-100">{project?.name}diff --git a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsx b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsxindex 0c33d2382..99d0b7e3f 100644--- a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsx+++ b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsx@@ -1,3 +1,4 @@+import PageTitle from "@/components/page-title";import { Button } from "@/components/ui/button";import {Form,@@ -116,180 +117,186 @@ function ProjectSettings() {};return (- <div className="h-full flex flex-col bg-white dark:bg-zinc-900 overflow-hidden">- <header className="sticky top-0 z-10 flex items-center px-4 h-[65px] bg-white dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-800">- <div className="flex items-center gap-2 flex-1 min-w-0">- <h1 className="text-lg font-semibold text-zinc-900 dark:text-zinc-100">- Project Settings- </h1>- </div>- </header>+ <>+ <PageTitle title="Project Settings" />+ <div className="h-full flex flex-col bg-white dark:bg-zinc-900 overflow-hidden">+ <header className="sticky top-0 z-10 flex items-center px-4 h-[65px] bg-white dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-800">+ <div className="flex items-center gap-2 flex-1 min-w-0">+ <h1 className="text-lg font-semibold text-zinc-900 dark:text-zinc-100">+ Project Settings+ </h1>+ </div>+ </header>- <div className="flex-1 overflow-y-auto p-4 md:p-8">- <div className="max-w-4xl mx-auto space-y-6 md:space-y-8">- <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">- <div className="p-4 md:p-6">- <h2 className="text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1">- General Settings- </h2>- <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-4">- Basic project information and settings.- </p>+ <div className="flex-1 overflow-y-auto p-4 md:p-8">+ <div className="max-w-4xl mx-auto space-y-6 md:space-y-8">+ <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">+ <div className="p-4 md:p-6">+ <h2 className="text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1">+ General Settings+ </h2>+ <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-4">+ Basic project information and settings.+ </p>- {project ? (- <Form {...form}>- <form- onSubmit={form.handleSubmit(onSubmit)}- className="space-y-6"- >- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">- <FormField- control={form.control}- name="name"- render={({ field }) => (- <FormItem>- <FormLabel>Project Name</FormLabel>- <FormControl>- <Input- {...field}- className="bg-white dark:bg-zinc-800/50"- />- </FormControl>- <FormMessage />- </FormItem>- )}- />+ {project ? (+ <Form {...form}>+ <form+ onSubmit={form.handleSubmit(onSubmit)}+ className="space-y-6"+ >+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">+ <FormField+ control={form.control}+ name="name"+ render={({ field }) => (+ <FormItem>+ <FormLabel>Project Name</FormLabel>+ <FormControl>+ <Input+ {...field}+ className="bg-white dark:bg-zinc-800/50"+ />+ </FormControl>+ <FormMessage />+ </FormItem>+ )}+ />++ <FormField+ control={form.control}+ name="slug"+ render={({ field }) => (+ <FormItem>+ <FormLabel>Project Slug</FormLabel>+ <FormControl>+ <Input+ {...field}+ className="bg-white dark:bg-zinc-800/50 font-mono"+ />+ </FormControl>+ <FormMessage />+ </FormItem>+ )}+ />+ </div><FormFieldcontrol={form.control}- name="slug"+ name="icon"render={({ field }) => (<FormItem>- <FormLabel>Project Slug</FormLabel>+ <FormLabel>Project Icon</FormLabel><FormControl>- <Input- {...field}- className="bg-white dark:bg-zinc-800/50 font-mono"- />+ <div className="relative">+ <div className="grid grid-cols-4 sm:grid-cols-6 md:grid-cols-8 gap-2 max-h-[240px] overflow-y-auto p-2 rounded-lg border border-zinc-200 dark:border-zinc-700/50">+ {Object.entries(icons).map(([name, Icon]) => (+ <button+ key={name}+ type="button"+ onClick={() => field.onChange(name)}+ className={cn(+ "p-3 sm:p-2 rounded-lg transition-colors flex items-center justify-center group",+ field.value === name+ ? "bg-indigo-50 text-indigo-600 dark:bg-indigo-500/10 dark:text-indigo-400"+ : "text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800",+ )}+ title={name}+ >+ <Icon className="w-6 h-6 sm:w-5 sm:h-5" />+ </button>+ ))}+ </div>+ <div className="absolute left-0 right-0 bottom-0 h-8 bg-gradient-to-t from-white dark:from-zinc-900 to-transparent pointer-events-none" />+ </div></FormControl>+ <div className="flex items-center gap-2 mt-2 px-2">+ {createElement(+ icons[field.value as keyof typeof icons],+ {+ className: "w-4 h-4 text-zinc-400",+ },+ )}+ <span className="text-sm text-zinc-500 dark:text-zinc-400">+ {field.value}+ </span>+ </div><FormMessage /></FormItem>)}/>- </div>- <FormField- control={form.control}- name="icon"- render={({ field }) => (- <FormItem>- <FormLabel>Project Icon</FormLabel>- <FormControl>- <div className="relative">- <div className="grid grid-cols-4 sm:grid-cols-6 md:grid-cols-8 gap-2 max-h-[240px] overflow-y-auto p-2 rounded-lg border border-zinc-200 dark:border-zinc-700/50">- {Object.entries(icons).map(([name, Icon]) => (- <button- key={name}- type="button"- onClick={() => field.onChange(name)}- className={cn(- "p-3 sm:p-2 rounded-lg transition-colors flex items-center justify-center group",- field.value === name- ? "bg-indigo-50 text-indigo-600 dark:bg-indigo-500/10 dark:text-indigo-400"- : "text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800",- )}- title={name}- >- <Icon className="w-6 h-6 sm:w-5 sm:h-5" />- </button>- ))}- </div>- <div className="absolute left-0 right-0 bottom-0 h-8 bg-gradient-to-t from-white dark:from-zinc-900 to-transparent pointer-events-none" />- </div>- </FormControl>- <div className="flex items-center gap-2 mt-2 px-2">- {createElement(- icons[field.value as keyof typeof icons],- {- className: "w-4 h-4 text-zinc-400",- },- )}- <span className="text-sm text-zinc-500 dark:text-zinc-400">- {field.value}- </span>- </div>- <FormMessage />- </FormItem>- )}- />-- <Button type="submit" disabled={isPending}>- {isPending ? "Saving..." : "Save Changes"}- </Button>- </form>- </Form>- ) : (- <div className="text-sm text-zinc-500 dark:text-zinc-400">- Select a project to view its settings- </div>- )}+ <Button type="submit" disabled={isPending}>+ {isPending ? "Saving..." : "Save Changes"}+ </Button>+ </form>+ </Form>+ ) : (+ <div className="text-sm text-zinc-500 dark:text-zinc-400">+ Select a project to view its settings+ </div>+ )}+ </div></div>- </div>- {project && (- <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">- <div className="p-4 md:p-6">- <h2 className="text-base font-medium text-red-600 dark:text-red-400 mb-1">- Danger Zone- </h2>- <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-6">- Permanently delete your project. This action cannot be undone.- </p>+ {project && (+ <div className="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800">+ <div className="p-4 md:p-6">+ <h2 className="text-base font-medium text-red-600 dark:text-red-400 mb-1">+ Danger Zone+ </h2>+ <p className="text-sm text-zinc-500 dark:text-zinc-400 mb-6">+ Permanently delete your project. This action cannot be+ undone.+ </p>- <div className="space-y-4">- <div className="p-4 bg-red-500/5 border border-red-200 dark:border-red-500/10 rounded-lg">- <div className="flex items-center gap-3 text-red-600 dark:text-red-400 mb-3">- <AlertTriangle className="w-5 h-5" />- <p className="font-medium">- Warning: This action cannot be undone- </p>+ <div className="space-y-4">+ <div className="p-4 bg-red-500/5 border border-red-200 dark:border-red-500/10 rounded-lg">+ <div className="flex items-center gap-3 text-red-600 dark:text-red-400 mb-3">+ <AlertTriangle className="w-5 h-5" />+ <p className="font-medium">+ Warning: This action cannot be undone+ </p>+ </div>+ <ul className="list-disc list-inside space-y-1 text-sm text-red-600/90 dark:text-red-400/90">+ <li>All tasks will be permanently deleted</li>+ <li>All task history will be removed</li>+ <li>Project settings will be erased</li>+ </ul></div>- <ul className="list-disc list-inside space-y-1 text-sm text-red-600/90 dark:text-red-400/90">- <li>All tasks will be permanently deleted</li>- <li>All task history will be removed</li>- <li>Project settings will be erased</li>- </ul>- </div>- <div>- <label- htmlFor="confirm-project-name"- className="block text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1.5"- >- Type "{project.name}" to confirm deletion- </label>- <div className="flex gap-3">- <Input- value={confirmProjectName}- onChange={(e) => setConfirmProjectName(e.target.value)}- placeholder={project.name}- className="bg-white dark:bg-zinc-800/50"- />- <Button- onClick={handleDeleteProject}- disabled={confirmProjectName !== project.name}- className="bg-red-600 text-white hover:bg-red-500 dark:bg-red-500 dark:hover:bg-red-400 disabled:opacity-50"+ <div>+ <label+ htmlFor="confirm-project-name"+ className="block text-sm font-medium text-zinc-900 dark:text-zinc-100 mb-1.5">- {isDeleting ? "Deleting..." : "Delete Project"}- </Button>+ Type "{project.name}" to confirm deletion+ </label>+ <div className="flex gap-3">+ <Input+ value={confirmProjectName}+ onChange={(e) =>+ setConfirmProjectName(e.target.value)+ }+ placeholder={project.name}+ className="bg-white dark:bg-zinc-800/50"+ />+ <Button+ onClick={handleDeleteProject}+ disabled={confirmProjectName !== project.name}+ className="bg-red-600 text-white hover:bg-red-500 dark:bg-red-500 dark:hover:bg-red-400 disabled:opacity-50"+ >+ {isDeleting ? "Deleting..." : "Delete Project"}+ </Button>+ </div></div></div></div></div>- </div>- )}+ )}+ </div></div></div>- </div>+ </>);}diff --git a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsxindex 264566efe..b6c93e565 100644--- a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx+++ b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx@@ -1,3 +1,4 @@+import PageTitle from "@/components/page-title";import TaskActivities from "@/components/task/task-activities";import TaskComment from "@/components/task/task-comment";import TaskDescription from "@/components/task/task-description";@@ -33,70 +34,76 @@ function TaskEditPage() {}return (- <motion.div- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- className="h-full flex flex-col bg-white dark:bg-zinc-900 overflow-hidden"- >- <header className="sticky top-0 z-10 flex items-center px-4 h-[65px] bg-white dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-800">- <div className="flex items-center gap-2 flex-1 min-w-0">- <Link- to="/dashboard/workspace/$workspaceId/project/$projectId/board"- params={{- workspaceId,- projectId,- }}- className="p-1.5 rounded-md hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors"- >- <X className="w-4 h-4 text-zinc-500 dark:text-zinc-400" />- </Link>- <div className="flex-1 min-w-0">- <div className="text-xs font-mono text-zinc-500 dark:text-zinc-400 mb-0.5">- {project?.slug}-{task?.number}+ <>+ <PageTitle+ title={`${project?.slug}-${task?.number} · ${task?.title || "Task"}`}+ hideAppName+ />+ <motion.div+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ className="h-full flex flex-col bg-white dark:bg-zinc-900 overflow-hidden"+ >+ <header className="sticky top-0 z-10 flex items-center px-4 h-[65px] bg-white dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-800">+ <div className="flex items-center gap-2 flex-1 min-w-0">+ <Link+ to="/dashboard/workspace/$workspaceId/project/$projectId/board"+ params={{+ workspaceId,+ projectId,+ }}+ className="p-1.5 rounded-md hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors"+ >+ <X className="w-4 h-4 text-zinc-500 dark:text-zinc-400" />+ </Link>+ <div className="flex-1 min-w-0">+ <div className="text-xs font-mono text-zinc-500 dark:text-zinc-400 mb-0.5">+ {project?.slug}-{task?.number}+ </div>+ <TaskTitle setIsSaving={setIsSaving} /></div>- <TaskTitle setIsSaving={setIsSaving} /></div>- </div>- <div className="flex items-center gap-1.5 ml-4">- {isSaving && (- <span className="text-xs text-zinc-500 dark:text-zinc-400">- Saving...- </span>- )}- </div>- </header>+ <div className="flex items-center gap-1.5 ml-4">+ {isSaving && (+ <span className="text-xs text-zinc-500 dark:text-zinc-400">+ Saving...+ </span>+ )}+ </div>+ </header>- <div className="flex-1 min-h-0 md:flex-row overflow-auto">- <div className="flex-1 min-w-0 overflow-y-auto border-r border-zinc-200 dark:border-zinc-800 flex flex-col-reverse md:flex-row h-full">- <div className="px-6 py-6 space-y-6 flex-1">- <div className="space-y-8">- <TaskDescription setIsSaving={setIsSaving} />+ <div className="flex-1 min-h-0 md:flex-row overflow-auto">+ <div className="flex-1 min-w-0 overflow-y-auto border-r border-zinc-200 dark:border-zinc-800 flex flex-col-reverse md:flex-row h-full">+ <div className="px-6 py-6 space-y-6 flex-1">+ <div className="space-y-8">+ <TaskDescription setIsSaving={setIsSaving} />- <div className="space-y-4">- <div className="flex items-center justify-between">- <h2 className="text-base font-medium text-zinc-900 dark:text-zinc-100">- Comments & Activity- </h2>- <div className="flex items-center gap-2">- <button- type="button"- className="text-xs text-zinc-500 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"- >- Show all- </button>+ <div className="space-y-4">+ <div className="flex items-center justify-between">+ <h2 className="text-base font-medium text-zinc-900 dark:text-zinc-100">+ Comments & Activity+ </h2>+ <div className="flex items-center gap-2">+ <button+ type="button"+ className="text-xs text-zinc-500 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"+ >+ Show all+ </button>+ </div></div></div>- </div>- <div className="space-y-6">- <TaskComment />- <TaskActivities />+ <div className="space-y-6">+ <TaskComment />+ <TaskActivities />+ </div></div></div>+ {task && <TaskInfo task={task} setIsSaving={setIsSaving} />}</div>- {task && <TaskInfo task={task} setIsSaving={setIsSaving} />}</div>- </div>- </motion.div>+ </motion.div>+ </>);}