Initial mark dashboard structure

This commit is contained in:
Anton Dyudin 2016-11-16 15:05:24 -08:00
parent fe31213d13
commit 32c2cac1a8
3 changed files with 43 additions and 0 deletions

18
app/mark-dashboard.hoon Normal file
View File

@ -0,0 +1,18 @@
=, ^gall
|_ {bowl $~}
++ peek _~
++ peer-scry-x
|= path
:_ +>
[ost %diff [%json a+list-marks]]~
::
++ poke-noun
|= *
~& have+list-marks
`+>
::
++ list-marks
=+ .^(arch %cy /(scot %p our)/home/(scot %da now)/mar)
%+ turn (~(tap by dir))
|=({a/mark $~} [%s a])
--

9
web/mark-dashboard.hoon Normal file
View File

@ -0,0 +1,9 @@
::
:::: /hoon/mark-dashboard/web
::
/? 310
;div.mini-module
;script@"/~/at/lib/js/urb.js";
;mark-dashboard;
;script@"main.js";
==

View File

@ -0,0 +1,16 @@
TreeActions = window.tree.actions
TreeActions.registerComponent("mark-dashboard", React.createClass({
render: function(){ return React.DOM.div({},""+this.state.data)},
getInitialState: function(){ return {data:null}},
componentDidMount: function(){
$this = this
urb.bind("/scry/x/main",
{appl:"mark-dashboard"},
function(err, dat){
urb.drop("/scry/x/main", {appl:"mark-dashboard"})
$this.setState({data:dat.data})
}
)
}
}))