diff --git a/app/client.imba b/app/client.imba index 92d8dc8..7b7070d 100644 --- a/app/client.imba +++ b/app/client.imba @@ -396,6 +396,10 @@ tag app save_config! settings_active = no + def handle_click_toggle_simplify_ui + config.enable_simplify_ui = not config.enable_simplify_ui + save_config! + get pretty_date Date!.toString!.split(" ").slice(0, 4).join(" ") @@ -505,6 +509,9 @@ tag app rd:3px c:purple4 fs:15px cursor:pointer px:3px + css .link-button svg + w:15px + css .selected .link-button visibility:visible @@ -523,12 +530,11 @@ tag app Consider refreshing. Check developer console for more information. """ - - <[c:purple3/90 cursor:pointer fs:14px pb:20px] - @click.if(!loading)=toggle_settings - > "SETTINGS" - if settings_active + <.settings-container> + <.settings-button + @click=(settings_active = no) + > "BACK" <.settings-container> "IMPORT" @@ -577,23 +583,55 @@ tag app config.enable_dark_theme ? "DISABLE DARK THEME" : "ENABLE DARK THEME" else - - - if config.enable_tips + + <.header> + css + d:flex fld:row w:100% + + css $main-input + fl:1 + + css .side + c:purple3/90 fs:15px + d:flex ja:center w:30px + + css .side svg + w:15px cursor:pointer + + css .left + d:flex jc:left + + css .right + d:flex jc:right + + <.side.left + @click=handle_click_toggle_simplify_ui + > + if config.enable_simplify_ui + + else + + + + + <.side.right @click.if(!loading)=toggle_settings> + + + if config.enable_tips and not config.enable_simplify_ui <.middle-button> <.tip[jc:start ta:left fl:1] @click=handle_return> <.tip-hotkey> "Return" @@ -653,19 +691,22 @@ tag app link.name ")" <.link-right> - <.link-buttons .buttons-disabled=!config.enable_buttons> + <.link-buttons .buttons-disabled=(not config.enable_buttons or config.enable_simplify_ui)> <.link-button @click.if(link.is_bang).prevent.stop=handle_click_make_default_bang(link) [visibility:hidden]=!link.is_bang - > "B" - <.link-button@click.prevent.stop=handle_click_edit(link)> "E" - <.link-button@click.prevent.stop=handle_click_delete(link)> "D" + > + + <.link-button@click.prevent.stop=handle_click_edit(link)> + + <.link-button@click.prevent.stop=handle_click_delete(link)> + <.link-button @click.prevent.stop=handle_click_pin(link) - [visibility:visible c:purple3/50]=(link.is_pinned and (index isnt selection_index or !config.enable_buttons)) - > "P" + [visibility:visible c:purple3/50]=(link.is_pinned and (index isnt selection_index or not config.enable_buttons or config.enable_simplify_ui)) + > + <.frequency> link.frequency - # <[c:purple3 pt:10px fs:10px]> state.scored_links.length $main-input.focus! imba.mount diff --git a/app/config.imba b/app/config.imba index e1413ae..d8644b6 100644 --- a/app/config.imba +++ b/app/config.imba @@ -14,5 +14,6 @@ config.enable_buttons = yes config.enable_search_on_paste = yes config.enable_dark_theme = yes config.enable_effective_names = yes +config.enable_simplify_ui = no export default config