Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
adjust sidebar and general wip
ameer246836654db1e808
diff --git a/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx b/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsxindex e1d7027c5..318d8a4dc 100644--- a/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx+++ b/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx@@ -6,13 +6,13 @@ import { AdminNavItems } from "./AdminNavItems";export const AdminDesktopNav = () => {return (<>- <div className="hidden lg:flex lg:flex-shrink-0 group h-full">- <div className="flex flex-col w-64">- <div className="flex flex-col flex-grow pt-8 pb-4 overflow-y-auto h-full">- <div className="flex flex-col justify-top items-start flex-shrink-0 px-4 h-full">- <div className="flex justify-start w-full">+ <div className="hidden h-full lg:flex lg:flex-shrink-0 group">+ <div className="flex flex-col w-[200px]">+ <div className="flex overflow-y-auto flex-col flex-grow h-full">+ <div className="flex flex-col flex-shrink-0 items-start px-4 h-full justify-top">+ <div className="flex justify-center w-full h-[10vh] items-center"><Link href="/dashboard">- <Logo className="h-9 w-auto" />+ <Logo className="w-auto h-9" /></Link></div><AdminNavItems />diff --git a/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx b/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsxindex 5d866f318..8c47f4597 100644--- a/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx+++ b/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx@@ -1,19 +1,4 @@"use client";-import { usePathname, useRouter } from "next/navigation";-import {- Plus,- LogOut,- ChevronDown,- User,- MoreVertical,- Settings,- MessageSquare,- Share2,- Check,- Building,-} from "lucide-react";-import Link from "next/link";-import { classNames } from "@cap/utils";import {Command,CommandEmpty,@@ -21,10 +6,30 @@ import {CommandInput,CommandItem,DialogTrigger,+ Popover,+ PopoverContent,+ PopoverTrigger,} from "@cap/ui";-import { Popover, PopoverContent, PopoverTrigger } from "@cap/ui";+import { classNames } from "@cap/utils";+import {+ Building,+ Check,+ ChevronDown,+ LogOut,+ MessageSquare,+ MoreVertical,+ Plus,+ Settings,+ Share2,+} from "lucide-react";+import Link from "next/link";+import { usePathname, useRouter } from "next/navigation";import { useState } from "react";+import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";+import { Avatar } from "@/app/s/[videoId]/_components/tabs/Activity";+import { NewSpace } from "@/components/forms/NewSpace";+import { UsageButton } from "@/components/UsageButton";import {Dialog,DialogContent,@@ -32,12 +37,8 @@ import {DialogHeader,DialogTitle,} from "@cap/ui";-import { NewSpace } from "@/components/forms/NewSpace";import { signOut } from "next-auth/react";-import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";-import { UsageButton } from "@/components/UsageButton";import { updateActiveSpace } from "./server";-import { Avatar } from "@/app/s/[videoId]/_components/tabs/Activity";const Clapperboard = ({ className }: { className: string }) => (<svg@@ -114,23 +115,23 @@ export const AdminNavItems = () => {].filter(Boolean);const navItemClass =- "flex items-center justify-start py-2 px-3 rounded-full outline-none tracking-tight w-full";+ "flex items-center justify-start py-2 px-3 rounded-2xl outline-none tracking-tight w-full";const [dialogOpen, setDialogOpen] = useState(false);return (<Dialog open={dialogOpen} onOpenChange={setDialogOpen}>- <div className="w-full py-3 my-4 border-b-2 border-t-2 border-gray-300 border-dotted">+ <div className="px-3 py-2.5 w-full rounded-2xl border border-gray-200"><Popover open={open} onOpenChange={setOpen}><PopoverTrigger asChild><div- className="flex items-center justify-between cursor-pointer"+ className="flex justify-between items-center cursor-pointer"role="combobox"aria-expanded={open}><div className="flex items-center w-full text-left"><div>- <p className="text-[0.875rem]">+ <p className="text-sm font-medium">{activeSpace?.space.name ?? "No space found"}</p></div>@@ -140,10 +141,10 @@ export const AdminNavItems = () => {</div></div></PopoverTrigger>- <PopoverContent className="w-full p-0 z-10 bg-white">+ <PopoverContent className="z-10 p-0 mt-2 w-[calc(100%-20%)] mx-auto bg-white"><Command><CommandInput placeholder="Search spaces..." />- <CommandEmpty>No spaces found.</CommandEmpty>+ <CommandEmpty>No spaces found</CommandEmpty><CommandGroup>{spaceData?.map((space) => {const isSelected = activeSpace?.space.id === space.space.id;@@ -168,9 +169,9 @@ export const AdminNavItems = () => {);})}<DialogTrigger className="w-full">- <CommandItem className=" bg-filler aria-selected:bg-gray-200 rounded-lg">- <Plus className="w-4 h-auto mr-1" />- <span className="text-[0.875rem]">Add new space</span>+ <CommandItem className="rounded-lg bg-filler aria-selected:bg-gray-200">+ <Plus className="mr-1 w-4 h-auto" />+ <span className="text-sm">Add new space</span></CommandItem></DialogTrigger></CommandGroup>@@ -179,10 +180,10 @@ export const AdminNavItems = () => {</Popover></div><nav- className="w-full flex flex-col justify-between h-full"+ className="flex flex-col justify-between w-full h-full"aria-label="Sidebar">- <div className="space-y-1">+ <div className="mt-8 space-y-2.5">{manageNavigation.map((item) => (<div key={item.name}><Link@@ -191,69 +192,68 @@ export const AdminNavItems = () => {href={item.href}className={classNames(pathname.includes(item.href)- ? "bg-white text-black border-[1px] border-gray-200"- : "opacity-50 hover:opacity-75",+ ? "bg-white text-gray-400 border-[1px] border-gray-200 shadow-[0_1.5px_3px_0px] shadow-gray-200"+ : "hover:opacity-75",navItemClass)}><item.icon- className={classNames(- "flex-shrink-0 w-5 h-5 stroke-[1.5px]",- pathname.includes(item.href) ? "text-black" : ""- )}+ className={classNames("flex-shrink-0 w-5 h-5 stroke-[1.5px]")}aria-hidden="true"/>- <span className="text-base ml-2.5 text-black">{item.name}</span>+ <span className="text-base ml-2.5 text-gray-400">+ {item.name}+ </span></Link></div>))}</div><div className="mt-auto">- <div className="w-full mb-3 pb-5 border-b-2 border-gray-200 border-dotted">+ <div className="pb-5 mb-3 w-full border-b-2 border-gray-200 border-dotted"><UsageButton subscribed={isSubscribed} /></div><Popover open={menuOpen} onOpenChange={setMenuOpen}><PopoverTrigger asChild>- <div className="flex items-center justify-between cursor-pointer hover:bg-gray-100 p-2 rounded-lg transition-colors">+ <div className="flex justify-between items-center p-2 rounded-lg transition-colors cursor-pointer hover:bg-gray-100"><div className="flex items-center">- <Avatar name={user.name ?? "User"} className="h-8 w-8" />+ <Avatar name={user.name ?? "User"} className="w-8 h-8" /><span className="ml-2 text-sm">{user.name ?? "User"}</span></div>- <MoreVertical className="h-5 w-5 text-gray-500 group-hover:text-gray-500" />+ <MoreVertical className="w-5 h-5 text-gray-500 group-hover:text-gray-500" /></div></PopoverTrigger>- <PopoverContent className="bg-gray-100 w-48 p-1">+ <PopoverContent className="p-1 w-48 bg-gray-100"><Command><CommandGroup><CommandItem- className="py-2 px-2 rounded-lg hover:bg-gray-200 cursor-pointer group"+ className="px-2 py-2 rounded-lg cursor-pointer hover:bg-gray-200 group"onSelect={() => {router.push("/dashboard/settings");setMenuOpen(false);}}>- <Settings className="mr-2 h-4 w-4 text-gray-400 group-hover:text-gray-500" />- <span className="text-gray-400 group-hover:text-gray-500 text-sm">+ <Settings className="mr-2 w-4 h-4 text-gray-400 group-hover:text-gray-500" />+ <span className="text-sm text-gray-400 group-hover:text-gray-500">Settings</span></CommandItem><CommandItem- className="py-2 px-2 rounded-lg hover:bg-gray-200 cursor-pointer group"+ className="px-2 py-2 rounded-lg cursor-pointer hover:bg-gray-200 group"onSelect={() =>window.open("https://cap.link/discord", "_blank")}>- <MessageSquare className="mr-2 h-4 w-4 text-gray-400 group-hover:text-gray-500" />- <span className="text-gray-400 group-hover:text-gray-500 text-sm">+ <MessageSquare className="mr-2 w-4 h-4 text-gray-400 group-hover:text-gray-500" />+ <span className="text-sm text-gray-400 group-hover:text-gray-500">Chat Support</span></CommandItem><CommandItem- className="py-2 px-2 rounded-lg hover:bg-gray-200 cursor-pointer group"+ className="px-2 py-2 rounded-lg cursor-pointer hover:bg-gray-200 group"onSelect={() => signOut()}>- <LogOut className="mr-2 h-4 w-4 text-gray-400 group-hover:text-gray-500" />- <span className="text-gray-400 group-hover:text-gray-500 text-sm">+ <LogOut className="mr-2 w-4 h-4 text-gray-400 group-hover:text-gray-500" />+ <span className="text-sm text-gray-400 group-hover:text-gray-500">Sign Out</span></CommandItem>diff --git a/apps/web/app/dashboard/caps/Caps.tsx b/apps/web/app/dashboard/caps/Caps.tsxindex ef7a2072c..437e9803d 100644--- a/apps/web/app/dashboard/caps/Caps.tsx+++ b/apps/web/app/dashboard/caps/Caps.tsx@@ -1,13 +1,13 @@"use client";+import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";+import { apiClient } from "@/utils/web-api";+import { VideoMetadata } from "@cap/database/types";import { useRouter, useSearchParams } from "next/navigation";-import toast from "react-hot-toast";import { useEffect, useState } from "react";-import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";+import toast from "react-hot-toast";import { CapCard } from "./components/CapCard";-import { EmptyCapState } from "./components/EmptyCapState";import { CapPagination } from "./components/CapPagination";-import { apiClient } from "@/utils/web-api";-import { VideoMetadata } from "@cap/database/types";+import { EmptyCapState } from "./components/EmptyCapState";type VideoData = {id: string;@@ -80,16 +80,16 @@ export const Caps = ({};return (- <div className="flex flex-col min-h-[calc(100vh-30px)] h-full">- <div className="mb-3">- <h1 className="text-3xl font-medium">My Caps</h1>+ <div className="h-[100vh] flex flex-col items-between gap-5 pt-5">+ <div className="h-[5vh] flex items-center">+ <p className="text-3xl text-gray-500">My Caps</p></div>- <div className="flex-grow flex inner">+ <div className="flex flex-grow h-[90vh] bg-gray-100 rounded-t-2xl p-8 border-[1px] border-gray-200">{data.length === 0 ? (<EmptyCapState userName={user?.name || ""} />) : (<div className="flex flex-col w-full h-full">- <div className="grid grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-4">+ <div className="grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-4">{data.map((cap) => (<CapCardkey={cap.id}diff --git a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx b/apps/web/app/dashboard/caps/components/EmptyCapState.tsxindex fbd212292..1a9433042 100644--- a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx+++ b/apps/web/app/dashboard/caps/components/EmptyCapState.tsx@@ -14,7 +14,7 @@ export const EmptyCapState: React.FC<EmptyCapStateProps> = ({ userName }) => {return (<div className="flex flex-col justify-center items-center w-full"><div className="flex flex-col gap-3 items-center text-center">- <div className="mx-auto w-full max-w-[300px] flex justify-center items-center">+ <div className="mx-auto w-full mb-10 max-w-[450px] flex justify-center items-center"><EmptyCap className="h-[150px] w-[400px]" /></div><div className="flex flex-col items-center">diff --git a/apps/web/app/globals.css b/apps/web/app/globals.cssindex ffc0173d7..dc4d54c9b 100644--- a/apps/web/app/globals.css+++ b/apps/web/app/globals.css@@ -327,15 +327,7 @@ ul {}.dashboard-page {- @apply flex flex-col px-2 py-4;-}--.dashboard-page .inner {- @apply bg-white rounded-[20px] p-[12px] border-[1px] border-gray-200;-}--.dashboard-page .inner {- box-shadow: 0px 8px 16px rgba(18, 22, 31, 0.04);+ @apply flex flex-col;}.dashboard-header {@@ -360,7 +352,7 @@ slot:not(.dashboard-layout slot) {}.dashboard-layout {- @apply bg-gray-100+ @apply bg-gray-50}#scrolling-section slot {