|
@ -396,6 +396,10 @@ tag app |
|
|
save_config! |
|
|
save_config! |
|
|
settings_active = no |
|
|
settings_active = no |
|
|
|
|
|
|
|
|
|
|
|
def handle_click_toggle_simplify_ui |
|
|
|
|
|
config.enable_simplify_ui = not config.enable_simplify_ui |
|
|
|
|
|
save_config! |
|
|
|
|
|
|
|
|
get pretty_date |
|
|
get pretty_date |
|
|
Date!.toString!.split(" ").slice(0, 4).join(" ") |
|
|
Date!.toString!.split(" ").slice(0, 4).join(" ") |
|
|
|
|
|
|
|
@ -505,6 +509,9 @@ tag app |
|
|
rd:3px c:purple4 fs:15px cursor:pointer |
|
|
rd:3px c:purple4 fs:15px cursor:pointer |
|
|
px:3px |
|
|
px:3px |
|
|
|
|
|
|
|
|
|
|
|
css .link-button svg |
|
|
|
|
|
w:15px |
|
|
|
|
|
|
|
|
css .selected .link-button |
|
|
css .selected .link-button |
|
|
visibility:visible |
|
|
visibility:visible |
|
|
|
|
|
|
|
@ -523,12 +530,11 @@ tag app |
|
|
Consider refreshing. |
|
|
Consider refreshing. |
|
|
Check developer console for more information. |
|
|
Check developer console for more information. |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
<[c:purple3/90 cursor:pointer fs:14px pb:20px] |
|
|
|
|
|
@click.if(!loading)=toggle_settings |
|
|
|
|
|
> "SETTINGS" |
|
|
|
|
|
|
|
|
|
|
|
if settings_active |
|
|
if settings_active |
|
|
|
|
|
<.settings-container> |
|
|
|
|
|
<.settings-button |
|
|
|
|
|
@click=(settings_active = no) |
|
|
|
|
|
> "BACK" |
|
|
<.settings-container> |
|
|
<.settings-container> |
|
|
<label.settings-button .disabled=loading> |
|
|
<label.settings-button .disabled=loading> |
|
|
"IMPORT" |
|
|
"IMPORT" |
|
@ -577,23 +583,55 @@ tag app |
|
|
config.enable_dark_theme ? "DISABLE DARK THEME" : "ENABLE DARK THEME" |
|
|
config.enable_dark_theme ? "DISABLE DARK THEME" : "ENABLE DARK THEME" |
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
<input$main-input |
|
|
|
|
|
bind=state.query |
|
|
<.header> |
|
|
# placeholder=pretty_date |
|
|
css |
|
|
@hotkey('return').capture=handle_return |
|
|
d:flex fld:row w:100% |
|
|
@hotkey('shift+return').capture.if(can_add)=handle_shift_return |
|
|
|
|
|
@hotkey('shift+backspace').capture=handle_shift_backspace |
|
|
css $main-input |
|
|
@hotkey('down').capture=increment_selection_index |
|
|
fl:1 |
|
|
@hotkey('up').capture=decrement_selection_index |
|
|
|
|
|
@keydown.del=handle_del |
|
|
css .side |
|
|
@input=handle_input |
|
|
c:purple3/90 fs:15px |
|
|
@paste=handle_paste |
|
|
d:flex ja:center w:30px |
|
|
@blur=this.focus |
|
|
|
|
|
.disabled=loading |
|
|
css .side svg |
|
|
disabled=loading |
|
|
w:15px cursor:pointer |
|
|
> |
|
|
|
|
|
|
|
|
css .left |
|
|
if config.enable_tips |
|
|
d:flex jc:left |
|
|
|
|
|
|
|
|
|
|
|
css .right |
|
|
|
|
|
d:flex jc:right |
|
|
|
|
|
|
|
|
|
|
|
<.side.left |
|
|
|
|
|
@click=handle_click_toggle_simplify_ui |
|
|
|
|
|
> |
|
|
|
|
|
if config.enable_simplify_ui |
|
|
|
|
|
<svg src="./assets/eye-off.svg"> |
|
|
|
|
|
else |
|
|
|
|
|
<svg src="./assets/eye.svg"> |
|
|
|
|
|
|
|
|
|
|
|
<input$main-input |
|
|
|
|
|
bind=state.query |
|
|
|
|
|
# placeholder=pretty_date |
|
|
|
|
|
@hotkey('return').capture=handle_return |
|
|
|
|
|
@hotkey('shift+return').capture.if(can_add)=handle_shift_return |
|
|
|
|
|
@hotkey('shift+backspace').capture=handle_shift_backspace |
|
|
|
|
|
@hotkey('down').capture=increment_selection_index |
|
|
|
|
|
@hotkey('up').capture=decrement_selection_index |
|
|
|
|
|
@keydown.del=handle_del |
|
|
|
|
|
@input=handle_input |
|
|
|
|
|
@paste=handle_paste |
|
|
|
|
|
@blur=this.focus |
|
|
|
|
|
.disabled=loading |
|
|
|
|
|
disabled=loading |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
<.side.right @click.if(!loading)=toggle_settings> |
|
|
|
|
|
<svg src="./assets/settings.svg"> |
|
|
|
|
|
|
|
|
|
|
|
if config.enable_tips and not config.enable_simplify_ui |
|
|
<.middle-button> |
|
|
<.middle-button> |
|
|
<.tip[jc:start ta:left fl:1] @click=handle_return> |
|
|
<.tip[jc:start ta:left fl:1] @click=handle_return> |
|
|
<.tip-hotkey> "Return" |
|
|
<.tip-hotkey> "Return" |
|
@ -653,19 +691,22 @@ tag app |
|
|
<span> link.name |
|
|
<span> link.name |
|
|
<span.parens> ")" |
|
|
<span.parens> ")" |
|
|
<.link-right> |
|
|
<.link-right> |
|
|
<.link-buttons .buttons-disabled=!config.enable_buttons> |
|
|
<.link-buttons .buttons-disabled=(not config.enable_buttons or config.enable_simplify_ui)> |
|
|
<.link-button |
|
|
<.link-button |
|
|
@click.if(link.is_bang).prevent.stop=handle_click_make_default_bang(link) |
|
|
@click.if(link.is_bang).prevent.stop=handle_click_make_default_bang(link) |
|
|
[visibility:hidden]=!link.is_bang |
|
|
[visibility:hidden]=!link.is_bang |
|
|
> "B" |
|
|
> |
|
|
<.link-button@click.prevent.stop=handle_click_edit(link)> "E" |
|
|
<svg src='./assets/search.svg'> |
|
|
<.link-button@click.prevent.stop=handle_click_delete(link)> "D" |
|
|
<.link-button@click.prevent.stop=handle_click_edit(link)> |
|
|
|
|
|
<svg src='./assets/edit-2.svg'> |
|
|
|
|
|
<.link-button@click.prevent.stop=handle_click_delete(link)> |
|
|
|
|
|
<svg src='./assets/trash.svg'> |
|
|
<.link-button |
|
|
<.link-button |
|
|
@click.prevent.stop=handle_click_pin(link) |
|
|
@click.prevent.stop=handle_click_pin(link) |
|
|
[visibility:visible c:purple3/50]=(link.is_pinned and (index isnt selection_index or !config.enable_buttons)) |
|
|
[visibility:visible c:purple3/50]=(link.is_pinned and (index isnt selection_index or not config.enable_buttons or config.enable_simplify_ui)) |
|
|
> "P" |
|
|
> |
|
|
|
|
|
<svg src='./assets/star.svg'> |
|
|
<.frequency> link.frequency |
|
|
<.frequency> link.frequency |
|
|
# <[c:purple3 pt:10px fs:10px]> state.scored_links.length |
|
|
|
|
|
$main-input.focus! |
|
|
$main-input.focus! |
|
|
|
|
|
|
|
|
imba.mount <app> |
|
|
imba.mount <app> |
|
|