Merge remote-tracking branches 'ohaitch/wipe-ford', 'ohaitch/fora-dubl' and 'keatondunsford/add-noun-mark' into maint-20170614

add |wipe-ford cache clear button
tree@da7808a actually disable post box upon submission
Add minimal noun.hoon mark to /mar
This commit is contained in:
Raymond Pasco 2017-06-14 14:34:13 -07:00
commit 43bb99b61b
5 changed files with 55 additions and 18 deletions

View File

@ -155,6 +155,7 @@
++ poke-kiln-sync (wrap poke-sync):from-kiln
++ poke-kiln-syncs (wrap poke-syncs):from-kiln
++ poke-kiln-start-autoload (wrap poke-start-autoload):from-kiln
++ poke-kiln-wipe-ford (wrap poke-wipe-ford):from-kiln
++ poke-kiln-autoload (wrap poke-autoload):from-kiln
++ poke-kiln-overload (wrap poke-overload):from-kiln
++ poke-kiln-unmount (wrap poke-unmount):from-kiln

13
gen/hood/wipe-ford.hoon Normal file
View File

@ -0,0 +1,13 @@
:: Kiln: wipe ford cache
::
:::: /hoon/wipe-ford/hood/gen
::
/? 310
::
::::
!:
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{arg/$~ $~}
==
[%kiln-wipe-ford ~]

View File

@ -203,6 +203,8 @@
|= tym/@dr
abet:(emit %wait /kiln/overload/(scot %dr tym) (add ~s10 now))
::
++ poke-wipe-ford |=($~ abet:(emit %wipe /kiln our ~))
::
++ take |=(way/wire ?>(?=({@ $~} way) (work i.way))) :: general handler
++ take-mere ::
|= {way/wire are/(each (set path) (pair term tang))}

11
mar/noun.hoon Normal file
View File

@ -0,0 +1,11 @@
::
:::: /hoon/noun/mar
::
/? 310
!:
:::: A minimal noun mark
|_ non/*
++ grab |%
++ noun *
--
--

View File

@ -1927,6 +1927,9 @@ module.exports = query({
},
onSubmit: function(e) {
var comment, path, title;
this.setState({
loading: true
});
title = this.refs["in"].title.value;
comment = this.refs["in"].comment.value;
path = this.props.path || "/";
@ -1939,27 +1942,26 @@ module.exports = query({
});
},
render: function() {
var _attr, bodyTextArea, postButton, titleInput;
_attr = {};
if (this.state.loading === true) {
_attr.disabled = "true";
}
titleInput = input(_.create(_attr, {
var bodyTextArea, postButton, titleInput;
titleInput = input({
disabled: this.state.loading ? "true" : void 0,
type: "text",
name: "title",
placeholder: "Title"
}));
bodyTextArea = textarea(_.create(_attr, {
});
bodyTextArea = textarea({
disabled: this.state.loading ? "true" : void 0,
type: "text",
name: "comment",
value: this.state.value,
onChange: this.onChange
}));
postButton = input(_.create(_attr, {
});
postButton = input({
disabled: this.state.loading ? "true" : void 0,
type: "submit",
value: "Post",
className: "btn btn-primary"
}));
});
return div({}, div({
className: "add-post"
}, form({
@ -3153,14 +3155,18 @@ module.exports = {
}
},
dateFromAtom: function(date) {
var __, day, hor, min, mon, ref, sec, str, yer;
var __, d, day, hor, min, mon, ref, sec, yer;
ref = date.slice(1).split("."), yer = ref[0], mon = ref[1], day = ref[2], __ = ref[3], hor = ref[4], min = ref[5], sec = ref[6];
if (day != null) {
str = yer + "-" + mon + "-" + day;
if (hor != null) {
str += " " + hor + ":" + min + ":" + sec;
}
return new Date(str);
d = new Date();
d.setYear(yer);
d.setMonth(mon - 1);
d.setDate(day);
}
if (hor != null) {
d.setHours(hor);
d.setMinutes(min);
return d.setSeconds(sec);
}
},
getKeys: function(kids, sortBy) {
@ -3341,8 +3347,12 @@ EventEmitter.prototype.emit = function(type) {
er = arguments[1];
if (er instanceof Error) {
throw er; // Unhandled 'error' event
} else {
// At least give some kind of context to the user
var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
err.context = er;
throw err;
}
throw TypeError('Uncaught, unspecified "error" event.');
}
}