Spaces:
Running
Running
ui stuffs
Browse files
components/editor/ask-ai/follow-up-tooltip.tsx
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {
|
| 2 |
+
Popover,
|
| 3 |
+
PopoverContent,
|
| 4 |
+
PopoverTrigger,
|
| 5 |
+
} from "@/components/ui/popover";
|
| 6 |
+
import { Info } from "lucide-react";
|
| 7 |
+
|
| 8 |
+
export const FollowUpTooltip = () => {
|
| 9 |
+
return (
|
| 10 |
+
<Popover>
|
| 11 |
+
<PopoverTrigger asChild>
|
| 12 |
+
<Info className="size-3 text-neutral-300 cursor-pointer" />
|
| 13 |
+
</PopoverTrigger>
|
| 14 |
+
<PopoverContent
|
| 15 |
+
align="start"
|
| 16 |
+
className="!rounded-2xl !p-0 min-w-xs text-center overflow-hidden"
|
| 17 |
+
>
|
| 18 |
+
<header className="bg-neutral-950 px-4 py-3 border-b border-neutral-700/70">
|
| 19 |
+
<p className="text-base text-neutral-200 font-semibold">
|
| 20 |
+
What is a Follow-Up?
|
| 21 |
+
</p>
|
| 22 |
+
</header>
|
| 23 |
+
<main className="p-4">
|
| 24 |
+
<p className="text-sm text-neutral-400">
|
| 25 |
+
A Follow-Up is a request to DeepSite to edit the current HTML
|
| 26 |
+
instead of starting from scratch. This is useful when you want to
|
| 27 |
+
make small changes or improvements to the existing design.
|
| 28 |
+
</p>
|
| 29 |
+
</main>
|
| 30 |
+
</PopoverContent>
|
| 31 |
+
</Popover>
|
| 32 |
+
);
|
| 33 |
+
};
|
components/editor/ask-ai/index.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { useState, useRef } from "react";
|
|
| 4 |
import classNames from "classnames";
|
| 5 |
import { toast } from "sonner";
|
| 6 |
import { useLocalStorage, useUpdateEffect } from "react-use";
|
| 7 |
-
import { ArrowUp, ChevronDown,
|
| 8 |
import { FaStopCircle } from "react-icons/fa";
|
| 9 |
|
| 10 |
import { defaultHTML } from "@/lib/consts";
|
|
@@ -12,20 +12,16 @@ import ProModal from "@/components/pro-modal";
|
|
| 12 |
import { Button } from "@/components/ui/button";
|
| 13 |
import { MODELS } from "@/lib/providers";
|
| 14 |
import { HtmlHistory } from "@/types";
|
| 15 |
-
|
| 16 |
import { Settings } from "@/components/editor/ask-ai/settings";
|
| 17 |
import { LoginModal } from "@/components/login-modal";
|
| 18 |
import { ReImagine } from "@/components/editor/ask-ai/re-imagine";
|
| 19 |
import Loading from "@/components/loading";
|
| 20 |
-
import {
|
| 21 |
-
Popover,
|
| 22 |
-
PopoverContent,
|
| 23 |
-
PopoverTrigger,
|
| 24 |
-
} from "@/components/ui/popover";
|
| 25 |
import { Checkbox } from "@/components/ui/checkbox";
|
| 26 |
import { Tooltip, TooltipTrigger } from "@/components/ui/tooltip";
|
| 27 |
import { TooltipContent } from "@radix-ui/react-tooltip";
|
| 28 |
import { SelectedHtmlElement } from "./selected-html-element";
|
|
|
|
| 29 |
|
| 30 |
export function AskAI({
|
| 31 |
html,
|
|
@@ -403,6 +399,7 @@ export function AskAI({
|
|
| 403 |
</TooltipContent>
|
| 404 |
</Tooltip>
|
| 405 |
)}
|
|
|
|
| 406 |
</div>
|
| 407 |
<div className="flex items-center justify-end gap-2">
|
| 408 |
<Settings
|
|
@@ -444,28 +441,7 @@ export function AskAI({
|
|
| 444 |
/>
|
| 445 |
Follow-Up
|
| 446 |
</label>
|
| 447 |
-
<
|
| 448 |
-
<PopoverTrigger asChild>
|
| 449 |
-
<Info className="size-3 text-neutral-300 cursor-pointer" />
|
| 450 |
-
</PopoverTrigger>
|
| 451 |
-
<PopoverContent
|
| 452 |
-
align="start"
|
| 453 |
-
className="!rounded-2xl !p-0 min-w-xs text-center overflow-hidden"
|
| 454 |
-
>
|
| 455 |
-
<header className="bg-neutral-950 px-4 py-3 border-b border-neutral-700/70">
|
| 456 |
-
<p className="text-base text-neutral-200 font-semibold">
|
| 457 |
-
What is a Follow-Up?
|
| 458 |
-
</p>
|
| 459 |
-
</header>
|
| 460 |
-
<main className="p-4">
|
| 461 |
-
<p className="text-sm text-neutral-400">
|
| 462 |
-
A Follow-Up is a request to DeepSite to edit the current HTML
|
| 463 |
-
instead of starting from scratch. This is useful when you want
|
| 464 |
-
to make small changes or improvements to the existing design.
|
| 465 |
-
</p>
|
| 466 |
-
</main>
|
| 467 |
-
</PopoverContent>
|
| 468 |
-
</Popover>
|
| 469 |
</div>
|
| 470 |
</div>
|
| 471 |
<audio ref={audio} id="audio" className="hidden">
|
|
|
|
| 4 |
import classNames from "classnames";
|
| 5 |
import { toast } from "sonner";
|
| 6 |
import { useLocalStorage, useUpdateEffect } from "react-use";
|
| 7 |
+
import { ArrowUp, ChevronDown, Crosshair } from "lucide-react";
|
| 8 |
import { FaStopCircle } from "react-icons/fa";
|
| 9 |
|
| 10 |
import { defaultHTML } from "@/lib/consts";
|
|
|
|
| 12 |
import { Button } from "@/components/ui/button";
|
| 13 |
import { MODELS } from "@/lib/providers";
|
| 14 |
import { HtmlHistory } from "@/types";
|
| 15 |
+
import { InviteFriends } from "@/components/invite-friends";
|
| 16 |
import { Settings } from "@/components/editor/ask-ai/settings";
|
| 17 |
import { LoginModal } from "@/components/login-modal";
|
| 18 |
import { ReImagine } from "@/components/editor/ask-ai/re-imagine";
|
| 19 |
import Loading from "@/components/loading";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
import { Checkbox } from "@/components/ui/checkbox";
|
| 21 |
import { Tooltip, TooltipTrigger } from "@/components/ui/tooltip";
|
| 22 |
import { TooltipContent } from "@radix-ui/react-tooltip";
|
| 23 |
import { SelectedHtmlElement } from "./selected-html-element";
|
| 24 |
+
import { FollowUpTooltip } from "./follow-up-tooltip";
|
| 25 |
|
| 26 |
export function AskAI({
|
| 27 |
html,
|
|
|
|
| 399 |
</TooltipContent>
|
| 400 |
</Tooltip>
|
| 401 |
)}
|
| 402 |
+
<InviteFriends />
|
| 403 |
</div>
|
| 404 |
<div className="flex items-center justify-end gap-2">
|
| 405 |
<Settings
|
|
|
|
| 441 |
/>
|
| 442 |
Follow-Up
|
| 443 |
</label>
|
| 444 |
+
<FollowUpTooltip />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 445 |
</div>
|
| 446 |
</div>
|
| 447 |
<audio ref={audio} id="audio" className="hidden">
|