Bring webtalk up to speed.

Also see urbit/talk#43.
This commit is contained in:
Fang 2017-12-20 00:06:52 +01:00
parent 13c2d0156d
commit 962d96cff2

View File

@ -363,6 +363,7 @@ module.exports = recl({
key: "speech" key: "speech"
}, url); }, url);
case !exp: case !exp:
exp.res = exp.res || ["evaluating..."];
return div({}, exp.exp, div({ return div({}, exp.exp, div({
className: "fat" className: "fat"
}, pre({}, exp.res.join("\n")))); }, pre({}, exp.res.join("\n"))));
@ -1351,6 +1352,9 @@ module.exports = recl({
if (valid === true) { if (valid === true) {
stan = $('#audience .input').text() || util.mainStationPath(window.urb.user); stan = $('#audience .input').text() || util.mainStationPath(window.urb.user);
stan = (stan.split(/\ +/)).map(function(v) { stan = (stan.split(/\ +/)).map(function(v) {
if (v.indexOf("/") === -1) {
v = v + "/inbox";
}
if (v[0] === "~") { if (v[0] === "~") {
return v; return v;
} else { } else {
@ -1596,6 +1600,7 @@ module.exports = function(arg) {
var path; var path;
end = window.urb.util.numDot(end); end = window.urb.util.numDot(end);
start = window.urb.util.numDot(start); start = window.urb.util.numDot(start);
console.log('getting grams from ' + end + ' to ' + start);
path = util.talkPath('circle', station, 'grams', end, start); path = util.talkPath('circle', station, 'grams', end, start);
return window.urb.bind(path, function(err, res) { return window.urb.bind(path, function(err, res) {
var ref, ref1; var ref, ref1;