insomnia/app/ui/components/settings/shortcuts.js

44 lines
1.3 KiB
JavaScript
Raw Normal View History

import React, {PureComponent} from 'react';
import Hotkey from '../hotkey';
class Shortcuts extends PureComponent {
renderHotkey (name, char, shift, alt, ctrl) {
return (
<tr>
<td>{name}</td>
<td className="text-right">
<code><Hotkey char={char} shift={shift} alt={alt} ctrl={ctrl}/></code>
</td>
</tr>
);
}
render () {
return (
2017-03-29 02:21:49 +00:00
<div>
<table className="table--fancy">
<tbody>
{this.renderHotkey('Switch Requests', 'P')}
{this.renderHotkey('Send Request', 'Enter')}
{this.renderHotkey('New Request', 'N')}
{this.renderHotkey('Duplicate Request', 'D')}
{this.renderHotkey('Show Cookie Manager', 'K')}
{this.renderHotkey('Show Environment Editor', 'E')}
{this.renderHotkey('Focus URL Bar', 'L')}
{this.renderHotkey('Toggle Sidebar', '\\')}
2017-07-21 18:59:17 +00:00
{this.renderHotkey('Show Autocomplete Dropdown', 'Space', false, false, true)}
2017-03-29 02:21:49 +00:00
{this.renderHotkey('Show App Preferences', ',')}
{this.renderHotkey('Show Workspace Settings', ',', true)}
{this.renderHotkey('Show Request Settings', ',', true, true)}
{this.renderHotkey('Show Keyboard Shortcuts', '?')}
2017-03-29 02:21:49 +00:00
</tbody>
</table>
</div>
);
}
}
Shortcuts.propTypes = {};
export default Shortcuts;