Spaces:
Running
Running
update UI
Browse files- assets/hf-logo.svg +7 -0
- components/editor/header.tsx +1 -1
- components/user-menu/index.tsx +30 -3
assets/hf-logo.svg
ADDED
|
|
components/editor/header.tsx
CHANGED
|
@@ -82,7 +82,7 @@ export function AppEditorHeader({
|
|
| 82 |
Live preview of your app
|
| 83 |
</p>
|
| 84 |
</div>
|
| 85 |
-
<ChevronDown />
|
| 86 |
</Button>
|
| 87 |
<div className="flex items-center justify-end gap-2 max-lg:hidden">
|
| 88 |
{(project?.commits?.length ?? 0) > 0 && (
|
|
|
|
| 82 |
Live preview of your app
|
| 83 |
</p>
|
| 84 |
</div>
|
| 85 |
+
{/* <ChevronDown /> */}
|
| 86 |
</Button>
|
| 87 |
<div className="flex items-center justify-end gap-2 max-lg:hidden">
|
| 88 |
{(project?.commits?.length ?? 0) > 0 && (
|
components/user-menu/index.tsx
CHANGED
|
@@ -3,6 +3,8 @@ import { useSession, signIn, signOut } from "next-auth/react";
|
|
| 3 |
import { ArrowRight, Folder, LogOut, Moon, Plus, Sun } from "lucide-react";
|
| 4 |
import { useTheme } from "next-themes";
|
| 5 |
import { useEffect } from "react";
|
|
|
|
|
|
|
| 6 |
|
| 7 |
import {
|
| 8 |
DropdownMenu,
|
|
@@ -16,7 +18,8 @@ import { Button } from "@/components/ui/button";
|
|
| 16 |
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
| 17 |
import { useProjects } from "@/components/projects/useProjects";
|
| 18 |
import { ProjectCard } from "@/components/projects/project-card";
|
| 19 |
-
import { cn } from "@/lib/utils";
|
|
|
|
| 20 |
|
| 21 |
export function UserMenu() {
|
| 22 |
const { data: session, status } = useSession();
|
|
@@ -125,11 +128,11 @@ export function UserMenu() {
|
|
| 125 |
<DropdownMenuLabel>Projects</DropdownMenuLabel>
|
| 126 |
{projects && projects?.length > 0 ? (
|
| 127 |
<div className="grid grid-cols-1 gap-2 px-2 pb-2">
|
| 128 |
-
{projects?.slice(0,
|
| 129 |
<ProjectCard key={project.id} project={project} />
|
| 130 |
))}
|
| 131 |
<div className="w-full flex items-center justify-between">
|
| 132 |
-
{projects?.length >
|
| 133 |
<Link
|
| 134 |
href="/#projects"
|
| 135 |
className="text-xs text-muted-foreground hover:text-primary flex items-center justify-start gap-1"
|
|
@@ -167,6 +170,30 @@ export function UserMenu() {
|
|
| 167 |
</div>
|
| 168 |
)}
|
| 169 |
</>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
<DropdownMenuSeparator />
|
| 171 |
<DropdownMenuLabel>Theme</DropdownMenuLabel>
|
| 172 |
<div className="flex items-center justify-between gap-2 px-2 pb-2.5">
|
|
|
|
| 3 |
import { ArrowRight, Folder, LogOut, Moon, Plus, Sun } from "lucide-react";
|
| 4 |
import { useTheme } from "next-themes";
|
| 5 |
import { useEffect } from "react";
|
| 6 |
+
import { FaDiscord } from "react-icons/fa6";
|
| 7 |
+
import Image from "next/image";
|
| 8 |
|
| 9 |
import {
|
| 10 |
DropdownMenu,
|
|
|
|
| 18 |
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
| 19 |
import { useProjects } from "@/components/projects/useProjects";
|
| 20 |
import { ProjectCard } from "@/components/projects/project-card";
|
| 21 |
+
import { cn, DISCORD_URL } from "@/lib/utils";
|
| 22 |
+
import HFLogo from "@/assets/hf-logo.svg";
|
| 23 |
|
| 24 |
export function UserMenu() {
|
| 25 |
const { data: session, status } = useSession();
|
|
|
|
| 128 |
<DropdownMenuLabel>Projects</DropdownMenuLabel>
|
| 129 |
{projects && projects?.length > 0 ? (
|
| 130 |
<div className="grid grid-cols-1 gap-2 px-2 pb-2">
|
| 131 |
+
{projects?.slice(0, 2).map((project) => (
|
| 132 |
<ProjectCard key={project.id} project={project} />
|
| 133 |
))}
|
| 134 |
<div className="w-full flex items-center justify-between">
|
| 135 |
+
{projects?.length > 2 && (
|
| 136 |
<Link
|
| 137 |
href="/#projects"
|
| 138 |
className="text-xs text-muted-foreground hover:text-primary flex items-center justify-start gap-1"
|
|
|
|
| 170 |
</div>
|
| 171 |
)}
|
| 172 |
</>
|
| 173 |
+
<>
|
| 174 |
+
<DropdownMenuSeparator />
|
| 175 |
+
<DropdownMenuLabel>Social</DropdownMenuLabel>
|
| 176 |
+
<DropdownMenuItem>
|
| 177 |
+
<Link
|
| 178 |
+
href={DISCORD_URL}
|
| 179 |
+
target="_blank"
|
| 180 |
+
className="flex items-center justify-start gap-2"
|
| 181 |
+
>
|
| 182 |
+
<FaDiscord className="size-4 text-indigo-500" />
|
| 183 |
+
Discord
|
| 184 |
+
</Link>
|
| 185 |
+
</DropdownMenuItem>
|
| 186 |
+
<DropdownMenuItem>
|
| 187 |
+
<Link
|
| 188 |
+
href="https://huggingface.co/enzostvs"
|
| 189 |
+
target="_blank"
|
| 190 |
+
className="flex items-center justify-start gap-2"
|
| 191 |
+
>
|
| 192 |
+
<Image src={HFLogo} alt="HF" className="size-4" />
|
| 193 |
+
Hugging Face
|
| 194 |
+
</Link>
|
| 195 |
+
</DropdownMenuItem>
|
| 196 |
+
</>
|
| 197 |
<DropdownMenuSeparator />
|
| 198 |
<DropdownMenuLabel>Theme</DropdownMenuLabel>
|
| 199 |
<div className="flex items-center justify-between gap-2 px-2 pb-2.5">
|