mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 12:15:43 +03:00
Initial mark dashboard structure
This commit is contained in:
parent
fe31213d13
commit
32c2cac1a8
18
app/mark-dashboard.hoon
Normal file
18
app/mark-dashboard.hoon
Normal 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
9
web/mark-dashboard.hoon
Normal file
@ -0,0 +1,9 @@
|
||||
::
|
||||
:::: /hoon/mark-dashboard/web
|
||||
::
|
||||
/? 310
|
||||
;div.mini-module
|
||||
;script@"/~/at/lib/js/urb.js";
|
||||
;mark-dashboard;
|
||||
;script@"main.js";
|
||||
==
|
16
web/mark-dashboard/main.js
Normal file
16
web/mark-dashboard/main.js
Normal 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})
|
||||
}
|
||||
)
|
||||
}
|
||||
}))
|
Loading…
Reference in New Issue
Block a user