mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-14 04:19:22 +03:00
hide talk stations/writing ui when accessed by another ship
This commit is contained in:
parent
8b45e30836
commit
85bfd99f82
@ -22,7 +22,7 @@
|
||||
"react/0.13.1/react.js"
|
||||
==
|
||||
:: remove /~~ for anon
|
||||
;script(type "text/javascript", src "/~~/~/at/home/lib/urb.js");
|
||||
;script(type "text/javascript", src "/~/at/home/lib/urb.js");
|
||||
;meta(name "viewport", content "width=device-width, height=device-height, ".
|
||||
"initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0");
|
||||
;link(type "text/css", rel "stylesheet", href "/home/pub/talk/src/css/main.css");
|
||||
|
@ -73,6 +73,9 @@ module.exports = recl
|
||||
StationActions.setSources @state.station,_sources
|
||||
|
||||
render: ->
|
||||
if window.urb.user isnt window.urb.ship #foreign
|
||||
return div {id:"station"}
|
||||
|
||||
parts = []
|
||||
members = []
|
||||
|
||||
|
@ -251,6 +251,9 @@ module.exports = recl
|
||||
_onChangeStore: -> @setState @stateFromStore()
|
||||
|
||||
render: ->
|
||||
if window.urb.user isnt window.urb.ship #foreign
|
||||
return div {className:"writing"}
|
||||
|
||||
user = "~"+window.urb.user
|
||||
iden = StationStore.getMember(user)
|
||||
ship = if iden then iden.ship else user
|
||||
@ -262,7 +265,7 @@ module.exports = recl
|
||||
audi[k] = v.slice(1)
|
||||
|
||||
k = "writing"
|
||||
|
||||
|
||||
div {className:k}, [
|
||||
(div {className:"attr"}, [
|
||||
(React.createElement Member, iden)
|
||||
|
@ -648,6 +648,11 @@ module.exports = recl({
|
||||
},
|
||||
render: function() {
|
||||
var _remove, _sources, members, parts, sourceCtrl, sourceInput, sources;
|
||||
if (window.urb.user !== window.urb.ship) {
|
||||
return div({
|
||||
id: "station"
|
||||
});
|
||||
}
|
||||
parts = [];
|
||||
members = [];
|
||||
if (this.state.station && this.state.members) {
|
||||
@ -988,6 +993,11 @@ module.exports = recl({
|
||||
},
|
||||
render: function() {
|
||||
var audi, iden, k, name, ship, user, v;
|
||||
if (window.urb.user !== window.urb.ship) {
|
||||
return div({
|
||||
className: "writing"
|
||||
});
|
||||
}
|
||||
user = "~" + window.urb.user;
|
||||
iden = StationStore.getMember(user);
|
||||
ship = iden ? iden.ship : user;
|
||||
@ -6719,7 +6729,7 @@ _.merge(window.util, {
|
||||
},
|
||||
mainStation: function(user) {
|
||||
if (user == null) {
|
||||
user = window.urb.user;
|
||||
user = window.urb.ship;
|
||||
}
|
||||
switch (user.length) {
|
||||
case 3:
|
||||
|
@ -5,7 +5,7 @@ _.merge window.util,
|
||||
mainStationPath: (user = window.urb.user) ->
|
||||
"~#{user}/#{window.util.mainStation(user)}"
|
||||
|
||||
mainStation: (user = window.urb.user) ->
|
||||
mainStation: (user = window.urb.ship) ->
|
||||
switch user.length
|
||||
when 3
|
||||
return "court"
|
||||
|
Loading…
Reference in New Issue
Block a user