From dfefb0a314643bcbea0d0a1afa88bc2d5998e354 Mon Sep 17 00:00:00 2001 From: Martin Sefcik Date: Tue, 10 Oct 2023 11:49:52 +0200 Subject: [PATCH] fix(#505): fixed displaying shortcuts based on OS --- .../src/components/ResponsePane/Placeholder/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/bruno-app/src/components/ResponsePane/Placeholder/index.js b/packages/bruno-app/src/components/ResponsePane/Placeholder/index.js index 2e7cd8621..bca9e138a 100644 --- a/packages/bruno-app/src/components/ResponsePane/Placeholder/index.js +++ b/packages/bruno-app/src/components/ResponsePane/Placeholder/index.js @@ -1,8 +1,14 @@ import React from 'react'; import { IconSend } from '@tabler/icons'; import StyledWrapper from './StyledWrapper'; +import { isMacOS } from 'utils/common/platform'; const Placeholder = () => { + const isMac = isMacOS(); + const sendRequestShortcut = isMac ? 'Cmd + Enter' : 'Ctrl + Enter'; + const newRequestShortcut = isMac ? 'Cmd + B' : 'Ctrl + B'; + const editEnvironmentShortcut = isMac ? 'Cmd + E' : 'Ctrl + E'; + return (
@@ -15,9 +21,9 @@ const Placeholder = () => {
Edit Environments
-
Cmd + Enter
-
Cmd + B
-
Cmd + E
+
{sendRequestShortcut}
+
{newRequestShortcut}
+
{editEnvironmentShortcut}