From 5901270521064aac8edf41a81072361e730c69d4 Mon Sep 17 00:00:00 2001 From: familyfriendlymikey Date: Tue, 6 Sep 2022 17:23:01 -0400 Subject: [PATCH] refactor tips for --- app/components/app-community-links.imba | 61 +++++++++++++++---------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/app/components/app-community-links.imba b/app/components/app-community-links.imba index 7f15843..40dc541 100644 --- a/app/components/app-community-links.imba +++ b/app/components/app-community-links.imba @@ -56,30 +56,43 @@ tag app-community-links get tips let result = [] - - result.push <> - <.tip - @click=close - @hotkey("esc").force=close - > - <.tip-hotkey> "Esc" - <.tip-content> "Exit Community Links" - - result.push <> - <.tip - @click=add_community_link - @hotkey("shift+return").force=add_community_link - > - <.tip-hotkey> "Shift + Return Or Click" - <.tip-content> "Add To Your Links" - - result.push <> - <.tip.noclick - @hotkey('down').force=increment_selection_index - @hotkey('up').force=decrement_selection_index - > - <.tip-hotkey> "Up/Down Arrow" - <.tip-content> "Move Selection" + let temp + + temp = { + click_handler: close.bind(this) + hotkey_handler: close.bind(this) + hotkey: "esc" + hotkey_display_name: "Esc" + content: "Exit Community Links" + } + result.push temp + + temp = { + click_handler: add_community_link.bind(this) + hotkey_handler: add_community_link.bind(this) + hotkey: "shift+return" + hotkey_display_name: "Shift + Return Or Click" + content: "Add To Your Links" + } + result.push temp + + temp = { + click_handler: increment_selection_index.bind(this) + hotkey_handler: increment_selection_index.bind(this) + hotkey: 'down' + hotkey_display_name: "Down Arrow" + content: "Move Selection Down" + } + result.push temp + + temp = { + click_handler: decrement_selection_index.bind(this) + hotkey_handler: decrement_selection_index.bind(this) + hotkey: 'up' + hotkey_display_name: "Up Arrow" + content: "Move Selection Up" + } + result.push temp result