2019-11-09 10:31:11 +03:00
|
|
|
/+ *server, default-agent, verb
|
|
|
|
/= tile-js
|
|
|
|
/^ octs
|
|
|
|
/; as-octs:mimes:html
|
|
|
|
/: /===/app/clock/js/tile
|
|
|
|
/| /js/
|
|
|
|
/~ ~
|
|
|
|
==
|
|
|
|
=, format
|
|
|
|
::
|
2019-11-27 01:56:20 +03:00
|
|
|
%+ verb |
|
2019-11-19 07:36:21 +03:00
|
|
|
^- agent:gall
|
|
|
|
|_ =bowl:gall
|
2019-11-09 23:22:59 +03:00
|
|
|
+* this .
|
|
|
|
def ~(. (default-agent this %|) bowl)
|
|
|
|
::
|
|
|
|
++ on-init
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (quip card:agent:gall _this)
|
2019-11-09 23:22:59 +03:00
|
|
|
=/ launcha
|
|
|
|
[%launch-action !>([%clock /tile '/~clock/js/tile.js'])]
|
|
|
|
:_ this
|
|
|
|
:~ [%pass / %arvo %e %connect [~ /'~clock'] %clock]
|
|
|
|
[%pass /clock %agent [our.bowl %launch] %poke launcha]
|
|
|
|
==
|
|
|
|
++ on-save on-save:def
|
|
|
|
++ on-load on-load:def
|
|
|
|
++ on-poke
|
|
|
|
|= [=mark =vase]
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (quip card:agent:gall _this)
|
2019-11-13 11:38:35 +03:00
|
|
|
?. ?=(%handle-http-request mark)
|
2019-11-09 23:22:59 +03:00
|
|
|
(on-poke:def mark vase)
|
2019-11-13 11:38:35 +03:00
|
|
|
=+ !<([eyre-id=@ta =inbound-request:eyre] vase)
|
2019-11-09 23:22:59 +03:00
|
|
|
:_ this
|
2019-11-13 11:38:35 +03:00
|
|
|
%+ give-simple-payload:app eyre-id
|
2019-11-09 23:22:59 +03:00
|
|
|
%+ require-authorization:app inbound-request
|
2019-11-09 10:31:11 +03:00
|
|
|
|= =inbound-request:eyre
|
|
|
|
=/ request-line (parse-request-line url.request.inbound-request)
|
|
|
|
=/ back-path (flop site.request-line)
|
|
|
|
=/ name=@t
|
|
|
|
=/ back-path (flop site.request-line)
|
|
|
|
?~ back-path
|
|
|
|
''
|
|
|
|
i.back-path
|
|
|
|
::
|
|
|
|
?~ back-path
|
|
|
|
not-found:gen
|
|
|
|
?: =(name 'tile')
|
|
|
|
(js-response:gen tile-js)
|
|
|
|
not-found:gen
|
|
|
|
::
|
|
|
|
++ on-watch
|
|
|
|
|= =path
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (quip card:agent:gall _this)
|
2019-11-13 11:38:35 +03:00
|
|
|
?: ?=([%http-response *] path)
|
|
|
|
`this
|
2019-11-09 10:31:11 +03:00
|
|
|
?. =(/tile path)
|
|
|
|
(on-watch:def path)
|
|
|
|
[[%give %fact ~ %json !>(*json)]~ this]
|
|
|
|
::
|
|
|
|
++ on-leave on-leave:def
|
|
|
|
++ on-peek on-peek:def
|
|
|
|
++ on-agent on-agent:def
|
|
|
|
++ on-arvo
|
|
|
|
|= [=wire =sign-arvo]
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (quip card:agent:gall _this)
|
2019-11-09 10:31:11 +03:00
|
|
|
?. ?=(%bound +<.sign-arvo)
|
|
|
|
(on-arvo:def wire sign-arvo)
|
|
|
|
[~ this]
|
|
|
|
::
|
|
|
|
++ on-fail on-fail:def
|
|
|
|
--
|