mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
Merge remote-tracking branches 'joemfb/mar-telegram', 'galenwp/docs-fix', 'galenwp/room-filtering', 'Fang/talk-team' and 'keatondunsford/fix-html-mark' into maint-20160818
handles $mor speech in mar/talk/telegram tree@258fdf7 simple channel filtering Prevent unauthorized talk message sending add `++grad %mime` to html.hoon mark
This commit is contained in:
commit
c06e10e7c2
@ -1366,7 +1366,10 @@
|
||||
(ra-config p.cod u.q.cod)
|
||||
::
|
||||
$review (ra-think | her +.cod)
|
||||
$publish (ra-think & her +.cod)
|
||||
::
|
||||
$publish
|
||||
?. (team our.hid her) +>.$
|
||||
(ra-think & her +.cod)
|
||||
==
|
||||
::
|
||||
++ ra-config :: configure story
|
||||
|
@ -15,4 +15,6 @@
|
||||
++ grab |% :: convert from
|
||||
++ noun @t :: clam from %noun
|
||||
++ mime |=({p/mite q/octs} q.q) :: retrieve form $mime
|
||||
-- --
|
||||
--
|
||||
++ grad %mime
|
||||
--
|
||||
|
@ -92,6 +92,7 @@
|
||||
fat+(ot tor+tors taf+spec ~)
|
||||
ext+(ot nom+so txe+blob ~)
|
||||
non+ul
|
||||
mor+(ar spec)
|
||||
:: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~)
|
||||
==
|
||||
++ tors
|
||||
@ -166,6 +167,10 @@
|
||||
$fat (jobe tor+(tors p.a) taf+$(a q.a) ~)
|
||||
$ext (jobe nom+[%s p.a] txe+(jape (sifo (jam +.a))) ~)
|
||||
$non ~
|
||||
$mor :- %a
|
||||
|- ^- (list json)
|
||||
?~ p.a ~
|
||||
[^$(a i.p.a) $(p.a t.p.a)]
|
||||
:: $inv (jobe ship+(jope p.a) party+[%s q.a] ~)
|
||||
==
|
||||
::
|
||||
|
@ -9,6 +9,17 @@ _persistence = require('../persistence/MessagePersistence.coffee');
|
||||
|
||||
Persistence = _persistence({
|
||||
MessageActions: module.exports = {
|
||||
setFilter: function(station) {
|
||||
return Dispatcher.handleViewAction({
|
||||
station: station,
|
||||
type: "messages-filter"
|
||||
});
|
||||
},
|
||||
clearFilter: function() {
|
||||
return Dispatcher.handleViewAction({
|
||||
type: "messages-filter-clear"
|
||||
});
|
||||
},
|
||||
loadMessages: function(messages, last, get) {
|
||||
return Dispatcher.handleServerAction({
|
||||
messages: messages,
|
||||
@ -201,6 +212,13 @@ Persistence = _persistence({
|
||||
type: "station-listen"
|
||||
};
|
||||
}),
|
||||
createStation: function(station) {
|
||||
Dispatcher.handleViewAction({
|
||||
station: station,
|
||||
type: "station-create"
|
||||
});
|
||||
return Persistence.createStation(station);
|
||||
},
|
||||
listen: function() {
|
||||
return Persistence.listen();
|
||||
},
|
||||
@ -836,7 +854,7 @@ module.exports = recl({
|
||||
|
||||
|
||||
},{"../actions/MessageActions.coffee":1,"../actions/StationActions.coffee":2,"../stores/MessageStore.coffee":13,"../stores/StationStore.coffee":14,"../util.coffee":15,"./LoadComponent.coffee":3,"./MessageComponent.coffee":5}],7:[function(require,module,exports){
|
||||
var Load, Member, MessageStore, StationActions, StationStore, a, clas, div, h1, h2, input, label, recl, ref, rele, span, style, util,
|
||||
var Load, Member, MessageActions, MessageStore, StationActions, StationStore, a, clas, div, h1, h2, input, label, recl, ref, rele, span, style, util,
|
||||
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
util = require('../util.coffee');
|
||||
@ -853,6 +871,8 @@ MessageStore = require('../stores/MessageStore.coffee');
|
||||
|
||||
StationStore = require('../stores/StationStore.coffee');
|
||||
|
||||
MessageActions = require('../actions/MessageActions.coffee');
|
||||
|
||||
StationActions = require('../actions/StationActions.coffee');
|
||||
|
||||
Member = require('./MemberComponent.coffee');
|
||||
@ -867,6 +887,7 @@ module.exports = recl({
|
||||
audi: StationStore.getAudience(),
|
||||
members: StationStore.getMembers(),
|
||||
station: util.mainStation(),
|
||||
filter: MessageStore.getFilter(),
|
||||
stations: StationStore.getStations(),
|
||||
configs: StationStore.getConfigs(),
|
||||
fetching: MessageStore.getFetching(),
|
||||
@ -880,6 +901,7 @@ module.exports = recl({
|
||||
},
|
||||
componentDidMount: function() {
|
||||
this.$el = $(ReactDOM.findDOMNode());
|
||||
MessageStore.addChangeListener(this._onChangeStore);
|
||||
StationStore.addChangeListener(this._onChangeStore);
|
||||
if (this.state.listening.indexOf(this.state.station) === -1) {
|
||||
return StationActions.listenStation(this.state.station);
|
||||
@ -924,10 +946,8 @@ module.exports = recl({
|
||||
}
|
||||
},
|
||||
_openStation: function(e) {
|
||||
var $t;
|
||||
$t = $(e.target);
|
||||
return this.setState({
|
||||
open: $t.attr('data-station')
|
||||
open: $(e.target).attr('data-station')
|
||||
});
|
||||
},
|
||||
_closeStation: function() {
|
||||
@ -935,6 +955,15 @@ module.exports = recl({
|
||||
open: null
|
||||
});
|
||||
},
|
||||
_filterStation: function(e) {
|
||||
var station;
|
||||
station = $(e.target).attr('data-station');
|
||||
if (this.state.filter !== station) {
|
||||
return MessageActions.setFilter(station);
|
||||
} else {
|
||||
return MessageActions.clearFilter();
|
||||
}
|
||||
},
|
||||
_remove: function(e) {
|
||||
var _sources, _station;
|
||||
e.stopPropagation();
|
||||
@ -1005,10 +1034,14 @@ module.exports = recl({
|
||||
onClick: this._openStation,
|
||||
"data-station": source
|
||||
}, source), div({
|
||||
className: "close",
|
||||
className: 'options'
|
||||
}, div({
|
||||
onClick: this._filterStation,
|
||||
"data-station": source
|
||||
}, this.state.filter === source ? "Clear" : "Filter"), div({
|
||||
onClick: this._remove,
|
||||
"data-station": source
|
||||
}, "✕")));
|
||||
}, "Leave"))));
|
||||
}
|
||||
return results;
|
||||
}).call(this);
|
||||
@ -1046,7 +1079,7 @@ module.exports = recl({
|
||||
});
|
||||
|
||||
|
||||
},{"../actions/StationActions.coffee":2,"../stores/MessageStore.coffee":13,"../stores/StationStore.coffee":14,"../util.coffee":15,"./LoadComponent.coffee":3,"./MemberComponent.coffee":4,"classnames":16}],8:[function(require,module,exports){
|
||||
},{"../actions/MessageActions.coffee":1,"../actions/StationActions.coffee":2,"../stores/MessageStore.coffee":13,"../stores/StationStore.coffee":14,"../util.coffee":15,"./LoadComponent.coffee":3,"./MemberComponent.coffee":4,"classnames":16}],8:[function(require,module,exports){
|
||||
var Audience, Member, MessageActions, MessageStore, PO, SHIPSHAPE, StationActions, StationStore, br, div, husl, input, recl, ref, textToHTML, textarea, util,
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
@ -1789,7 +1822,7 @@ module.exports = function(arg) {
|
||||
|
||||
|
||||
},{"../util.coffee":15}],13:[function(require,module,exports){
|
||||
var EventEmitter, MessageDispatcher, MessageStore, _fetching, _last, _listening, _messages, _station, _typing, moment;
|
||||
var EventEmitter, MessageDispatcher, MessageStore, _fetching, _filter, _last, _listening, _messages, _station, _typing, moment;
|
||||
|
||||
moment = window.moment.tz;
|
||||
|
||||
@ -1805,6 +1838,8 @@ _last = null;
|
||||
|
||||
_station = null;
|
||||
|
||||
_filter = null;
|
||||
|
||||
_listening = [];
|
||||
|
||||
_typing = false;
|
||||
@ -1867,6 +1902,15 @@ MessageStore = _.merge(new EventEmitter, {
|
||||
setStation: function(station) {
|
||||
return _station = station;
|
||||
},
|
||||
getFilter: function() {
|
||||
return _filter;
|
||||
},
|
||||
setFilter: function(station) {
|
||||
return _filter = station;
|
||||
},
|
||||
clearFilter: function(station) {
|
||||
return _filter = null;
|
||||
},
|
||||
sendMessage: function(message) {
|
||||
return _messages[message.thought.serial] = message;
|
||||
},
|
||||
@ -1885,7 +1929,21 @@ MessageStore = _.merge(new EventEmitter, {
|
||||
return _fetching = false;
|
||||
},
|
||||
getAll: function() {
|
||||
return _.values(_messages);
|
||||
var mess;
|
||||
mess = _.values(_messages);
|
||||
if (!_filter) {
|
||||
return mess;
|
||||
} else {
|
||||
return _.filter(mess, function(mess) {
|
||||
var audi;
|
||||
audi = _.keys(mess.thought.audience);
|
||||
if (audi.indexOf(_filter) !== -1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getFetching: function() {
|
||||
return _fetching;
|
||||
@ -1907,6 +1965,14 @@ MessageStore.dispatchToken = MessageDispatcher.register(function(payload) {
|
||||
case 'station-switch':
|
||||
MessageStore.setStation(action.station);
|
||||
break;
|
||||
case 'messages-filter':
|
||||
MessageStore.setFilter(action.station);
|
||||
MessageStore.emitChange();
|
||||
break;
|
||||
case 'messages-filter-clear':
|
||||
MessageStore.clearFilter(action.station);
|
||||
MessageStore.emitChange();
|
||||
break;
|
||||
case 'messages-listen':
|
||||
MessageStore.setListening(action.station);
|
||||
MessageStore.emitChange();
|
||||
|
@ -1309,6 +1309,15 @@ ol > li:before {
|
||||
.urbit.post img {
|
||||
border: 12px solid #000; }
|
||||
|
||||
.urbit .post img.full-width,
|
||||
.urbit.post img.full-width {
|
||||
width: 100%;
|
||||
border: 0; }
|
||||
|
||||
.urbit .post img.inline,
|
||||
.urbit.post img.inline {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.urbit .post p.preview,
|
||||
.urbit.post p.preview {
|
||||
margin-bottom: .6rem;
|
||||
@ -1361,6 +1370,9 @@ ol > li:before {
|
||||
.sections h1:first-of-type {
|
||||
padding-bottom: 1rem; }
|
||||
|
||||
.sections .list h1 {
|
||||
padding-bottom: 0; }
|
||||
|
||||
.sections li h1 {
|
||||
font-size: 1.2rem; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user