mirror of
https://github.com/urbit/shrub.git
synced 2024-12-03 05:43:18 +03:00
tree@34752ad
This commit is contained in:
parent
3cc670a2df
commit
cd29e5fe80
@ -1278,6 +1278,25 @@ ol > li:before {
|
||||
line-height: 1rem;
|
||||
margin-bottom: 1rem; }
|
||||
|
||||
.urbit.post .person {
|
||||
margin-bottom: 2rem; }
|
||||
.urbit.post .person:first-of-type {
|
||||
margin-top: 3rem; }
|
||||
.urbit.post .person:last-of-type {
|
||||
margin-bottom: 3rem; }
|
||||
.urbit.post .person > p,
|
||||
.urbit.post .person img {
|
||||
display: inline-block; }
|
||||
.urbit.post .person > p {
|
||||
width: 60%; }
|
||||
.urbit.post .person img {
|
||||
width: 30%;
|
||||
margin: 0 2rem 0 0;
|
||||
border: 6px solid #555; }
|
||||
|
||||
.urbit .post h1.title {
|
||||
line-height: 3rem; }
|
||||
|
||||
.urbit .post img {
|
||||
max-width: 32rem; }
|
||||
|
||||
|
@ -325,7 +325,7 @@ extras = {
|
||||
var color, src;
|
||||
color = this.props.color;
|
||||
if (color === "white" || color === "black") {
|
||||
src = "//storage.googleapis.com/urbit-extra/logo/logo-" + color + "-100x100.png";
|
||||
src = "//media.urbit.org/logo/logo-" + color + "-100x100.png";
|
||||
}
|
||||
return a({
|
||||
href: "http://urbit.org",
|
||||
@ -432,11 +432,11 @@ extras = {
|
||||
className: footerClas,
|
||||
key: 'footer-inner'
|
||||
}, [
|
||||
"This page was made by Urbit. ", a({
|
||||
href: "urbit.org"
|
||||
}, "urbit.org"), a({
|
||||
"This page was made by Urbit. Feedback: ", a({
|
||||
href: "mailto:urbit@urbit.org"
|
||||
}, "contact")
|
||||
}, "urbit@ubrit.org"), " ", a({
|
||||
href: "https://twitter.com/urbit_"
|
||||
}, "@urbit_")
|
||||
])
|
||||
]);
|
||||
}
|
||||
@ -606,11 +606,22 @@ module.exports = query({
|
||||
}, recl({
|
||||
displayName: "Comments",
|
||||
getInitialState: function() {
|
||||
var ref1;
|
||||
return {
|
||||
loading: null,
|
||||
value: ""
|
||||
value: "",
|
||||
user: (ref1 = urb.user) != null ? ref1 : ""
|
||||
};
|
||||
},
|
||||
componentDidMount: function() {
|
||||
return urb.init((function(_this) {
|
||||
return function() {
|
||||
return _this.setState({
|
||||
user: urb.user
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
},
|
||||
componentDidUpdate: function(_props) {
|
||||
if (this.props.comt.length > _props.comt.length) {
|
||||
return this.setState({
|
||||
@ -619,20 +630,17 @@ module.exports = query({
|
||||
}
|
||||
},
|
||||
onSubmit: function(e) {
|
||||
var body, user, value;
|
||||
var value;
|
||||
value = this.refs["in"].comment.value;
|
||||
TreeActions.addComment(this.props.path, this.props.spur, value);
|
||||
body = {
|
||||
gn: 'p',
|
||||
c: [value]
|
||||
};
|
||||
user = urb.user;
|
||||
this.setState({
|
||||
value: "",
|
||||
loading: {
|
||||
'loading': 'loading',
|
||||
body: body,
|
||||
user: urb.user,
|
||||
body: {
|
||||
gn: 'p',
|
||||
c: [value]
|
||||
},
|
||||
time: Date.now()
|
||||
}
|
||||
});
|
||||
@ -666,10 +674,12 @@ module.exports = query({
|
||||
ref: "in",
|
||||
onSubmit: this.onSubmit
|
||||
}, rele(Ship, {
|
||||
ship: urb.user
|
||||
ship: this.state.user
|
||||
}), textarea(textareaAttr), input(inputAttr))), div({
|
||||
className: "comments"
|
||||
}, (this.state.loading != null ? rele(Comment, this.state.loading) : void 0), this.props.comt.map(function(props, key) {
|
||||
}, (this.state.loading != null ? rele(Comment, _.extend({}, this.state.loading, {
|
||||
user: this.state.user
|
||||
})) : void 0), this.props.comt.map(function(props, key) {
|
||||
return rele(Comment, _.extend({
|
||||
key: key
|
||||
}, props));
|
||||
@ -1601,7 +1611,7 @@ ref = React.DOM, nav = ref.nav, ul = ref.ul, li = ref.li, a = ref.a;
|
||||
|
||||
module.exports = recl({
|
||||
render: function() {
|
||||
if (urb.user !== urb.ship) {
|
||||
if ((urb.user == null) || urb.user !== urb.ship) {
|
||||
return nav({
|
||||
className: "navbar panel"
|
||||
}, [
|
||||
@ -1692,9 +1702,19 @@ module.exports = query({
|
||||
return {
|
||||
edit: false,
|
||||
plan: this.props.plan,
|
||||
focus: null
|
||||
focus: null,
|
||||
loaded: urb.ship != null
|
||||
};
|
||||
},
|
||||
componentDidMount: function() {
|
||||
return urb.init((function(_this) {
|
||||
return function() {
|
||||
return _this.setState({
|
||||
'loaded': 'loaded'
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
},
|
||||
componentWillReceiveProps: function(props) {
|
||||
if (_.isEqual(this.props.plan, this.state.plan)) {
|
||||
return this.setState({
|
||||
@ -1732,6 +1752,11 @@ module.exports = query({
|
||||
},
|
||||
render: function() {
|
||||
var acc, beak, editButton, editable, issuedBy, key, loc, path, ref3, ref4, ref5, url, usr, who;
|
||||
if (!this.state.loaded) {
|
||||
return div({
|
||||
className: "plan"
|
||||
}, "Loading authentication info");
|
||||
}
|
||||
ref3 = this.props, beak = ref3.beak, path = ref3.path;
|
||||
ref5 = (ref4 = this.state.plan) != null ? ref4 : {}, acc = ref5.acc, loc = ref5.loc, who = ref5.who;
|
||||
issuedBy = urb.sein !== urb.ship ? "~" + urb.sein : "self";
|
||||
@ -2509,9 +2534,11 @@ module.exports = {
|
||||
if (appl == null) {
|
||||
appl = /[a-z]*/.exec(mark)[0];
|
||||
}
|
||||
return urb.send(data, {
|
||||
mark: mark,
|
||||
appl: appl
|
||||
return urb.init(function() {
|
||||
return urb.send(data, {
|
||||
mark: mark,
|
||||
appl: appl
|
||||
});
|
||||
});
|
||||
},
|
||||
encode: function(obj) {
|
||||
|
@ -7684,6 +7684,25 @@ ol > li:before {
|
||||
line-height: 1rem;
|
||||
margin-bottom: 1rem; }
|
||||
|
||||
.urbit.post .person {
|
||||
margin-bottom: 2rem; }
|
||||
.urbit.post .person:first-of-type {
|
||||
margin-top: 3rem; }
|
||||
.urbit.post .person:last-of-type {
|
||||
margin-bottom: 3rem; }
|
||||
.urbit.post .person > p,
|
||||
.urbit.post .person img {
|
||||
display: inline-block; }
|
||||
.urbit.post .person > p {
|
||||
width: 60%; }
|
||||
.urbit.post .person img {
|
||||
width: 30%;
|
||||
margin: 0 2rem 0 0;
|
||||
border: 6px solid #555; }
|
||||
|
||||
.urbit .post h1.title {
|
||||
line-height: 3rem; }
|
||||
|
||||
.urbit .post img {
|
||||
max-width: 32rem; }
|
||||
|
||||
|
@ -325,7 +325,7 @@ extras = {
|
||||
var color, src;
|
||||
color = this.props.color;
|
||||
if (color === "white" || color === "black") {
|
||||
src = "//storage.googleapis.com/urbit-extra/logo/logo-" + color + "-100x100.png";
|
||||
src = "//media.urbit.org/logo/logo-" + color + "-100x100.png";
|
||||
}
|
||||
return a({
|
||||
href: "http://urbit.org",
|
||||
@ -432,11 +432,11 @@ extras = {
|
||||
className: footerClas,
|
||||
key: 'footer-inner'
|
||||
}, [
|
||||
"This page was made by Urbit. ", a({
|
||||
href: "urbit.org"
|
||||
}, "urbit.org"), a({
|
||||
"This page was made by Urbit. Feedback: ", a({
|
||||
href: "mailto:urbit@urbit.org"
|
||||
}, "contact")
|
||||
}, "urbit@ubrit.org"), " ", a({
|
||||
href: "https://twitter.com/urbit_"
|
||||
}, "@urbit_")
|
||||
])
|
||||
]);
|
||||
}
|
||||
@ -606,11 +606,22 @@ module.exports = query({
|
||||
}, recl({
|
||||
displayName: "Comments",
|
||||
getInitialState: function() {
|
||||
var ref1;
|
||||
return {
|
||||
loading: null,
|
||||
value: ""
|
||||
value: "",
|
||||
user: (ref1 = urb.user) != null ? ref1 : ""
|
||||
};
|
||||
},
|
||||
componentDidMount: function() {
|
||||
return urb.init((function(_this) {
|
||||
return function() {
|
||||
return _this.setState({
|
||||
user: urb.user
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
},
|
||||
componentDidUpdate: function(_props) {
|
||||
if (this.props.comt.length > _props.comt.length) {
|
||||
return this.setState({
|
||||
@ -619,20 +630,17 @@ module.exports = query({
|
||||
}
|
||||
},
|
||||
onSubmit: function(e) {
|
||||
var body, user, value;
|
||||
var value;
|
||||
value = this.refs["in"].comment.value;
|
||||
TreeActions.addComment(this.props.path, this.props.spur, value);
|
||||
body = {
|
||||
gn: 'p',
|
||||
c: [value]
|
||||
};
|
||||
user = urb.user;
|
||||
this.setState({
|
||||
value: "",
|
||||
loading: {
|
||||
'loading': 'loading',
|
||||
body: body,
|
||||
user: urb.user,
|
||||
body: {
|
||||
gn: 'p',
|
||||
c: [value]
|
||||
},
|
||||
time: Date.now()
|
||||
}
|
||||
});
|
||||
@ -666,10 +674,12 @@ module.exports = query({
|
||||
ref: "in",
|
||||
onSubmit: this.onSubmit
|
||||
}, rele(Ship, {
|
||||
ship: urb.user
|
||||
ship: this.state.user
|
||||
}), textarea(textareaAttr), input(inputAttr))), div({
|
||||
className: "comments"
|
||||
}, (this.state.loading != null ? rele(Comment, this.state.loading) : void 0), this.props.comt.map(function(props, key) {
|
||||
}, (this.state.loading != null ? rele(Comment, _.extend({}, this.state.loading, {
|
||||
user: this.state.user
|
||||
})) : void 0), this.props.comt.map(function(props, key) {
|
||||
return rele(Comment, _.extend({
|
||||
key: key
|
||||
}, props));
|
||||
@ -1601,7 +1611,7 @@ ref = React.DOM, nav = ref.nav, ul = ref.ul, li = ref.li, a = ref.a;
|
||||
|
||||
module.exports = recl({
|
||||
render: function() {
|
||||
if (urb.user !== urb.ship) {
|
||||
if ((urb.user == null) || urb.user !== urb.ship) {
|
||||
return nav({
|
||||
className: "navbar panel"
|
||||
}, [
|
||||
@ -1692,9 +1702,19 @@ module.exports = query({
|
||||
return {
|
||||
edit: false,
|
||||
plan: this.props.plan,
|
||||
focus: null
|
||||
focus: null,
|
||||
loaded: urb.ship != null
|
||||
};
|
||||
},
|
||||
componentDidMount: function() {
|
||||
return urb.init((function(_this) {
|
||||
return function() {
|
||||
return _this.setState({
|
||||
'loaded': 'loaded'
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
},
|
||||
componentWillReceiveProps: function(props) {
|
||||
if (_.isEqual(this.props.plan, this.state.plan)) {
|
||||
return this.setState({
|
||||
@ -1732,6 +1752,11 @@ module.exports = query({
|
||||
},
|
||||
render: function() {
|
||||
var acc, beak, editButton, editable, issuedBy, key, loc, path, ref3, ref4, ref5, url, usr, who;
|
||||
if (!this.state.loaded) {
|
||||
return div({
|
||||
className: "plan"
|
||||
}, "Loading authentication info");
|
||||
}
|
||||
ref3 = this.props, beak = ref3.beak, path = ref3.path;
|
||||
ref5 = (ref4 = this.state.plan) != null ? ref4 : {}, acc = ref5.acc, loc = ref5.loc, who = ref5.who;
|
||||
issuedBy = urb.sein !== urb.ship ? "~" + urb.sein : "self";
|
||||
@ -2509,9 +2534,11 @@ module.exports = {
|
||||
if (appl == null) {
|
||||
appl = /[a-z]*/.exec(mark)[0];
|
||||
}
|
||||
return urb.send(data, {
|
||||
mark: mark,
|
||||
appl: appl
|
||||
return urb.init(function() {
|
||||
return urb.send(data, {
|
||||
mark: mark,
|
||||
appl: appl
|
||||
});
|
||||
});
|
||||
},
|
||||
encode: function(obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user