diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-09-06 23:02:59 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-09-06 23:02:59 -0700 |
commit | ceafdf18c9d9f0f8769d4a9e45c8a407179161c5 (patch) | |
tree | dfed3b9b14448fac251230777c2cbf869bccf386 /extension/react-app/src/components/Layout.tsx | |
parent | 6e8885fc2f7feb06ef6ac87d2d7688f9f33d15de (diff) | |
download | sncontinue-ceafdf18c9d9f0f8769d4a9e45c8a407179161c5.tar.gz sncontinue-ceafdf18c9d9f0f8769d4a9e45c8a407179161c5.tar.bz2 sncontinue-ceafdf18c9d9f0f8769d4a9e45c8a407179161c5.zip |
feat: :lipstick: handful of UI improvements
Diffstat (limited to 'extension/react-app/src/components/Layout.tsx')
-rw-r--r-- | extension/react-app/src/components/Layout.tsx | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/extension/react-app/src/components/Layout.tsx b/extension/react-app/src/components/Layout.tsx index de8b86d8..065b77c6 100644 --- a/extension/react-app/src/components/Layout.tsx +++ b/extension/react-app/src/components/Layout.tsx @@ -3,7 +3,7 @@ import { defaultBorderRadius, secondaryDark, vscForeground } from "."; import { Outlet } from "react-router-dom"; import Onboarding from "./Onboarding"; import TextDialog from "./TextDialog"; -import { useContext, useEffect } from "react"; +import { useContext, useEffect, useState } from "react"; import { GUIClientContext } from "../App"; import { useDispatch, useSelector } from "react-redux"; import { RootStore } from "../redux/store"; @@ -145,29 +145,37 @@ const Layout = () => { <GridDiv> <Outlet /> <Footer> - {localStorage.getItem("hideFeature") === "true" || ( - <SparklesIcon - className="mr-auto cursor-pointer" - onClick={() => { - localStorage.setItem("hideFeature", "true"); - }} - onMouseEnter={() => { - dispatch( - setBottomMessage( - "🎁 New Feature: Use ⌘⇧R automatically debug errors in the terminal (you can click the sparkle icon to make it go away)" - ) - ); - }} - onMouseLeave={() => { - dispatch(setBottomMessage(undefined)); - }} - width="1.3em" - height="1.3em" - color="yellow" - /> + {(localStorage.getItem("hideFeature") === "true" && false) || ( + <div className="mr-auto flex gap-2 items-center"> + <SparklesIcon + className="cursor-pointer" + onClick={() => { + localStorage.setItem("hideFeature", "true"); + }} + onMouseEnter={() => { + dispatch( + setBottomMessage( + "🎁 New Feature: Use ⌘⇧R automatically debug errors in the terminal (you can click the sparkle icon to make it go away)" + ) + ); + }} + onMouseLeave={() => { + dispatch( + setBottomMessageCloseTimeout( + setTimeout(() => { + dispatch(setBottomMessage(undefined)); + }, 2000) + ) + ); + }} + width="1.3em" + height="1.3em" + color="yellow" + /> + + <ModelSelect /> + </div> )} - - <ModelSelect /> <HeaderButtonWithText onClick={() => { client?.loadSession(undefined); |