Browse Source

implement paste handling

main
Mikey Oz 3 years ago
parent
commit
491145ad3f
  1. 6
      app/client.imba
  2. 2
      package.json
  3. 2
      sw.imba

6
app/client.imba

@ -94,6 +94,11 @@ tag app
def handle_click_export
download_json_file JSON.stringify(state.links)
def handle_paste e
return if state.query.length > 0
global.setTimeout(&, 0) do
window.location.href = 'https://www.google.com/search?q=' + state.query.trim!
def render
<self>
@ -145,6 +150,7 @@ tag app
@hotkey('shift+return').capture=handle_shift_return
@hotkey('esc').capture=$input..blur
@input=handle_input
@paste=handle_paste
>
<.links>
for obj in state.scored_links

2
package.json

@ -1,6 +1,6 @@
{
"name": "fuzzyhome",
"version": "0.0.6",
"version": "0.0.7",
"scripts": {
"start": "imba run -SMH --baseurl . -w server.imba",
"build-app": "imba build -SMH --baseurl . server.imba",

2
sw.imba

@ -1,7 +1,7 @@
let p = console.log
const app_prefix = "fuzzyhome_cache"
const version = "0.0.6"
const version = "0.0.7"
const cache_name = "{app_prefix}-{version}"

Loading…
Cancel
Save