2017-03-08 05:52:17 +00:00
|
|
|
import React, {PureComponent} from 'react';
|
2017-03-28 22:45:23 +00:00
|
|
|
import Hotkey from '../hotkey';
|
2017-03-08 05:52:17 +00:00
|
|
|
|
|
|
|
class Shortcuts extends PureComponent {
|
2017-05-26 18:17:35 +00:00
|
|
|
renderHotkey (name, char, shift, alt, ctrl) {
|
2017-03-28 22:45:23 +00:00
|
|
|
return (
|
|
|
|
<tr>
|
|
|
|
<td>{name}</td>
|
|
|
|
<td className="text-right">
|
2017-05-26 18:17:35 +00:00
|
|
|
<code><Hotkey char={char} shift={shift} alt={alt} ctrl={ctrl}/></code>
|
2017-03-28 22:45:23 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-03-08 05:52:17 +00:00
|
|
|
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)}
|
2017-04-11 21:20:01 +00:00
|
|
|
{this.renderHotkey('Show Keyboard Shortcuts', '?')}
|
2017-03-29 02:21:49 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2017-03-08 05:52:17 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Shortcuts.propTypes = {};
|
|
|
|
|
|
|
|
export default Shortcuts;
|