mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-03 11:29:17 +01:00
fix(#505): fixed displaying shortcuts based on OS
This commit is contained in:
parent
ff3321d643
commit
dfefb0a314
@ -1,8 +1,14 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IconSend } from '@tabler/icons';
|
import { IconSend } from '@tabler/icons';
|
||||||
import StyledWrapper from './StyledWrapper';
|
import StyledWrapper from './StyledWrapper';
|
||||||
|
import { isMacOS } from 'utils/common/platform';
|
||||||
|
|
||||||
const Placeholder = () => {
|
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 (
|
return (
|
||||||
<StyledWrapper>
|
<StyledWrapper>
|
||||||
<div className="send-icon flex justify-center" style={{ fontSize: 200 }}>
|
<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 className="px-1 py-2">Edit Environments</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-1 flex-col px-1">
|
<div className="flex flex-1 flex-col px-1">
|
||||||
<div className="px-1 py-2">Cmd + Enter</div>
|
<div className="px-1 py-2">{sendRequestShortcut}</div>
|
||||||
<div className="px-1 py-2">Cmd + B</div>
|
<div className="px-1 py-2">{newRequestShortcut}</div>
|
||||||
<div className="px-1 py-2">Cmd + E</div>
|
<div className="px-1 py-2">{editEnvironmentShortcut}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user