mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 13:06:09 +03:00
accel: add poke routing
This commit is contained in:
parent
3ca2ccab47
commit
4ba42f9043
@ -5,7 +5,7 @@
|
||||
|= =bowl:neo
|
||||
|^ ^- manx
|
||||
::
|
||||
;div.fr.trans-root.grow
|
||||
;div.fc.trans-root.grow
|
||||
;form.fc.grow
|
||||
=hx-post "/neo/hawk{(en-tape:pith:neo here.bowl)}?stud=hoon"
|
||||
=hx-trigger "input changed delay:0.4s from:[name='text'], input changed delay:0.4s from:[name='a']"
|
||||
@ -22,6 +22,35 @@
|
||||
==
|
||||
;div.fc.border
|
||||
;+ conf-header
|
||||
;div.fr
|
||||
;div.fc.p2
|
||||
;form.fr.js.hf
|
||||
=hx-post "/neo/hawk{(en-tape:pith:neo here.bowl)}?stud=add-poke"
|
||||
=hx-swap "none"
|
||||
=hx-indicator "#code-spinner"
|
||||
=hx-target "#code-spinner .loading"
|
||||
;input
|
||||
=type "text"
|
||||
=placeholder "/{(scow %p our.bowl)}/shrub/to/poke"
|
||||
=name "pith"
|
||||
=autocomplete "off"
|
||||
=oninput "this.setAttribute('value', this.value);"
|
||||
;
|
||||
==
|
||||
;input
|
||||
=type "text"
|
||||
=placeholder "%some-type"
|
||||
=name "stud"
|
||||
=autocomplete "off"
|
||||
=oninput "this.setAttribute('value', this.value);"
|
||||
;
|
||||
==
|
||||
;button
|
||||
=type "submit"
|
||||
; Route poke
|
||||
==
|
||||
==
|
||||
==
|
||||
;div.fc.p2
|
||||
::
|
||||
;+ deps
|
||||
@ -62,6 +91,7 @@
|
||||
==
|
||||
==
|
||||
==
|
||||
==
|
||||
++ id
|
||||
^- tape
|
||||
%- zing
|
||||
|
@ -97,6 +97,7 @@
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
grid-area: table;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.scroll-none {
|
||||
overflow-x: auto;
|
||||
@ -108,7 +109,7 @@
|
||||
}
|
||||
.accel-top {
|
||||
display: grid;
|
||||
grid-template-rows: 1fr min(auto, 300px);
|
||||
grid-template-rows: 1fr 1fr;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-areas:
|
||||
"table"
|
||||
|
12
pkg/arvo/neo/cod/std/src/con/node-add-poke.hoon
Normal file
12
pkg/arvo/neo/cod/std/src/con/node-add-poke.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
/@ node
|
||||
/@ add-poke
|
||||
/- manx-utils
|
||||
:- [%node %$ %add-poke]
|
||||
|= nod=node
|
||||
~& nod/nod
|
||||
^- add-poke
|
||||
=/ mu ~(. manx-utils nod)
|
||||
:- (pave:neo (rash (vol:mu "pith") stap))
|
||||
`@tas`(rash (vol:mu "stud") ;~(pfix cen sym)) :: XX fix
|
||||
|
||||
|
@ -57,7 +57,14 @@
|
||||
++ poke
|
||||
|= [=stud:neo vax=vase]
|
||||
^- (quip card:neo pail:neo)
|
||||
`(produce bowl)
|
||||
=/ new=pail:neo (produce bowl)
|
||||
?: =(new pail)
|
||||
`pail
|
||||
:_ pail
|
||||
%+ turn ~(tap by poke.conf)
|
||||
|= [=pith:neo =stud:neo]
|
||||
[pith %poke [stud q.pail]]
|
||||
::
|
||||
++ init
|
||||
|= pal=(unit pail:neo)
|
||||
`(produce bowl)
|
||||
@ -67,7 +74,7 @@
|
||||
^- kook:neo
|
||||
|%
|
||||
++ state pro/%accel-conf
|
||||
++ poke (sy %hoon %add-dep %accel-conf %ack ~)
|
||||
++ poke (sy %hoon %add-dep %del-dep %accel-conf %ack %add-poke %del-poke ~)
|
||||
++ kids *kids:neo
|
||||
++ deps *deps:neo
|
||||
++ form
|
||||
@ -78,11 +85,14 @@
|
||||
|= [=stud:neo vax=vase]
|
||||
^- (quip card:neo pail:neo)
|
||||
=+ !<(conf=accel-conf q.pail)
|
||||
%- (slog leaf/"have {<stud>}," (sell vax) ~)
|
||||
=. conf
|
||||
?+ stud !!
|
||||
%hoon conf(ready |, hoon !<(@t vax))
|
||||
%add-dep conf(ready |, crew (~(put by crew.conf) !<([term pith] vax)))
|
||||
%add-dep conf(ready |, crew (~(del by crew.conf) !<(term vax)))
|
||||
%del-dep conf(ready |, crew (~(del by crew.conf) !<(term vax)))
|
||||
%del-poke conf(ready |, poke (~(del by poke.conf) !<(pith:neo vax)))
|
||||
%add-poke conf(ready |, poke (~(put by poke.conf) !<([pith:neo stud:neo] vax)))
|
||||
%accel-conf !<(accel-conf vax)
|
||||
%ack conf(ready &)
|
||||
==
|
||||
|
@ -29,7 +29,7 @@
|
||||
:+ ~ %y
|
||||
%- ~(gas by *lads:neo)
|
||||
:~ :- &
|
||||
`lash:neo`[pro/%htmx ~]
|
||||
`lash:neo`[any/~ ~]
|
||||
==
|
||||
==
|
||||
::
|
||||
|
@ -1,4 +1,5 @@
|
||||
$: hoon=_'~'
|
||||
=crew:neo
|
||||
ready=_|
|
||||
poke=(map pith:neo stud:neo)
|
||||
==
|
||||
|
1
pkg/arvo/neo/cod/std/src/pro/add-poke.hoon
Normal file
1
pkg/arvo/neo/cod/std/src/pro/add-poke.hoon
Normal file
@ -0,0 +1 @@
|
||||
,[=pith:neo =stud:neo]
|
1
pkg/arvo/neo/cod/std/src/pro/del-poke.hoon
Normal file
1
pkg/arvo/neo/cod/std/src/pro/del-poke.hoon
Normal file
@ -0,0 +1 @@
|
||||
,pith:neo
|
9
pkg/arvo/neo/cod/std/src/pro/node-del-poke.hoon
Normal file
9
pkg/arvo/neo/cod/std/src/pro/node-del-poke.hoon
Normal file
@ -0,0 +1,9 @@
|
||||
/@ node
|
||||
/@ del-poke
|
||||
/- manx-utils
|
||||
:- [%node %$ %del-poke]
|
||||
|= nod=node
|
||||
^- del-poke
|
||||
=/ mu ~(. manx-utils nod)
|
||||
(pave:neo (rash (vol:mu "pith") stap))
|
||||
|
Loading…
Reference in New Issue
Block a user