28 lines
736 B
Plaintext
28 lines
736 B
Plaintext
import Widget from require "lapis.html"
|
|
|
|
class extends Widget
|
|
content: =>
|
|
script -> raw "var API_KEY = '#{@keys[1].uuid}';"
|
|
script src: "/static/index.js"
|
|
p "API Keys:"
|
|
ul ->
|
|
if @keys
|
|
for key in *@keys
|
|
li key.uuid
|
|
-- li ->
|
|
-- a onclick: "new_key()"
|
|
|
|
p "Tasks:"
|
|
ul ->
|
|
if @tasks
|
|
for task in *@tasks
|
|
li ->
|
|
input type: "checkbox", id: "task-#{task.id}", onchange: "check(#{task.id});", checked: task.done
|
|
text " #{task.text}"
|
|
li ->
|
|
form {
|
|
onsubmit: "return new_task();"
|
|
}, ->
|
|
input type: "text", id: "new-task", placeholder: "new task"
|
|
input type: "submit", value: "add task"
|