You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.1 KiB

tag app-links
2 years ago
get tips
2 years ago
let result = []
2 years ago
result.push <>
<.tip
@click=api.handle_click_link
@hotkey('return').force=api.handle_click_link
>
<.tip-hotkey> "Return"
if api.selected_link.is_bang
<.tip-content> "Use Bang"
else
<.tip-content> "Navigate To Link"
2 years ago
result.push <>
2 years ago
<.tip
2 years ago
@click=api.handle_add_link
@hotkey('shift+return').force=api.handle_add_link
2 years ago
>
<.tip-hotkey> "Shift + Return"
<.tip-content.ellipsis>
<span[ws:pre]> "Create Link "
let sq = state.query.trim!.split /\s+/
if sq.length >= 2
let url = sq.pop!
<span> '"'
<span> sq.join " "
<span[c:blue3 ws:pre]> " {url}"
<span> '"'
else
<span> "\"{sq.join " "}\""
2 years ago
result.push <>
2 years ago
<.tip
@click=handle_edit
@hotkey('shift+backspace').force=handle_edit
2 years ago
>
<.tip-hotkey> "Shift + Backspace"
<.tip-content> "Edit Link"
2 years ago
result.push <>
2 years ago
<.tip
@click=api.toggle_effective_names
@hotkey('tab').force=api.toggle_effective_names
2 years ago
>
<.tip-hotkey> "Tab"
<.tip-content> "Toggle Effective Names"
2 years ago
result.push <>
2 years ago
<.tip
@click=refs.settings.open
@hotkey('shift+tab').force=refs.settings.open
2 years ago
>
<.tip-hotkey> "Shift + Tab"
<.tip-content> "Toggle Settings"
2 years ago
result.push <>
<.tip @click=api.handle_cut>
2 years ago
if api.math_result
<.tip-hotkey> "Cut (Math, If No Selection)"
<.tip-content> "Cut Math Result"
else
<.tip-hotkey> "Cut (If No Selection)"
<.tip-content> "Cut All Text"
2 years ago
result.push <>
2 years ago
<.tip.noclick
@hotkey('down').force=api.increment_link_selection_index
@hotkey('up').force=api.decrement_link_selection_index
2 years ago
>
<.tip-hotkey> "Up/Down Arrow"
<.tip-content> "Move Selection"
2 years ago
result.push <>
2 years ago
<.tip.noclick>
<.tip-hotkey> "Paste (If Input Empty)"
<.tip-content> "Instant Search"
2 years ago
result
2 years ago
def render
2 years ago
<self>
2 years ago
css w:100% d:flex fld:column gap:15px ofy:hidden
2 years ago
2 years ago
<app-tips$tips tips=tips>
2 years ago
2 years ago
unless $tips.show_more
<.links>
css ofy:scroll
for link, index in state.sorted_links
<app-link link=link index=index>