feat: add preview/delete-output to TUI, replace how-it-works with tutorial gif
CLI: - p key opens file with system viewer (input in file list, output in results) - x key deletes converted output file from disk in results state - New 'deleted' status shown in red in the status column - Updated help overlay and bottom bar keybindings Web: - Replace three-step timeline in 'How it works' with Tuturial.gif - GIF shown in browser-style window frame matching site design
This commit is contained in:
+23
-13
@@ -4,19 +4,21 @@ import "github.com/charmbracelet/bubbles/key"
|
||||
|
||||
// KeyMap defines key bindings for the TUI.
|
||||
type KeyMap struct {
|
||||
Up key.Binding
|
||||
Down key.Binding
|
||||
Left key.Binding
|
||||
Right key.Binding
|
||||
Enter key.Binding
|
||||
Space key.Binding
|
||||
Tab key.Binding
|
||||
Delete key.Binding
|
||||
SelectAll key.Binding
|
||||
Convert key.Binding
|
||||
Quit key.Binding
|
||||
Help key.Binding
|
||||
Back key.Binding
|
||||
Up key.Binding
|
||||
Down key.Binding
|
||||
Left key.Binding
|
||||
Right key.Binding
|
||||
Enter key.Binding
|
||||
Space key.Binding
|
||||
Tab key.Binding
|
||||
Delete key.Binding
|
||||
SelectAll key.Binding
|
||||
Convert key.Binding
|
||||
Quit key.Binding
|
||||
Help key.Binding
|
||||
Back key.Binding
|
||||
Preview key.Binding
|
||||
DeleteOutput key.Binding
|
||||
}
|
||||
|
||||
// DefaultKeyMap returns the default key bindings.
|
||||
@@ -74,5 +76,13 @@ func DefaultKeyMap() KeyMap {
|
||||
key.WithKeys("esc"),
|
||||
key.WithHelp("esc", "back"),
|
||||
),
|
||||
Preview: key.NewBinding(
|
||||
key.WithKeys("p"),
|
||||
key.WithHelp("p", "preview file"),
|
||||
),
|
||||
DeleteOutput: key.NewBinding(
|
||||
key.WithKeys("x"),
|
||||
key.WithHelp("x", "delete output"),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user