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