summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-15 14:30:11 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-15 14:30:11 -0700
commit48e5c8001e897eb37493357087410ee8f98217fa (patch)
treea13f2e2df1d15f341b493c8b80e496719a7a5325 /extension/react-app/src/components
parent98085ebc2eb39569db89a34c8d820a5d0bfe8f84 (diff)
downloadsncontinue-48e5c8001e897eb37493357087410ee8f98217fa.tar.gz
sncontinue-48e5c8001e897eb37493357087410ee8f98217fa.tar.bz2
sncontinue-48e5c8001e897eb37493357087410ee8f98217fa.zip
ctrl shortcuts on windows, load models immediately
Diffstat (limited to 'extension/react-app/src/components')
-rw-r--r--extension/react-app/src/components/StepContainer.tsx2
-rw-r--r--extension/react-app/src/components/TextDialog.tsx6
2 files changed, 6 insertions, 2 deletions
diff --git a/extension/react-app/src/components/StepContainer.tsx b/extension/react-app/src/components/StepContainer.tsx
index 14e9b854..7f23e333 100644
--- a/extension/react-app/src/components/StepContainer.tsx
+++ b/extension/react-app/src/components/StepContainer.tsx
@@ -181,7 +181,7 @@ function StepContainer(props: StepContainerProps) {
}
className="overflow-hidden cursor-pointer"
onClick={(e) => {
- if (e.metaKey) {
+ if (isMetaEquivalentKeyPressed(e)) {
props.onToggleAll();
} else {
props.onToggle();
diff --git a/extension/react-app/src/components/TextDialog.tsx b/extension/react-app/src/components/TextDialog.tsx
index ea5727f0..c724697d 100644
--- a/extension/react-app/src/components/TextDialog.tsx
+++ b/extension/react-app/src/components/TextDialog.tsx
@@ -81,7 +81,11 @@ const TextDialog = (props: {
rows={10}
ref={textAreaRef}
onKeyDown={(e) => {
- if (e.key === "Enter" && e.metaKey && textAreaRef.current) {
+ if (
+ e.key === "Enter" &&
+ isMetaEquivalentKeyPressed(e) &&
+ textAreaRef.current
+ ) {
props.onEnter(textAreaRef.current.value);
setText("");
} else if (e.key === "Escape") {