Browse Source

use parenthesis instead of ~, change default names

main
familyfriendlymikey 2 years ago
parent
commit
f5e3489c3f
  1. 34
      app/client.imba

34
app/client.imba

@ -50,13 +50,13 @@ tag app
def add_initial_links def add_initial_links
let initial_links = [ let initial_links = [
"tutorial github.com/familyfriendlymikey/fuzzyhome" "tutorial github.com/familyfriendlymikey/fuzzyhome"
"!brave search search.brave.com/search?q=" "!brave search ~b search.brave.com/search?q="
"!youtube ~y youtube.com/results?search_query=" "!youtube youtube.com/results?search_query="
"photopea photopea.com" "photopea photopea.com"
"twitch twitch.tv" "twitch twitch.tv"
"messenger ~m messenger.com" "messenger ~me messenger.com"
"instagram ~in instagram.com" "instagram ~in instagram.com"
"localhost:3000 ~3 http://localhost:3000" "localhost ~3000 http://localhost:3000"
] ]
for link in initial_links for link in initial_links
try try
@ -331,14 +331,8 @@ tag app
get pretty_date get pretty_date
Date!.toString!.split(" ").slice(0, 4).join(" ") Date!.toString!.split(" ").slice(0, 4).join(" ")
def handle_keyup e
if e.keyCode is 16
holding_shift = not holding_shift
def render def render
<self <self>
@keyup=handle_keyup
>
css body css body
d:flex fld:column jc:flex-start ai:center d:flex fld:column jc:flex-start ai:center
@ -391,7 +385,7 @@ tag app
css .link css .link
d:flex fld:row jc:space-between ai:center d:flex fld:row jc:space-between ai:center
px:15px py:10px rd:5px cursor:pointer c:blue3 px:16px py:11px rd:5px cursor:pointer c:blue3
css .link-left css .link-left
d:flex fl:1 d:flex fl:1
@ -411,7 +405,10 @@ tag app
css .name css .name
d:flex ja:center d:flex ja:center
c:gray4 ml:14px fs:14px c:gray4 ml:10px fs:14px
css .parens
fs:10px c:gray4/80
css .bang-text css .bang-text
tt:none word-break:break-all tt:none word-break:break-all
@ -510,9 +507,14 @@ tag app
> >
<.link-left> <.link-left>
<img.link-icon src=link.icon> <img.link-icon src=link.icon>
<.display-name> link.display_name <.display-name
if index is selection_index or holding_shift [c:purple3/90]=link.is_bang
<.name> "{link.is_bang ? "!" : "~"}{link.name}" > link.display_name
if link.display_name isnt link.name
<.name>
<span.parens> "("
<span> link.name
<span.parens> ")"
<.link-right> <.link-right>
<.link-buttons> <.link-buttons>
<.link-button[fs:12px]@click.prevent.stop=handle_click_edit(link)> "✎" <.link-button[fs:12px]@click.prevent.stop=handle_click_edit(link)> "✎"

Loading…
Cancel
Save