-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Ionov
committed
Dec 28, 2023
1 parent
d64ad37
commit 4761a78
Showing
6 changed files
with
69 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { For } from 'solid-js'; | ||
|
||
const keymaps = [ | ||
// TODO: | ||
// { action: 'Help', keys: ['F1'] }, | ||
{ action: 'Execute query', keys: ['Ctrl', 'e'] }, | ||
{ action: 'Select tab', keys: ['Meta', 'number'] }, | ||
{ action: 'New tab', keys: ['Meta', 'w'] }, | ||
{ action: 'Close current tab', keys: ['Meta', 't'] }, | ||
{ action: 'Focus on editor', keys: ['Ctrl', 'l'] }, | ||
{ action: 'Format query', keys: ['Ctrl', 'Shift', 'f'] }, | ||
{ action: 'Select next/previous result', keys: ['Ctrl', 'Shift', 'n/p'] }, | ||
{ action: 'Select next/previous page', keys: ['Ctrl', 'n/p'] }, | ||
]; | ||
|
||
const Keymaps = () => { | ||
return ( | ||
<div class="flex items-center justify-center"> | ||
<div class="flex flex-col items-end pr-1"> | ||
<For each={keymaps}> | ||
{({ action }) => ( | ||
<div class="h-[40px] flex items-center align-middle"> | ||
<span class="text-lg font-medium ">{action}</span> | ||
</div> | ||
)} | ||
</For> | ||
</div> | ||
<div class="flex flex-col items-start pl-1"> | ||
<For each={keymaps}> | ||
{({ keys }) => ( | ||
<div class="h-[40px] flex items-center"> | ||
<span class="flex gap-2"> | ||
<For each={keys}>{(key) => <kbd class="kbd kbd-sm">{key}</kbd>}</For> | ||
</span> | ||
</div> | ||
)} | ||
</For> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Keymaps; |