diff --git a/app/client.imba b/app/client.imba index 9ef4d8b..ba7df4b 100644 --- a/app/client.imba +++ b/app/client.imba @@ -61,12 +61,15 @@ tag app -link.frequency def navigate link + window.location.href = "//{link.link}" + + def update_link link link.last_opened = Date.now! link.frequency = link.frequency + 1 await db.put link def handle_click_link link - navigate link + update_link link def use_search_engine state.config.search_engine_frequency += 1 @@ -78,7 +81,9 @@ tag app if state.scored_links.length < 1 use_search_engine! else - navigate state.scored_links[selection_index] + let link = state.scored_links[selection_index] + update_link link + navigate link def handle_shift_return use_search_engine! diff --git a/package.json b/package.json index 1ee9df9..a5b68f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fuzzyhome", - "version": "0.0.31", + "version": "0.0.32", "scripts": { "start": "imba run -SMH --baseurl . -w server.imba", "build-app": "rm -rf dist && imba build -SMH --baseurl . server.imba", diff --git a/sw.imba b/sw.imba index 43b0c9a..de78fd0 100644 --- a/sw.imba +++ b/sw.imba @@ -1,7 +1,7 @@ let p = console.log const app_prefix = "fuzzyhome_cache" -const version = "0.0.31" +const version = "0.0.32" const cache_name = "{app_prefix}-{version}"