From 8f26728a29e4be25a8f3c6a98be295c5a5d8e688 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Fri, 30 Aug 2024 10:54:24 -0700 Subject: [PATCH] update command keys (#2271) --- .../shared_chat_search/FunctionalWrapper.tsx | 12 +++--- web/src/components/icons/icons.tsx | 42 +++++++++++++++++++ web/src/lib/browserUtilities.tsx | 5 ++- 3 files changed, 51 insertions(+), 8 deletions(-) diff --git a/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx b/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx index 4ef22ef4e604..e66bc32aa4bc 100644 --- a/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx +++ b/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx @@ -53,10 +53,10 @@ const ToggleSwitch = () => { onClick={() => handleTabChange("search")} > -

+

Search - {commandSymbol}S -

+
{commandSymbol}S
+
); diff --git a/web/src/components/icons/icons.tsx b/web/src/components/icons/icons.tsx index fe33d4e9c150..377307caef6a 100644 --- a/web/src/components/icons/icons.tsx +++ b/web/src/components/icons/icons.tsx @@ -2754,3 +2754,45 @@ export const CameraIcon = ({ ); }; + +export const MacIcon = ({ + size = 16, + className = "my-auto flex flex-shrink-0 ", +}: IconProps) => { + return ( + + + + ); +}; + +export const WindowsIcon = ({ + size = 16, + className = "my-auto flex flex-shrink-0 ", +}: IconProps) => { + return ( + + + + ); +}; diff --git a/web/src/lib/browserUtilities.tsx b/web/src/lib/browserUtilities.tsx index 445ed6495071..6646db9b5cc5 100644 --- a/web/src/lib/browserUtilities.tsx +++ b/web/src/lib/browserUtilities.tsx @@ -1,5 +1,6 @@ "use client"; +import { MacIcon, WindowsIcon } from "@/components/icons/icons"; import { useState, useEffect } from "react"; type OperatingSystem = "Windows" | "Mac" | "Other"; @@ -23,9 +24,9 @@ const KeyboardSymbol = () => { const os = useOperatingSystem(); if (os === "Windows") { - return "⊞"; + return ; } else { - return "⌘"; + return ; } };