Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-12 19:12:29 +02:00
commit e8e64eff12
101 changed files with 10081 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package keys
import (
"charm.land/bubbles/v2/key"
"github.com/anotherhadi/spilltea/internal/config"
)
type HistoryKeyMap struct {
DeleteEntry key.Binding
DeleteAll key.Binding
Filter key.Binding
SqlQuery key.Binding
}
func newHistoryKeyMap(cfg config.HistoryKeys) HistoryKeyMap {
return HistoryKeyMap{
DeleteEntry: binding(cfg.DeleteEntry, "delete entry"),
DeleteAll: binding(cfg.DeleteAll, "delete all"),
Filter: binding(cfg.Filter, "filter"),
SqlQuery: binding(cfg.SqlQuery, "sql query"),
}
}
func (h HistoryKeyMap) Bindings() []key.Binding {
return []key.Binding{h.DeleteEntry, h.DeleteAll}
}