This commit is contained in:
marko-kraemer 2025-08-27 14:55:55 -07:00
parent d782582d74
commit 7d1c096c8c
4 changed files with 17 additions and 31 deletions

View File

@ -9,7 +9,7 @@ import {
Trash2,
MessagesSquare,
Loader2,
Share2,
ExternalLink,
X,
Check,
History
@ -152,8 +152,8 @@ const ThreadItem: React.FC<{
setSelectedItem({ threadId: thread?.threadId, projectId: thread?.projectId })
setShowShareModal(true)
}}>
<Share2 className="text-muted-foreground" />
<span>Share Chat</span>
<ExternalLink className="text-muted-foreground" />
<span>Share</span>
</DropdownMenuItem>
<DropdownMenuItem asChild>
<a

View File

@ -6,7 +6,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/u
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Alert, AlertDescription } from "@/components/ui/alert"
import { Copy, Share2, Link, Link2Off, Check, Globe, Loader2 } from "lucide-react"
import { Copy, Link, Link2Off, Check, Globe, Loader2 } from "lucide-react"
import { toast } from "sonner"
import { useThreadQuery, useUpdateThreadMutation, useUpdateProject } from "@/hooks/react-query"
import type { JSX } from "react"
@ -191,7 +191,6 @@ export function ShareModal({ isOpen, onClose, threadId, projectId }: ShareModalP
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle className="flex items-center gap-2">
<Share2 className="h-5 w-5" />
Share Chat
</DialogTitle>
</DialogHeader>
@ -248,9 +247,6 @@ export function ShareModal({ isOpen, onClose, threadId, projectId }: ShareModalP
</>
) : (
<div className="text-center space-y-4">
<div className="mx-auto w-12 h-12 bg-muted-foreground/20 rounded-full flex items-center justify-center">
<Share2 className="h-6 w-6" />
</div>
<div className="space-y-2">
<h3 className="text-xl font-semibold">Share this chat</h3>
<p className="text-sm text-muted-foreground">

View File

@ -1,7 +1,7 @@
'use client';
import { Button } from "@/components/ui/button"
import { FolderOpen, Share2, Monitor } from "lucide-react"
import { FolderOpen, ExternalLink, Monitor } from "lucide-react"
import { usePathname } from "next/navigation"
import { toast } from "sonner"
import {
@ -20,12 +20,6 @@ import { ShareModal } from "@/components/sidebar/share-modal"
import { useQueryClient } from "@tanstack/react-query";
import { projectKeys } from "@/hooks/react-query/sidebar/keys";
import { threadKeys } from "@/hooks/react-query/threads/keys";
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { useFeatureFlags } from "@/lib/feature-flags";
interface ThreadSiteHeaderProps {
@ -172,6 +166,16 @@ export function SiteHeader({
{/* Show all buttons on both mobile and desktop - responsive tooltips */}
<TooltipProvider>
<Button
variant="ghost"
onClick={openShareModal}
className="h-9 px-3 cursor-pointer gap-2"
>
<ExternalLink className="h-4 w-4" />
<span>Share</span>
</Button>
<Tooltip>
<TooltipTrigger asChild>
<Button
@ -188,21 +192,7 @@ export function SiteHeader({
</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="ghost"
size="icon"
onClick={openShareModal}
className="h-9 w-9 cursor-pointer"
>
<Share2 className="h-4 w-4" />
</Button>
</TooltipTrigger>
<TooltipContent side={isMobile ? "bottom" : "bottom"}>
<p>Share Chat</p>
</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>

View File

@ -46,7 +46,7 @@ export function LoadingState({
}
}, [showProgress, autoProgress]);
return (
<div className="flex flex-col items-center justify-center h-[calc(100vh-15rem)] overflow-hidden scrollbar-hide py-12 px-6">
<div className="flex flex-col items-center justify-center h-full min-h-[400px] overflow-hidden scrollbar-hide py-12 px-6">
<div className="text-center w-full max-w-sm">
<div className={cn("w-16 h-16 rounded-full mx-auto mb-6 flex items-center justify-center", bgColor)}>
<Icon className={cn("h-8 w-8", iconColor, Icon === Loader2 && "animate-spin")} />