diff --git a/app/src/components/ConvertOnPasteOverlay.tsx b/app/src/components/ConvertOnPasteOverlay.tsx index 65a57cec..b02ad270 100644 --- a/app/src/components/ConvertOnPasteOverlay.tsx +++ b/app/src/components/ConvertOnPasteOverlay.tsx @@ -3,7 +3,6 @@ import { useEffect, useMemo } from "react"; import { getDefaultText } from "../lib/getDefaultText"; import { useEditorStore } from "../lib/useEditorStore"; import { usePromptStore, useRunAiWithStore } from "../lib/usePromptStore"; -import { ArrowRight } from "phosphor-react"; import { Button2 } from "../ui/Shared"; import { Trans } from "@lingui/macro"; import { MagicWand } from "phosphor-react"; @@ -55,17 +54,17 @@ function Overlay() { const isRunning = usePromptStore((s) => s.isRunning); const pasted = useEditorStore((s) => s.userPasted); return ( -
-
-

+

+
+

- Is this a document? Would you like to convert it to a flowchart? + Pasted content detected. Convert to Flowchart Fun syntax?

-
+
{ useEditorStore.setState({ userPasted: "" }); }} @@ -74,29 +73,18 @@ function Overlay() { } onClick={() => { - // first set the mode to convert, and add pasted text usePromptStore.setState({ mode: "convert", currentText: pasted, }); - // move this off the main thread requestAnimationFrame(() => { runAiWithStore(); - // clear the pasted text useEditorStore.setState({ userPasted: "" }); }); }} - rightIcon={ - - } isLoading={isRunning} > Convert diff --git a/app/src/index.css b/app/src/index.css index de9b10aa..e4f80627 100644 --- a/app/src/index.css +++ b/app/src/index.css @@ -456,50 +456,6 @@ body.dark .pricing-highlights { @apply max-h-[300px] overflow-y-auto; } -.convert-on-paste-overlay { - background: linear-gradient( - to bottom, - hsla(251.35, 60.66%, 88.04%, 0) 0%, - hsla(251.35, 60.66%, 88.04%, 0.013) 8.1%, - hsla(251.35, 60.66%, 88.04%, 0.049) 15.5%, - hsla(251.35, 60.66%, 88.04%, 0.104) 22.5%, - hsla(251.35, 60.66%, 88.04%, 0.175) 29%, - hsla(251.35, 60.66%, 88.04%, 0.259) 35.3%, - hsla(251.35, 60.66%, 88.04%, 0.352) 41.2%, - hsla(251.35, 60.66%, 88.04%, 0.45) 47.1%, - hsla(251.35, 60.66%, 88.04%, 0.55) 52.9%, - hsla(251.35, 60.66%, 88.04%, 0.648) 58.8%, - hsla(251.35, 60.66%, 88.04%, 0.741) 64.7%, - hsla(251.35, 60.66%, 88.04%, 0.825) 71%, - hsla(251.35, 60.66%, 88.04%, 0.896) 77.5%, - hsla(251.35, 60.66%, 88.04%, 0.951) 84.5%, - hsla(251.35, 60.66%, 88.04%, 0.987) 91.9%, - hsl(251.35, 60.66%, 88.04%) 100% - ); -} - -body.dark .convert-on-paste-overlay { - background: linear-gradient( - to bottom, - hsla(265.79, 79.08%, 30%, 0) 0%, - hsla(265.79, 79.08%, 30%, 0.013) 8.1%, - hsla(265.79, 79.08%, 30%, 0.049) 15.5%, - hsla(265.79, 79.08%, 30%, 0.104) 22.5%, - hsla(265.79, 79.08%, 30%, 0.175) 29%, - hsla(265.79, 79.08%, 30%, 0.259) 35.3%, - hsla(265.79, 79.08%, 30%, 0.352) 41.2%, - hsla(265.79, 79.08%, 30%, 0.45) 47.1%, - hsla(265.79, 79.08%, 30%, 0.55) 52.9%, - hsla(265.79, 79.08%, 30%, 0.648) 58.8%, - hsla(265.79, 79.08%, 30%, 0.741) 64.7%, - hsla(265.79, 79.08%, 30%, 0.825) 71%, - hsla(265.79, 79.08%, 30%, 0.896) 77.5%, - hsla(265.79, 79.08%, 30%, 0.951) 84.5%, - hsla(265.79, 79.08%, 30%, 0.987) 91.9%, - hsl(265.79, 79.08%, 30%) 100% - ); -} - .clip-path-rectangle { @apply relative; clip-path: polygon( diff --git a/app/tailwind.config.js b/app/tailwind.config.js index 17049651..0b1585b8 100644 --- a/app/tailwind.config.js +++ b/app/tailwind.config.js @@ -83,8 +83,8 @@ module.exports = { }, keyframes: { overlayShow: { - from: { opacity: 0 }, - to: { opacity: 1 }, + from: { transform: "translateY(100%)" }, + to: { transform: "translateY(0)" }, }, contentShow: { from: { opacity: 0, transform: "translate(-50%, -48%) scale(0.96)" },