mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(terminal): display os specific copy/paste tooltip EE-1976 (#10835)
This commit is contained in:
parent
fc7d9ca2cd
commit
fe47318e26
7 changed files with 81 additions and 18 deletions
42
app/react/components/TerminalTooltip/TerminalTooltip.tsx
Normal file
42
app/react/components/TerminalTooltip/TerminalTooltip.tsx
Normal file
|
@ -0,0 +1,42 @@
|
|||
import { BROWSER_OS_PLATFORM } from '@/react/constants';
|
||||
|
||||
import { Tooltip } from '@@/Tip/Tooltip';
|
||||
|
||||
const editorConfig = {
|
||||
mac: {
|
||||
tooltip: (
|
||||
<>
|
||||
<div>Within the console:</div>
|
||||
<div>Cmd+C - Copy</div>
|
||||
<div>Cmd+V - Paste</div>
|
||||
<div>or right-click -> Copy/Paste</div>
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
lin: {
|
||||
tooltip: (
|
||||
<>
|
||||
<div>Within the console:</div>
|
||||
<div>Ctrl+Insert - Copy</div>
|
||||
<div>Shift+Insert - Paste</div>
|
||||
<div>or right-click -> Copy/Paste</div>
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
win: {
|
||||
tooltip: (
|
||||
<>
|
||||
<div>Within the console:</div>
|
||||
<div>Ctrl+Insert - Copy</div>
|
||||
<div>Shift+Insert - Paste</div>
|
||||
<div>or right-click -> Copy/Paste</div>
|
||||
</>
|
||||
),
|
||||
},
|
||||
} as const;
|
||||
|
||||
export function TerminalTooltip() {
|
||||
return <Tooltip message={editorConfig[BROWSER_OS_PLATFORM].tooltip} />;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue