Add announcements work

This commit is contained in:
Logan Allen 2019-07-15 10:21:54 -07:00
parent a761acc59d
commit d515ef4428
4 changed files with 68 additions and 44 deletions

View File

@ -50,7 +50,7 @@ export class NewScreen extends Component {
create: { create: {
nom: state.idName, nom: state.idName,
des: "chatroom", des: "chatroom",
sec: "journal" sec: "village"
} }
}, },
{ {

View File

@ -36,11 +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) => {
if (!configs[conf]) { return !!configs[conf] && conf.split('/')[1] !== 'i';
return false;
}
let cap = configs[conf].cap;
return cap === 'dm' || cap === 'chatroom';
}); });
let messages = _.get(state, 'messages', {}); let messages = _.get(state, 'messages', {});
@ -112,7 +108,6 @@ export class Root extends Component {
<div className="w-100 h-100 fr" style={{ flexGrow: 1 }}> <div className="w-100 h-100 fr" style={{ flexGrow: 1 }}>
<div className="dt w-100 h-100"> <div className="dt w-100 h-100">
<div className="dtc center v-mid w-100 h-100 bg-white"> <div className="dtc center v-mid w-100 h-100 bg-white">
<p className="tc">Cmd + N to start a new chat</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -58,14 +58,48 @@
=/ inboxwir /circle/[(scot %p our.bol)]/inbox/config/group =/ inboxwir /circle/[(scot %p our.bol)]/inbox/config/group
=/ inboxi/poke =/ inboxi/poke
:- %hall-action :- %hall-action
[%source %inbox %.y (silt [[our.bol %i] ~]~)] [%source %inbox %.y (silt [[our.bol %i] ~]~)]
:_ this =/ fakeannounce=poke
:- %hall-action
[%create %hall-internal-announcements '' %village]
=/ announce=poke
:- %hall-action
[%create %announcements 'Announcements from Tlon' %journal]
=/ help=poke
:- %hall-action
[%create %urbit-help 'Get help about Urbit' %channel]
=/ dev=poke
:- %hall-action
[%create %urbit-dev 'Chat about developing on Urbit' %channel]
=/ sourcefakeannounce/poke
:- %hall-action
[%source %inbox %.y (silt [[our.bol %hall-internal-announcements] ~]~)]
=/ sourceannounce/poke
:- %hall-action
[%source %inbox %.y (silt [[~marzod %announcements] ~]~)]
=/ hallactions=(list move)
?: =((clan:title our.bol) %czar)
~
?: =(our.bol ~marzod)
~& %marzod-chat
:- [ost.bol %poke /announce [our.bol %hall] announce]
[ost.bol %poke /announce [our.bol %hall] sourceannounce]~
?: =(our.bol ~dopzod)
~& %dopzod-chat
:- [ost.bol %poke /announce [our.bol %hall] dev]
[ost.bol %poke /announce [our.bol %hall] help]~
:- [ost.bol %poke /announce [our.bol %hall] fakeannounce]
:- [ost.bol %poke /announce [our.bol %hall] sourcefakeannounce]
[ost.bol %poke /announce [our.bol %hall] sourceannounce]~
=/ moves=(list move)
:~ [ost.bol %peer inboxwir [our.bol %hall] inboxpat] :~ [ost.bol %peer inboxwir [our.bol %hall] inboxpat]
[ost.bol %peer circlespat [our.bol %hall] circlespat] [ost.bol %peer circlespat [our.bol %hall] circlespat]
[ost.bol %connect / [~ /'~chat'] %chat] [ost.bol %connect / [~ /'~chat'] %chat]
[ost.bol %poke /chat [our.bol %hall] inboxi] [ost.bol %poke /chat [our.bol %hall] inboxi]
[ost.bol %poke /chat [our.bol %launch] launcha] [ost.bol %poke /chat [our.bol %launch] launcha]
== ==
:_ this
%+ weld moves hallactions
:- [ost.bol %poke /chat [our.bol %launch] launcha]~ :- [ost.bol %poke /chat [our.bol %launch] launcha]~
this(sta u.old) this(sta u.old)
:: ::

View File

@ -57734,7 +57734,7 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
create: { create: {
nom: state.idName, nom: state.idName,
des: "chatroom", des: "chatroom",
sec: "journal" sec: "village"
} }
}, },
{ {
@ -57897,11 +57897,7 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
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) => {
if (!configs[conf]) { return !!configs[conf] && conf.split('/')[1] !== 'i';
return false;
}
let cap = configs[conf].cap;
return cap === 'dm' || cap === 'chatroom';
}); });
let messages = lodash.get(state, 'messages', {}); let messages = lodash.get(state, 'messages', {});
@ -57953,8 +57949,8 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
} }
return ( return (
react.createElement(BrowserRouter, {__self: this, __source: {fileName: _jsxFileName$j, lineNumber: 95}} react.createElement(BrowserRouter, {__self: this, __source: {fileName: _jsxFileName$j, lineNumber: 91}}
, react.createElement('div', {__self: this, __source: {fileName: _jsxFileName$j, lineNumber: 96}} , react.createElement('div', {__self: this, __source: {fileName: _jsxFileName$j, lineNumber: 92}}
, react.createElement(Route, { exact: true, path: "/~chat", , react.createElement(Route, { exact: true, path: "/~chat",
render: (props) => { render: (props) => {
return ( return (
@ -57967,19 +57963,18 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
unreads: unreads, unreads: unreads,
api: api, api: api,
inviteConfig: inviteConfig, inviteConfig: inviteConfig,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 102}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 98}}
) )
, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 100}} , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 96}}
, react.createElement('div', { className: "w-100 h-100 fr" , style: { flexGrow: 1 }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 112}} , react.createElement('div', { className: "w-100 h-100 fr" , style: { flexGrow: 1 }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 108}}
, react.createElement('div', { className: "dt w-100 h-100" , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 113}} , react.createElement('div', { className: "dt w-100 h-100" , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 109}}
, react.createElement('div', { className: "dtc center v-mid w-100 h-100 bg-white" , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 114}} , react.createElement('div', { className: "dtc center v-mid w-100 h-100 bg-white" , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 110}}
, react.createElement('p', { className: "tc", __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 115}}, "Cmd + N to start a new chat" )
) )
) )
) )
) )
); );
}, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 97}} ) }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 93}} )
, react.createElement(Route, { exact: true, path: "/~chat/new", , react.createElement(Route, { exact: true, path: "/~chat/new",
render: (props) => { render: (props) => {
return ( return (
@ -57993,18 +57988,18 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
unreads: unreads, unreads: unreads,
api: api, api: api,
inviteConfig: inviteConfig, inviteConfig: inviteConfig,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 128}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 123}}
) )
, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 125}} , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 120}}
, react.createElement(NewScreen, { , react.createElement(NewScreen, {
setSpinner: this.setSpinner, setSpinner: this.setSpinner,
api: api, api: api,
circles: circles, circles: circles,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 138}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 133}}
) )
) )
); );
}, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 122}} ) }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 117}} )
, react.createElement(Route, { exact: true, path: "/~chat/join/:ship/:station", , react.createElement(Route, { exact: true, path: "/~chat/join/:ship/:station",
render: (props) => { render: (props) => {
return ( return (
@ -58017,17 +58012,17 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
unreads: unreads, unreads: unreads,
api: api, api: api,
inviteConfig: inviteConfig, inviteConfig: inviteConfig,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 152}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 147}}
) )
, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 150}} , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 145}}
, react.createElement(LandingScreen, { , react.createElement(LandingScreen, {
api: api, api: api,
configs: configs, configs: configs,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 162}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 157}}
) )
) )
); );
}, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 147}} ) }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 142}} )
, react.createElement(Route, { exact: true, path: "/~chat/:ship/:station", , react.createElement(Route, { exact: true, path: "/~chat/:ship/:station",
render: (props) => { render: (props) => {
let station = let station =
@ -58045,20 +58040,20 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
unreads: unreads, unreads: unreads,
api: api, api: api,
inviteConfig: inviteConfig, inviteConfig: inviteConfig,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 180}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 175}}
) )
, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 178}} , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 173}}
, react.createElement(ChatScreen, { , react.createElement(ChatScreen, {
api: api, api: api,
configs: configs, configs: configs,
messages: messages, messages: messages,
peers: state.peers, peers: state.peers,
subscription: subscription, subscription: subscription,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 190}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 185}}
) )
) )
); );
}, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 170}} ) }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 165}} )
, react.createElement(Route, { exact: true, path: "/~chat/:ship/:station/members", , react.createElement(Route, { exact: true, path: "/~chat/:ship/:station/members",
render: (props) => { render: (props) => {
return ( return (
@ -58071,17 +58066,17 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
unreads: unreads, unreads: unreads,
api: api, api: api,
inviteConfig: inviteConfig, inviteConfig: inviteConfig,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 206}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 201}}
) )
, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 204}} , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 199}}
, react.createElement(MemberScreen, { , react.createElement(MemberScreen, {
...props, ...props,
api: api, api: api,
peers: state.peers, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 216}} peers: state.peers, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 211}}
) )
) )
); );
}, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 201}} ) }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 196}} )
, react.createElement(Route, { exact: true, path: "/~chat/:ship/:station/settings", , react.createElement(Route, { exact: true, path: "/~chat/:ship/:station/settings",
render: (props) => { render: (props) => {
return ( return (
@ -58095,19 +58090,19 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\
unreads: unreads, unreads: unreads,
api: api, api: api,
inviteConfig: inviteConfig, inviteConfig: inviteConfig,
...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 230}} ...props, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 225}}
) )
, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 227}} , __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 222}}
, react.createElement(SettingsScreen, { , react.createElement(SettingsScreen, {
...props, ...props,
setSpinner: this.setSpinner, setSpinner: this.setSpinner,
api: api, api: api,
peers: state.peers, peers: state.peers,
circles: state.circles, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 240}} circles: state.circles, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 235}}
) )
) )
); );
}, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 224}} ) }, __self: this, __source: {fileName: _jsxFileName$j, lineNumber: 219}} )
) )
) )
) )