fix(#505): fixed displaying shortcuts based on OS

This commit is contained in:
Martin Sefcik 2023-10-10 11:49:52 +02:00
parent ff3321d643
commit dfefb0a314

View File

@ -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 (
<StyledWrapper>
<div className="send-icon flex justify-center" style={{ fontSize: 200 }}>
@ -15,9 +21,9 @@ const Placeholder = () => {
<div className="px-1 py-2">Edit Environments</div>
</div>
<div className="flex flex-1 flex-col px-1">
<div className="px-1 py-2">Cmd + Enter</div>
<div className="px-1 py-2">Cmd + B</div>
<div className="px-1 py-2">Cmd + E</div>
<div className="px-1 py-2">{sendRequestShortcut}</div>
<div className="px-1 py-2">{newRequestShortcut}</div>
<div className="px-1 py-2">{editEnvironmentShortcut}</div>
</div>
</div>
</StyledWrapper>