diff --git a/src/frontend/src/components/codeTabsComponent/ChatCodeTabComponent.tsx b/src/frontend/src/components/codeTabsComponent/ChatCodeTabComponent.tsx index 4ac235540..7c20a066f 100644 --- a/src/frontend/src/components/codeTabsComponent/ChatCodeTabComponent.tsx +++ b/src/frontend/src/components/codeTabsComponent/ChatCodeTabComponent.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; -import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism"; +import { tomorrow } from "react-syntax-highlighter/dist/cjs/styles/prism"; import { useDarkStore } from "../../stores/darkStore"; import IconComponent from "../genericIconComponent"; import { Button } from "../ui/button"; @@ -50,7 +50,7 @@ export default function SimplifiedCodeTabComponent({ {code} diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 872f015d9..83a3fb8bd 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -1,7 +1,11 @@ +import ShadTooltip from "@/components/shadTooltipComponent"; import { useTweaksStore } from "@/stores/tweaksStore"; import { useState } from "react"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; -import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism"; +import { + oneDark, + tomorrow, +} from "react-syntax-highlighter/dist/cjs/styles/prism"; import { Tabs, TabsContent, @@ -58,7 +62,7 @@ export default function CodeTabsComponent({ >
{tabs.length > 0 && tabs[0].name !== "" ? ( - + {tabs.map((tab, index) => (
)} - -
- {nodes.length > 0 && - tabs.find((tab) => tab.name.toLowerCase() === "tweaks") && - tabs[activeTab].hasTweaks && ( -
- - -
- )} - - {tabs[activeTab].name.toLowerCase !== "tweaks" && ( - <> - - - )} -
{tabs.map((tab, idx) => ( {tab.name.toLowerCase() !== "tweaks" ? ( -
+
{tab.description && (
)} +
+ {nodes.length > 0 && + tabs.find((tab) => tab.name.toLowerCase() === "tweaks") && + tabs[activeTab].hasTweaks && ( +
+ +
+ + +
+
+ + | +
+ )} + + {tabs[activeTab].name.toLowerCase !== "tweaks" && ( + <> + + + )} +
{tab.code} diff --git a/src/frontend/src/components/shadTooltipComponent/index.tsx b/src/frontend/src/components/shadTooltipComponent/index.tsx index d022bac29..2281088a0 100644 --- a/src/frontend/src/components/shadTooltipComponent/index.tsx +++ b/src/frontend/src/components/shadTooltipComponent/index.tsx @@ -28,7 +28,7 @@ const ShadTooltip: React.FC = ({ {children} (({ className, ...props }, ref) => ( )); diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index 90b035f72..326949a89 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -891,7 +891,7 @@ export const EMPTY_INPUT_SEND_MESSAGE = "No input message provided."; export const EMPTY_OUTPUT_SEND_MESSAGE = "Message empty."; export const TABS_ORDER = [ - "run curl", + "curl", "python api", "js api", "python code", diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/codeBlock/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/codeBlock/index.tsx index 50f31512e..033c3a569 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/codeBlock/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/codeBlock/index.tsx @@ -1,7 +1,7 @@ import { IconCheck, IconClipboard, IconDownload } from "@tabler/icons-react"; import { useState } from "react"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; -import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism"; +import { tomorrow } from "react-syntax-highlighter/dist/cjs/styles/prism"; import { programmingLanguages } from "../../../../../../constants/constants"; import { Props } from "../../../../../../types/components"; @@ -61,7 +61,7 @@ export function CodeBlock({ language, value }: Props): JSX.Element { {value} diff --git a/src/frontend/src/modals/apiModal/utils/tabs-array.tsx b/src/frontend/src/modals/apiModal/utils/tabs-array.tsx index 966935268..b4aa25a08 100644 --- a/src/frontend/src/modals/apiModal/utils/tabs-array.tsx +++ b/src/frontend/src/modals/apiModal/utils/tabs-array.tsx @@ -7,7 +7,7 @@ export function createTabsArray( const tabs: tabsArrayType[] = []; if (codes.runCurlCode) { tabs.push({ - name: "Run cURL", + name: "cURL", mode: "bash", image: "https://curl.se/logo/curl-symbol-transparent.png", language: "sh", diff --git a/src/frontend/src/modals/baseModal/index.tsx b/src/frontend/src/modals/baseModal/index.tsx index 2619e8106..ffeebaca8 100644 --- a/src/frontend/src/modals/baseModal/index.tsx +++ b/src/frontend/src/modals/baseModal/index.tsx @@ -77,10 +77,10 @@ const Header: React.FC<{ }> = ({ children, description }: modalHeaderType): JSX.Element => { return ( - + {children} - + {description} diff --git a/src/frontend/src/style/applies.css b/src/frontend/src/style/applies.css index b57912b21..099257fb6 100644 --- a/src/frontend/src/style/applies.css +++ b/src/frontend/src/style/applies.css @@ -923,13 +923,13 @@ } .api-modal-tabs { - @apply flex h-full flex-col overflow-hidden rounded-md border bg-muted text-center; + @apply flex h-full flex-col overflow-hidden text-center; } .api-modal-tablist-div { @apply flex items-center justify-between px-2 py-2; } .api-modal-tabs-content { - @apply -mt-1 h-full w-full px-4 pb-4; + @apply -mt-1 h-full w-full pb-4; } .api-modal-accordion-display { @apply mt-2 flex h-full w-full; diff --git a/src/frontend/src/style/index.css b/src/frontend/src/style/index.css index b0885139b..02ec50cb7 100644 --- a/src/frontend/src/style/index.css +++ b/src/frontend/src/style/index.css @@ -42,6 +42,8 @@ --tooltip: 0 0% 0%; /* hsl(0, 0%, 0%) */ --tooltip-foreground: 0 0% 100%; /* hsl(0, 0%, 100%) */ + --canvas-dark: 240 6% 10%; /* hsl(240, 6%, 10%) */ + --node-selected: 243 75% 59%; --round-btn-shadow: #00000063; --ice: #31a3cc; diff --git a/src/frontend/tailwind.config.mjs b/src/frontend/tailwind.config.mjs index 602c403af..de91d7425 100644 --- a/src/frontend/tailwind.config.mjs +++ b/src/frontend/tailwind.config.mjs @@ -118,7 +118,10 @@ const config = { "chat-bot-icon": "var(--chat-bot-icon)", "chat-user-icon": "var(--chat-user-icon)", "code-background": "hsl(var(--code-background))", - canvas: "hsl(var(--canvas))", + canvas: { + DEFAULT: "hsl(var(--canvas))", + dark: "hsl(var(--canvas-dark))", + }, ice: "var(--ice)", selected: "var(--selected)", hover: "var(--hover)", @@ -184,6 +187,10 @@ const config = { DEFAULT: "hsl(var(--tooltip))", foreground: "hsl(var(--tooltip-foreground))", }, + "code-block": { + DEFAULT: "#18181B", + muted: "#27272A", + }, "inner-yellow": { DEFAULT: "hsl(var(--inner-yellow))", foreground: "hsl(var(--inner-foreground-yellow))",