feat: search
This commit is contained in:
@@ -17,8 +17,14 @@ export type HoppAction =
|
||||
| "request.method.put" // Select PUT Method
|
||||
| "request.method.delete" // Select DELETE Method
|
||||
| "flyouts.keybinds.toggle" // Shows the keybinds flyout
|
||||
| "modals.search.toggle" // Shows the search modal
|
||||
| "modals.support.toggle" // Shows the support modal
|
||||
| "modals.share.toggle" // Shows the share modal
|
||||
| "navigation.rest.jump" // Jump to REST page
|
||||
| "navigation.graphql.jump" // Jump to GraphQL page
|
||||
| "navigation.realtime.jump" // Jump to realtime page
|
||||
| "navigation.documentation.jump" // Jump to documentation page
|
||||
| "navigation.settings.jump" // Jump to settings page
|
||||
|
||||
type BoundActionList = {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
|
||||
@@ -74,7 +74,7 @@ export const bindings: {
|
||||
} = {
|
||||
"ctrl-g": "request.send-cancel",
|
||||
"ctrl-i": "request.reset",
|
||||
"ctrl-k": "request.copy-link",
|
||||
"ctrl-c": "request.copy-link",
|
||||
"ctrl-s": "request.save",
|
||||
"alt-up": "request.method.next",
|
||||
"alt-down": "request.method.prev",
|
||||
@@ -83,9 +83,15 @@ export const bindings: {
|
||||
"alt-p": "request.method.post",
|
||||
"alt-u": "request.method.put",
|
||||
"alt-x": "request.method.delete",
|
||||
"/": "flyouts.keybinds.toggle",
|
||||
"ctrl-k": "flyouts.keybinds.toggle",
|
||||
"/": "modals.search.toggle",
|
||||
"?": "modals.support.toggle",
|
||||
"ctrl-x": "modals.share.toggle",
|
||||
"alt-r": "navigation.rest.jump",
|
||||
"alt-q": "navigation.graphql.jump",
|
||||
"alt-w": "navigation.realtime.jump",
|
||||
"alt-d": "navigation.documentation.jump",
|
||||
"alt-s": "navigation.settings.jump",
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
129
helpers/shortcuts.js
Normal file
129
helpers/shortcuts.js
Normal file
@@ -0,0 +1,129 @@
|
||||
import { getPlatformAlternateKey, getPlatformSpecialKey } from "./platformutils"
|
||||
|
||||
export default [
|
||||
{
|
||||
section: "General",
|
||||
shortcuts: [
|
||||
{
|
||||
keys: ["?"],
|
||||
label: "shortcut.general.help_menu",
|
||||
},
|
||||
{
|
||||
keys: ["/"],
|
||||
label: "shortcut.general.command_menu",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformSpecialKey(), "K"],
|
||||
label: "shortcut.general.show_all",
|
||||
},
|
||||
{
|
||||
keys: ["Esc"],
|
||||
label: "shortcut.general.close_current_menu",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
section: "Request",
|
||||
shortcuts: [
|
||||
{
|
||||
keys: [getPlatformSpecialKey(), "G"],
|
||||
label: "shortcut.send_request",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformSpecialKey(), "S"],
|
||||
label: "shortcut.save_to_collections",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformSpecialKey(), "C"],
|
||||
label: "shortcut.copy_request_link",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformSpecialKey(), "I"],
|
||||
label: "shortcut.reset_request",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "↑"],
|
||||
label: "shortcut.next_method",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "↓"],
|
||||
label: "shortcut.previous_method",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "G"],
|
||||
label: "shortcut.get_method",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "H"],
|
||||
label: "shortcut.head_method",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "P"],
|
||||
label: "shortcut.post_method",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "U"],
|
||||
label: "shortcut.put_method",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "X"],
|
||||
label: "shortcut.delete_method",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export const spotlight = [
|
||||
{
|
||||
section: "Spotlight",
|
||||
shortcuts: [
|
||||
{
|
||||
keys: ["?"],
|
||||
label: "shortcut.general.help_menu",
|
||||
action: "modals.support.toggle",
|
||||
icon: "support",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformSpecialKey(), "K"],
|
||||
label: "shortcut.general.show_all",
|
||||
action: "flyouts.keybinds.toggle",
|
||||
icon: "keyboard",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
section: "Navigation",
|
||||
shortcuts: [
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "R"],
|
||||
label: "shortcut.navigation.rest",
|
||||
action: "navigation.rest.jump",
|
||||
icon: "arrow_forward",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "Q"],
|
||||
label: "shortcut.navigation.graphql",
|
||||
action: "navigation.graphql.jump",
|
||||
icon: "arrow_forward",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "W"],
|
||||
label: "shortcut.navigation.realtime",
|
||||
action: "navigation.realtime.jump",
|
||||
icon: "arrow_forward",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "D"],
|
||||
label: "shortcut.navigation.documentation",
|
||||
action: "navigation.documentation.jump",
|
||||
icon: "arrow_forward",
|
||||
},
|
||||
{
|
||||
keys: [getPlatformAlternateKey(), "S"],
|
||||
label: "shortcut.navigation.settings",
|
||||
action: "navigation.settings.jump",
|
||||
icon: "arrow_forward",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user