mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-11 17:14:15 +00:00
committed by
David Lechner
parent
5c3727b3ce
commit
68021545c5
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2020 The Pybricks Authors
|
||||
|
||||
import { Menu, MenuItem, ResizeSensor } from '@blueprintjs/core';
|
||||
import { Menu, MenuDivider, MenuItem, ResizeSensor } from '@blueprintjs/core';
|
||||
// importing this way due to https://github.com/palantir/blueprint/issues/3891
|
||||
import { ContextMenuTarget } from '@blueprintjs/core/lib/esnext/components/context-menu/contextMenuTarget';
|
||||
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
|
||||
@@ -127,6 +127,12 @@ class Terminal extends React.Component<TerminalProps> {
|
||||
icon="clipboard"
|
||||
label={/mac/i.test(navigator.platform) ? 'Cmd-V' : 'Ctrl-Shift-V'}
|
||||
/>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
onClick={(): void => this.xterm.clear()}
|
||||
text={i18n.translate(TerminalStringId.Clear)}
|
||||
icon="trash"
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"terminal": {
|
||||
"copy": "Copy",
|
||||
"paste": "Paste"
|
||||
"paste": "Paste",
|
||||
"clear": "Clear"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,5 @@
|
||||
export enum TerminalStringId {
|
||||
Copy = 'terminal.copy',
|
||||
Paste = 'terminal.paste',
|
||||
Clear = 'terminal.clear',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user