From 5c3424e89f5edb9fa5793be2ba348601e96f1be6 Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Thu, 3 Apr 2025 01:14:37 +1000 Subject: [PATCH] remove macro description --- config.go | 9 +- jsonrpc.go | 10 +- ui/src/components/MacroBar.tsx | 2 +- ui/src/routes/devices.$id.settings.macros.tsx | 122 +++++++----------- 4 files changed, 53 insertions(+), 90 deletions(-) diff --git a/config.go b/config.go index 82c1cd3..1c1b98d 100644 --- a/config.go +++ b/config.go @@ -44,11 +44,10 @@ func (s *KeyboardMacroStep) Validate() error { } type KeyboardMacro struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description,omitempty"` - Steps []KeyboardMacroStep `json:"steps"` - SortOrder int `json:"sortOrder,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Steps []KeyboardMacroStep `json:"steps"` + SortOrder int `json:"sortOrder,omitempty"` } func (m *KeyboardMacro) Validate() error { diff --git a/jsonrpc.go b/jsonrpc.go index c5dbcf4..5dc19e0 100644 --- a/jsonrpc.go +++ b/jsonrpc.go @@ -822,7 +822,6 @@ func setKeyboardMacros(params KeyboardMacrosParams) (interface{}, error) { } name, _ := macroMap["name"].(string) - description, _ := macroMap["description"].(string) sortOrder := i + 1 if sortOrderFloat, ok := macroMap["sortOrder"].(float64); ok { @@ -864,11 +863,10 @@ func setKeyboardMacros(params KeyboardMacrosParams) (interface{}, error) { } macro := KeyboardMacro{ - ID: id, - Name: name, - Description: description, - Steps: steps, - SortOrder: sortOrder, + ID: id, + Name: name, + Steps: steps, + SortOrder: sortOrder, } if err := macro.Validate(); err != nil { diff --git a/ui/src/components/MacroBar.tsx b/ui/src/components/MacroBar.tsx index 5f513b7..a0a7275 100644 --- a/ui/src/components/MacroBar.tsx +++ b/ui/src/components/MacroBar.tsx @@ -33,7 +33,7 @@ export default function MacroBar() { {macros.map(macro => (