mirror of
https://github.com/urbit/shrub.git
synced 2024-09-11 20:27:19 +03:00
finish merge from wh/sky-post-pokes
This commit is contained in:
parent
4214663f2e
commit
168180c258
@ -44,7 +44,7 @@
|
||||
;button.br1.border.b1.hover
|
||||
=style "padding: 4px 8px;"
|
||||
=type "button"
|
||||
=pith "/{(scow %p our.bowl)}{(en-tape:pith:neo here.bowl)}"
|
||||
=pith "{(en-tape:pith:neo here.bowl)}"
|
||||
=onclick "navigator.clipboard.writeText(this.getAttribute('pith'));"
|
||||
; copy path
|
||||
==
|
||||
|
@ -50,7 +50,7 @@
|
||||
*manx
|
||||
=. here.kid (snoc here.kid %in)
|
||||
(!<(htmx q.pail.u.res) kid)
|
||||
=/ out=manx
|
||||
=/ out=manx
|
||||
?~ res=(~(get of:neo kids.bowl) (snoc pax %out))
|
||||
*manx
|
||||
=. here.kid (snoc here.kid %out)
|
||||
@ -61,6 +61,7 @@
|
||||
=id "cell-{id}-{<x>}-{<y>}"
|
||||
=hx-get "/neo/hawk{(en-tape:pith:neo here.bowl)}/{<x>}/{<y>}/in"
|
||||
=hx-target "#dashboard-{id}"
|
||||
=hx-select "form"
|
||||
=hx-swap "innerHTML"
|
||||
=morph-retain "class"
|
||||
=onclick "$('.cell-btn').removeClass('toggled');$(this).addClass('toggled');"
|
||||
|
@ -35,10 +35,9 @@
|
||||
^- (unit sky-settings)
|
||||
=/ s (~(get of:neo kids.bowl) /settings)
|
||||
?~ s ~
|
||||
~
|
||||
:: :- ~
|
||||
:: !< sky-settings
|
||||
:: q.pail.u.s
|
||||
:- ~
|
||||
!< sky-settings
|
||||
q.pail.u.s
|
||||
;style
|
||||
;+ ;/
|
||||
?~ settings
|
||||
|
@ -1,6 +1,6 @@
|
||||
/@ htmx-type=htmx
|
||||
/- feather-icons
|
||||
/- serv=server
|
||||
/- serv=sky-server
|
||||
/> htmx
|
||||
/< node
|
||||
=>
|
||||
@ -8,24 +8,6 @@
|
||||
++ manx-to-octs
|
||||
|= man=manx
|
||||
(as-octt:mimes:html (en-xml:html man))
|
||||
++ parse-url
|
||||
|= =request:http
|
||||
^- [pax=path pam=(map @t @t)]
|
||||
=/ parsed
|
||||
%+ rash url.request
|
||||
;~ plug
|
||||
;~(pfix fas (more fas smeg:de-purl:html))
|
||||
yque:de-purl:html
|
||||
==
|
||||
:: strip first 2 segments (/neo/hawk)
|
||||
:- (slag 2 -.parsed)
|
||||
(malt +.parsed)
|
||||
++ parse-body
|
||||
|= =request:http
|
||||
^- manx
|
||||
%+ fall
|
||||
(de-xml:html q:(fall body.request [p=0 q='']))
|
||||
*manx
|
||||
++ eyre-cards
|
||||
|= [eyre-id=@ta =bowl:neo status=@ud =manx]
|
||||
^- (list card:neo)
|
||||
@ -236,13 +218,14 @@
|
||||
=/ [=stud:neo =vase] (need pal)
|
||||
=+ !<([eyre-id=@ta req=inbound-request:eyre] vase)
|
||||
:_ [stud vase]
|
||||
?. authenticated.req
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
403
|
||||
;div: 403
|
||||
==
|
||||
::XX revive when auth
|
||||
::?. authenticated.req
|
||||
:: %: eyre-cards
|
||||
:: eyre-id
|
||||
:: bowl
|
||||
:: 403
|
||||
:: ;div: 403
|
||||
:: ==
|
||||
?~ src=(~(get by deps.bowl) %src)
|
||||
=/ main
|
||||
;div.wf.hf.fc.jc.ac: nothing here
|
||||
@ -254,6 +237,12 @@
|
||||
200
|
||||
~(lift hawk #/[p/our.bowl] main raw |)
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
200
|
||||
~(lift hawk #/[p/our.bowl] main raw |)
|
||||
==
|
||||
=/ here p.u.src
|
||||
^- (list card:neo)
|
||||
?+ method.request.req ~|(%unsupported-http-method !!)
|
||||
@ -276,15 +265,20 @@
|
||||
200
|
||||
~(lift hawk here.bol main raw &)
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
200
|
||||
~(lift hawk here.bol main raw &)
|
||||
==
|
||||
::
|
||||
%'POST'
|
||||
=/ purl (parse-url request.req)
|
||||
=/ body (parse-body request.req)
|
||||
=/ purl (parse-url:serv request.req)
|
||||
=/ body (parse-body:serv request.req)
|
||||
=/ poke-stud
|
||||
^- stud:neo
|
||||
~| %no-stud-specified
|
||||
(~(got by pam.purl) 'stud')
|
||||
::=/ mul `(each ^vase tang)`[%.y p=!>(~)] :: stub for build system bug
|
||||
=/ mul (mule |.((node [poke-stud body])))
|
||||
?- -.mul
|
||||
%.n
|
||||
@ -299,6 +293,17 @@
|
||||
;div: {(of-wall:format (~(win re tank) 0 55))}
|
||||
==
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
400
|
||||
;div
|
||||
;*
|
||||
%+ turn (tang p.mul)
|
||||
|= =tank
|
||||
;div: {(of-wall:format (~(win re tank) 0 55))}
|
||||
==
|
||||
==
|
||||
::
|
||||
%.y
|
||||
=/ =pail:neo [poke-stud p.mul]
|
||||
@ -324,6 +329,12 @@
|
||||
200
|
||||
manx
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
200
|
||||
manx
|
||||
==
|
||||
==
|
||||
==
|
||||
--
|
||||
|
@ -1,5 +1,5 @@
|
||||
/@ eyre-reqs
|
||||
/- serv=server
|
||||
/- serv=sky-server
|
||||
^- kook:neo
|
||||
|%
|
||||
++ state pro/%sig
|
||||
@ -21,8 +21,8 @@
|
||||
%eyre-task
|
||||
=+ !<(=task:eyre:neo vax)
|
||||
=/ [eyre-id=@ta req=inbound-request:eyre] task
|
||||
=/ lin (parse-request-line:serv url.request.req)
|
||||
=/ inner=pith:neo (pave:neo (slag 2 site.lin))
|
||||
=/ purl (parse-url:serv request.req)
|
||||
=/ inner=pith:neo (pave:neo pax.purl)
|
||||
=/ =crew:neo (~(gas by *crew:neo) src/inner ~)
|
||||
=/ =made:neo [%hawk-eyre-handler `[stud vax] crew]
|
||||
:_ sig/!>(~)
|
||||
|
@ -16,7 +16,6 @@
|
||||
[#/[p/our.bowl]/home/tasks %make %task `task/!>(['' | ~]) ~]
|
||||
[#/[p/our.bowl]/home/sail %make %sail `sail/!>(['' 'prose p3' ~]) ~]
|
||||
[#/[p/our.bowl]/home/accel %make %accel ~ ~]
|
||||
[#/[p/our.bowl]/home/iframes/wiki %make %iframe `iframe/!>('https://docs.urbit.org') ~]
|
||||
[#/[p/our.bowl]/home/circle %make %circle ~ ~]
|
||||
[#/[p/our.bowl]/home/files %make %folder ~ ~]
|
||||
[#/[p/our.bowl]/home/planner %make %planner ~ ~]
|
||||
|
20
pkg/arvo/neo/cod/std/src/lib/sky-server.hoon
Normal file
20
pkg/arvo/neo/cod/std/src/lib/sky-server.hoon
Normal file
@ -0,0 +1,20 @@
|
||||
|%
|
||||
++ parse-url
|
||||
|= =request:http
|
||||
^- [pax=path pam=(map @t @t)]
|
||||
=/ parsed
|
||||
%+ rash url.request
|
||||
;~ plug
|
||||
;~(pfix fas (more fas smeg:de-purl:html))
|
||||
yque:de-purl:html
|
||||
==
|
||||
:: strip first 2 segments (/neo/hawk)
|
||||
:- (slag 2 -.parsed)
|
||||
(malt +.parsed)
|
||||
++ parse-body
|
||||
|= =request:http
|
||||
^- manx
|
||||
%+ fall
|
||||
(de-xml:html q:(fall body.request [p=0 q='']))
|
||||
*manx
|
||||
--
|
Loading…
Reference in New Issue
Block a user