mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-29 01:44:08 +03:00
Added another round of changes
This commit is contained in:
parent
3ae8e55e48
commit
dafec48b36
@ -155,7 +155,7 @@
|
||||
:: fill remote configs with message data
|
||||
::
|
||||
=* messages messages.str
|
||||
=/ circle=circle:hall [`@p`(slav %p &2:wir) &3:wir]
|
||||
=/ circle [`@p`(slav %p &2:wir) &3:wir]
|
||||
=/ peers=(map circle:hall (set @p))
|
||||
%- ~(rep by rem.pes.piz)
|
||||
|= [[cir=circle:hall grp=group:hall] acc=(map circle:hall (set @p))]
|
||||
@ -183,7 +183,10 @@
|
||||
(~(put by acc) cir (silt (turn ~(tap by grp) head)))
|
||||
::
|
||||
:-
|
||||
%+ turn ~(tap in (~(del in (silt circles)) [our.bol %inbox]))
|
||||
%+ turn
|
||||
%~ tap in
|
||||
%- ~(del in (silt circles))
|
||||
[our.bol %inbox]
|
||||
|= cir=circle:hall
|
||||
%+ hall-peer
|
||||
/circle/(scot %p our.bol)/[nom.cir]/config/group
|
||||
@ -193,7 +196,7 @@
|
||||
peers.str (~(put by peers) [our.bol %inbox] ~(key by loc.pes.piz))
|
||||
::
|
||||
configs.str
|
||||
%- ~(uni in configs.str)
|
||||
%- ~(uni by configs.str)
|
||||
^- (map circle:hall (unit config:hall))
|
||||
(~(run by rem.cos.piz) some)
|
||||
::
|
||||
@ -306,8 +309,9 @@
|
||||
^- (quip move _this)
|
||||
?> ?=(%gram -.sto)
|
||||
=* messages messages.str
|
||||
=/ circle=circle:hall [`@p`(slav %p &2:wir) &3:wir]
|
||||
=/ nes=(unit (list envelope:hall)) (~(get by messages) circle)
|
||||
=/ circle [`@p`(slav %p &2:wir) &3:wir]
|
||||
=/ nes=(unit (list envelope:hall))
|
||||
(~(get by messages) circle)
|
||||
?~ nes
|
||||
[~ this]
|
||||
=. messages.str (~(put by messages) circle (snoc u.nes nev.sto))
|
||||
@ -454,11 +458,11 @@
|
||||
:: paginated message data
|
||||
::
|
||||
[%'~chat' %scroll @t @t @t @t ~]
|
||||
=/ cir=circle:hall [(slav %p &3:site.request-line) &4:site.request-line]
|
||||
=/ cir [(slav %p &3:site.request-line) &4:site.request-line]
|
||||
=/ start=@ud (need (rush &5:site.request-line dem))
|
||||
=/ parsedend=@ud (need (rush &6:site.request-line dem))
|
||||
=* messages messages.str
|
||||
=/ envs/(unit (list envelope:hall)) (~(get by messages) cir)
|
||||
=/ envs=(unit (list envelope:hall)) (~(get by messages) cir)
|
||||
?~ envs
|
||||
[~ this]
|
||||
?: (gte start (lent u.envs))
|
||||
@ -468,13 +472,14 @@
|
||||
(dec (lent u.envs))
|
||||
parsedend
|
||||
=/ offset (sub end start)
|
||||
=/ jon=json %- msg-to-json
|
||||
:* %messages
|
||||
cir
|
||||
start
|
||||
end
|
||||
(swag [start offset] u.envs)
|
||||
==
|
||||
=/ jon
|
||||
%- msg-to-json
|
||||
:* %messages
|
||||
cir
|
||||
start
|
||||
end
|
||||
(swag [start offset] u.envs)
|
||||
==
|
||||
:_ this
|
||||
[ost.bol %http-response (json-response:app (json-to-octs jon))]~
|
||||
::
|
||||
|
@ -36,7 +36,7 @@ export class Root extends Component {
|
||||
let configs = !!state.configs ? state.configs : {};
|
||||
|
||||
let circles = Object.keys(configs).filter((conf) => {
|
||||
return !!configs[conf] && conf.split('/')[1] !== 'i';
|
||||
return configs[conf] !== undefined && conf.split('/')[1] !== 'i';
|
||||
});
|
||||
|
||||
let messages = _.get(state, 'messages', {});
|
||||
@ -87,7 +87,7 @@ export class Root extends Component {
|
||||
inviteConfig = configs[`~${window.ship}/i`];
|
||||
}
|
||||
|
||||
const renderChannelsSidebar = (props) => (
|
||||
const renderChannelSidebar = (props) => (
|
||||
<Sidebar
|
||||
circles={circles}
|
||||
messagePreviews={messagePreviews}
|
||||
@ -106,7 +106,7 @@ export class Root extends Component {
|
||||
render={ (props) => {
|
||||
return (
|
||||
<Skeleton
|
||||
sidebar={renderChannelsSidebar(props)}>
|
||||
sidebar={renderChannelSidebar(props)}>
|
||||
<div className="h-100 w-100 overflow-x-hidden flex flex-column">
|
||||
<div className="pl3 pr3 pt2 pb3">
|
||||
<h2>Home</h2>
|
||||
@ -124,7 +124,7 @@ export class Root extends Component {
|
||||
return (
|
||||
<Skeleton
|
||||
spinner={this.state.spinner}
|
||||
sidebar={renderChannelsSidebar(props)}>
|
||||
sidebar={renderChannelSidebar(props)}>
|
||||
<NewScreen
|
||||
setSpinner={this.setSpinner}
|
||||
api={api}
|
||||
@ -138,7 +138,7 @@ export class Root extends Component {
|
||||
render={ (props) => {
|
||||
return (
|
||||
<Skeleton
|
||||
sidebar={renderChannelsSidebar(props)}>
|
||||
sidebar={renderChannelSidebar(props)}>
|
||||
<LandingScreen
|
||||
api={api}
|
||||
configs={configs}
|
||||
@ -156,7 +156,7 @@ export class Root extends Component {
|
||||
let messages = state.messages[station] || [];
|
||||
return (
|
||||
<Skeleton
|
||||
sidebar={renderChannelsSidebar(props) }>
|
||||
sidebar={renderChannelSidebar(props) }>
|
||||
<ChatScreen
|
||||
api={api}
|
||||
configs={configs}
|
||||
@ -173,7 +173,7 @@ export class Root extends Component {
|
||||
render={ (props) => {
|
||||
return (
|
||||
<Skeleton
|
||||
sidebar={renderChannelsSidebar(props) }>
|
||||
sidebar={renderChannelSidebar(props) }>
|
||||
<MemberScreen
|
||||
{...props}
|
||||
api={api}
|
||||
@ -187,7 +187,7 @@ export class Root extends Component {
|
||||
return (
|
||||
<Skeleton
|
||||
spinner={this.state.spinner}
|
||||
sidebar={renderChannelsSidebar(props) }>
|
||||
sidebar={renderChannelSidebar(props) }>
|
||||
<SettingsScreen
|
||||
{...props}
|
||||
setSpinner={this.setSpinner}
|
||||
|
Loading…
Reference in New Issue
Block a user