Browse Source

ensure frequency gets incremented on link click/return

main
familyfriendlymikey 2 years ago
parent
commit
5f7966d984
  1. 7
      app/client.imba
  2. 2
      package.json

7
app/client.imba

@ -169,7 +169,8 @@ tag app
err "adding link", e err "adding link", e
def handle_click_link link def handle_click_link link
increment_link_frequency link await increment_link_frequency link
window.location.href = "//{link.url}"
def handle_click_search def handle_click_search
increment_search_engine_frequency! increment_search_engine_frequency!
@ -179,7 +180,7 @@ tag app
use_search_engine! use_search_engine!
else else
let link = state.scored_links[selection_index] let link = state.scored_links[selection_index]
increment_link_frequency link await increment_link_frequency link
window.location.href = "//{link.url}" window.location.href = "//{link.url}"
def handle_click_add def handle_click_add
@ -390,7 +391,7 @@ tag app
<a.link <a.link
href="//{link.url}" href="//{link.url}"
@pointerover=(selection_index = index) @pointerover=(selection_index = index)
@click=handle_click_link(link) @click.prevent=handle_click_link(link)
.selected=(index == selection_index) .selected=(index == selection_index)
> >
<.link-left> <.link-left>

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fuzzyhome", "name": "fuzzyhome",
"version": "0.1.2", "version": "0.1.3",
"scripts": { "scripts": {
"start": "imba run -SMH --baseurl . -w server.imba", "start": "imba run -SMH --baseurl . -w server.imba",
"build-app": "rm -rf dist && imba build -SMH --baseurl . server.imba", "build-app": "rm -rf dist && imba build -SMH --baseurl . server.imba",

Loading…
Cancel
Save