simplex/views/index/logged_in.moon

30 lines
943 B
Plaintext
Raw Normal View History

2018-04-23 12:22:27 +00:00
import Widget from require "lapis.html"
class LoggedIn extends Widget
content: =>
script -> raw "var API_KEY = '#{@keys[1].key}';"
2018-04-24 13:23:46 +00:00
script src: "https://code.jquery.com/jquery-3.3.1.min.js", integrity: "sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=", crossorigin: "anonymous"
2018-04-23 12:22:27 +00:00
script src: "/static/index.js"
p "API Keys:"
ul ->
if @keys
for key in *@keys
li key.key
li id: "new-api-key", ->
button onclick: "new_api_key()", "+"
2018-04-23 12:22:27 +00:00
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.content}"
li id: "new-task", ->
2018-04-23 12:22:27 +00:00
form {
onsubmit: "return new_task();"
}, ->
input type: "text", id: "new-task-input", placeholder: "new task"
2018-04-23 12:22:27 +00:00
input type: "submit", value: "+"