diff --git a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx index 0e0df2a66..44e18ab7f 100644 --- a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx @@ -12,7 +12,8 @@ export default function EditShortcutButton({ defaultShortcuts, defaultCombination, open, - setOpen + setOpen, + disable, }: { children: JSX.Element; shortcut: string[]; @@ -20,6 +21,7 @@ export default function EditShortcutButton({ defaultCombination: string; open: boolean; setOpen: (bool: boolean) => void; + disable?: boolean; }): JSX.Element { const isMac = navigator.userAgent.toUpperCase().includes("MAC"); const [key, setKey] = useState(isMac ? "Meta" : 'Ctrl'); @@ -88,10 +90,10 @@ export default function EditShortcutButton({ }, [key, setKey]) return ( - + Key Combination diff --git a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx index 5bea21d18..77e293672 100644 --- a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx @@ -12,6 +12,7 @@ import { import { Button } from "../../../../components/ui/button"; import EditShortcutButton from "./EditShortcutButton"; import { useShortcutsStore } from "../../../../stores/shortcuts"; +import { defaultShortcuts, unavailableShortcutss } from "../../../../constants/constants"; export default function ShortcutsPage() { const [selectedRows, setSelectedRows] = useState([]); @@ -54,6 +55,12 @@ export default function ShortcutsPage() { } }, []) + function handleRestore() { + setShortcuts(defaultShortcuts, unavailableShortcutss); + localStorage.removeItem("langflow-shortcuts"); + localStorage.removeItem("langflow-UShortcuts"); + } + return (
@@ -70,38 +77,43 @@ export default function ShortcutsPage() { frequently used actions.

+
+
+
+ + + + +
+
+
- - -
-
- - - -
-
- { - setSelectedRows(event.api.getSelectedRows().map((row) => row.name)); - }} - suppressRowClickSelection={true} - domLayout="autoHeight" - pagination={false} - columnDefs={colDefs} - rowData={nodesRowData} - /> -
-
+
+ { + setSelectedRows(event.api.getSelectedRows().map((row) => row.name)); + }} + suppressRowClickSelection={true} + domLayout="autoHeight" + pagination={false} + columnDefs={colDefs} + rowData={nodesRowData} + /> +
); diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index 25e5ec4fb..8437c802b 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -140,6 +140,7 @@ import { X, XCircle, Zap, + RotateCcw, } from "lucide-react"; import { FaApple, FaGithub } from "react-icons/fa"; import { AWSIcon } from "../icons/AWS"; @@ -514,4 +515,5 @@ export const nodeIconsLucide: iconsType = { Command, ArrowBigUp, Dot, + RotateCcw };