Spaces:
Running
Running
responsive user fullname + help button
Browse files
components/editor/ask-ai/index.tsx
CHANGED
|
@@ -417,7 +417,7 @@ export function AskAI({
|
|
| 417 |
onModelChange={setModel}
|
| 418 |
open={openProvider}
|
| 419 |
error={providerError}
|
| 420 |
-
isFollowUp={!isSameHtml}
|
| 421 |
onClose={setOpenProvider}
|
| 422 |
/>
|
| 423 |
<Button
|
|
@@ -445,6 +445,9 @@ export function AskAI({
|
|
| 445 |
id="diff-patch-checkbox"
|
| 446 |
checked={isFollowUp}
|
| 447 |
onCheckedChange={(e) => {
|
|
|
|
|
|
|
|
|
|
| 448 |
setIsFollowUp(e === true);
|
| 449 |
}}
|
| 450 |
/>
|
|
|
|
| 417 |
onModelChange={setModel}
|
| 418 |
open={openProvider}
|
| 419 |
error={providerError}
|
| 420 |
+
isFollowUp={!isSameHtml && isFollowUp}
|
| 421 |
onClose={setOpenProvider}
|
| 422 |
/>
|
| 423 |
<Button
|
|
|
|
| 445 |
id="diff-patch-checkbox"
|
| 446 |
checked={isFollowUp}
|
| 447 |
onCheckedChange={(e) => {
|
| 448 |
+
if (e === true && !isSameHtml) {
|
| 449 |
+
setModel(MODELS[0].value);
|
| 450 |
+
}
|
| 451 |
setIsFollowUp(e === true);
|
| 452 |
}}
|
| 453 |
/>
|
components/editor/ask-ai/settings.tsx
CHANGED
|
@@ -74,14 +74,6 @@ export function Settings({
|
|
| 74 |
Customize Settings
|
| 75 |
</header>
|
| 76 |
<main className="px-4 pt-5 pb-6 space-y-5">
|
| 77 |
-
{/* <a
|
| 78 |
-
href="https://huggingface.co/spaces/enzostvs/deepsite/discussions/74"
|
| 79 |
-
target="_blank"
|
| 80 |
-
className="w-full flex items-center justify-between text-neutral-300 bg-neutral-300/15 border border-neutral-300/15 pl-4 p-1.5 rounded-full text-sm font-medium hover:brightness-95"
|
| 81 |
-
>
|
| 82 |
-
How to use it locally?
|
| 83 |
-
<Button size="xs">See guide</Button>
|
| 84 |
-
</a> */}
|
| 85 |
{error !== "" && (
|
| 86 |
<p className="text-red-500 text-sm font-medium mb-2 flex items-center justify-between bg-red-500/10 p-2 rounded-md">
|
| 87 |
{error}
|
|
|
|
| 74 |
Customize Settings
|
| 75 |
</header>
|
| 76 |
<main className="px-4 pt-5 pb-6 space-y-5">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
{error !== "" && (
|
| 78 |
<p className="text-red-500 text-sm font-medium mb-2 flex items-center justify-between bg-red-500/10 p-2 rounded-md">
|
| 79 |
{error}
|
components/editor/footer/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import classNames from "classnames";
|
| 2 |
import { FaMobileAlt } from "react-icons/fa";
|
| 3 |
-
import { RefreshCcw, SparkleIcon } from "lucide-react";
|
| 4 |
import { FaLaptopCode } from "react-icons/fa6";
|
| 5 |
import { HtmlHistory } from "@/types";
|
| 6 |
import { Button } from "@/components/ui/button";
|
|
@@ -83,6 +83,15 @@ export function Footer({
|
|
| 83 |
<span className="max-lg:hidden">DeepSite Gallery</span>
|
| 84 |
</Button>
|
| 85 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
<Button size="sm" variant="outline" onClick={handleRefreshIframe}>
|
| 87 |
<RefreshCcw className="size-3.5" />
|
| 88 |
<span className="max-lg:hidden">Refresh Preview</span>
|
|
|
|
| 1 |
import classNames from "classnames";
|
| 2 |
import { FaMobileAlt } from "react-icons/fa";
|
| 3 |
+
import { HelpCircle, RefreshCcw, SparkleIcon } from "lucide-react";
|
| 4 |
import { FaLaptopCode } from "react-icons/fa6";
|
| 5 |
import { HtmlHistory } from "@/types";
|
| 6 |
import { Button } from "@/components/ui/button";
|
|
|
|
| 83 |
<span className="max-lg:hidden">DeepSite Gallery</span>
|
| 84 |
</Button>
|
| 85 |
</a>
|
| 86 |
+
<a
|
| 87 |
+
target="_blank"
|
| 88 |
+
href="https://huggingface.co/spaces/enzostvs/deepsite/discussions/157"
|
| 89 |
+
>
|
| 90 |
+
<Button size="sm" variant="outline">
|
| 91 |
+
<HelpCircle className="size-3.5" />
|
| 92 |
+
<span className="max-lg:hidden">Help</span>
|
| 93 |
+
</Button>
|
| 94 |
+
</a>
|
| 95 |
<Button size="sm" variant="outline" onClick={handleRefreshIframe}>
|
| 96 |
<RefreshCcw className="size-3.5" />
|
| 97 |
<span className="max-lg:hidden">Refresh Preview</span>
|
components/user-menu/index.tsx
CHANGED
|
@@ -32,7 +32,11 @@ export const UserMenu = ({ className }: { className?: string }) => {
|
|
| 32 |
{user?.fullname?.charAt(0).toUpperCase() ?? "E"}
|
| 33 |
</AvatarFallback>
|
| 34 |
</Avatar>
|
| 35 |
-
{user?.fullname}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
</Button>
|
| 37 |
</DropdownMenuTrigger>
|
| 38 |
<DropdownMenuContent className="w-56" align="start">
|
|
|
|
| 32 |
{user?.fullname?.charAt(0).toUpperCase() ?? "E"}
|
| 33 |
</AvatarFallback>
|
| 34 |
</Avatar>
|
| 35 |
+
<span className="max-lg:hidden">{user?.fullname}</span>
|
| 36 |
+
<span className="lg:hidden">
|
| 37 |
+
{user?.fullname.slice(0, 10)}
|
| 38 |
+
{(user?.fullname?.length ?? 0) > 10 ? "..." : ""}
|
| 39 |
+
</span>
|
| 40 |
</Button>
|
| 41 |
</DropdownMenuTrigger>
|
| 42 |
<DropdownMenuContent className="w-56" align="start">
|