From 32c2cac1a8237c68b7e435d7d9e6f47d81712a0f Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 16 Nov 2016 15:05:24 -0800 Subject: [PATCH] Initial mark dashboard structure --- app/mark-dashboard.hoon | 18 ++++++++++++++++++ web/mark-dashboard.hoon | 9 +++++++++ web/mark-dashboard/main.js | 16 ++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 app/mark-dashboard.hoon create mode 100644 web/mark-dashboard.hoon create mode 100644 web/mark-dashboard/main.js diff --git a/app/mark-dashboard.hoon b/app/mark-dashboard.hoon new file mode 100644 index 000000000..edcb61a4a --- /dev/null +++ b/app/mark-dashboard.hoon @@ -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]) +-- \ No newline at end of file diff --git a/web/mark-dashboard.hoon b/web/mark-dashboard.hoon new file mode 100644 index 000000000..2079c4a41 --- /dev/null +++ b/web/mark-dashboard.hoon @@ -0,0 +1,9 @@ +:: +:::: /hoon/mark-dashboard/web + :: +/? 310 +;div.mini-module + ;script@"/~/at/lib/js/urb.js"; + ;mark-dashboard; + ;script@"main.js"; +== diff --git a/web/mark-dashboard/main.js b/web/mark-dashboard/main.js new file mode 100644 index 000000000..ba4227700 --- /dev/null +++ b/web/mark-dashboard/main.js @@ -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}) + } + ) + } +}))