mirror of
https://github.com/urbit/shrub.git
synced 2025-01-01 17:16:47 +03:00
Merge branch 'release/next-userspace' into lf/graph-publish-fe
This commit is contained in:
commit
79ac6eb8cd
@ -290,7 +290,7 @@
|
||||
=/ body=json
|
||||
(need (de-json:html q.u.body.request.inbound-request))
|
||||
=/ input=vase
|
||||
(tube !>(body))
|
||||
(slop (tube !>(body)) !>(~))
|
||||
=/ =start-args
|
||||
[~ `tid thread input]
|
||||
=^ cards state
|
||||
|
@ -24,7 +24,7 @@
|
||||
|= arg=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=+ !<(=action:graph-view arg)
|
||||
=+ !<([=action:graph-view ~] arg)
|
||||
?> ?=(%create -.action)
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
:: Add graph to graph-store
|
||||
|
@ -48,7 +48,7 @@
|
||||
|= arg=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=+ !<(=action:graph-view arg)
|
||||
=+ !<([=action:graph-view ~] arg)
|
||||
?> ?=(%delete -.action)
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
?. =(our.bowl entity.rid.action)
|
||||
|
@ -43,7 +43,7 @@
|
||||
|= arg=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=+ !<(=action:graph-view arg)
|
||||
=+ !<([=action:graph-view ~] arg)
|
||||
?> ?=(%groupify -.action)
|
||||
;< =group bind:m (scry-group rid.action)
|
||||
?. hidden.group
|
||||
|
@ -28,7 +28,7 @@
|
||||
|= arg=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=+ !<(=action:graph-view arg)
|
||||
=+ !<([=action:graph-view ~] arg)
|
||||
?> ?=(%join -.action)
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
?: =(our.bowl entity.rid.action)
|
||||
|
@ -28,20 +28,20 @@
|
||||
;< ugroup=(unit group) bind:m
|
||||
%+ scry:strandio ,(unit group)
|
||||
;: weld
|
||||
/gx/group-store/resource/graph
|
||||
/gx/group-store/groups
|
||||
(en-path:resource rid)
|
||||
/noun
|
||||
==
|
||||
(pure:m (need ugroup))
|
||||
::
|
||||
++ delete-graph
|
||||
|= rid=resource
|
||||
|= [now=time rid=resource]
|
||||
=/ m (strand ,~)
|
||||
^- form:m
|
||||
;< ~ bind:m
|
||||
(poke-our %graph-pull-hook %pull-hook-action !>([%remove rid]))
|
||||
;< ~ bind:m
|
||||
(poke-our %graph-store %graph-update !>([%remove-graph rid]))
|
||||
(poke-our %graph-store %graph-update !>([%0 now [%remove-graph rid]]))
|
||||
(pure:m ~)
|
||||
--
|
||||
::
|
||||
@ -49,7 +49,7 @@
|
||||
|= arg=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=+ !<(=action:graph-view arg)
|
||||
=+ !<([=action:graph-view ~] arg)
|
||||
?> ?=(%leave -.action)
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
?: =(our.bowl entity.rid.action)
|
||||
@ -57,11 +57,20 @@
|
||||
;< group-rid=resource bind:m (scry-metadata rid.action)
|
||||
;< g=group bind:m (scry-group group-rid)
|
||||
?. hidden.g
|
||||
;< ~ bind:m (delete-graph rid.action)
|
||||
;< ~ bind:m (delete-graph now.bowl rid.action)
|
||||
(pure:m !>(~))
|
||||
;< ~ bind:m
|
||||
(poke-our %group-push-hook %pull-hook-action !>([%remove rid.action]))
|
||||
%+ poke-our %metadata-hook
|
||||
metadata-hook-action+!>([%remove (en-path:resource rid.action)])
|
||||
;< ~ bind:m
|
||||
%+ poke-our %metadata-store
|
||||
:- %metadata-action
|
||||
!> :+ %remove
|
||||
(en-path:resource rid.action)
|
||||
[%graph (en-path:resource rid.action)]
|
||||
;< ~ bind:m
|
||||
(poke-our %group-pull-hook %pull-hook-action !>([%remove rid.action]))
|
||||
;< ~ bind:m
|
||||
(poke-our %group-store %group-action !>([%remove-group rid.action ~]))
|
||||
;< ~ bind:m (delete-graph rid.action)
|
||||
;< ~ bind:m (delete-graph now.bowl rid.action)
|
||||
(pure:m !>(~))
|
||||
|
@ -11,7 +11,9 @@
|
||||
|= arg=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=+ !<([rid=resource title=@t description=@t group=resource module=@t ~] arg)
|
||||
+= !<
|
||||
[[rid=resource title=@t description=@t group=resource module=@t ~] ~]
|
||||
arg
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
:: unarchive graph and share it
|
||||
;< ~ bind:m
|
||||
|
@ -25,8 +25,8 @@ export function ChatResource(props: ChatResourceProps) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { envelopes, config } = props.inbox[station];
|
||||
const { read, length } = config;
|
||||
const { envelopes, config } = (props.inbox?.[station]) ? props.inbox[station] : {envelopes: [], config: {}};
|
||||
const { read, length } = (config) ? config : undefined;
|
||||
|
||||
const groupPath = props.association["group-path"];
|
||||
const group = props.groups[groupPath];
|
||||
|
@ -47,11 +47,9 @@ export default class LaunchApp extends React.Component {
|
||||
p={2}
|
||||
>
|
||||
<Tile
|
||||
border={1}
|
||||
bg="#fff"
|
||||
borderColor="green"
|
||||
color="green"
|
||||
to="/~landscape/home"
|
||||
boxShadow='none'
|
||||
p={0}
|
||||
>
|
||||
<Box p={2} height='100%' width='100%' bg='washedGreen'>
|
||||
|
@ -30,7 +30,7 @@ export default class Tile extends React.Component {
|
||||
borderRadius={2}
|
||||
overflow="hidden"
|
||||
bg={bg || "white"}
|
||||
color='washedGray'
|
||||
color={props?.color || 'washedGray'}
|
||||
boxShadow={boxShadow || '0 0 0px 1px inset'}
|
||||
>
|
||||
<Box
|
||||
|
@ -93,7 +93,7 @@ export default class WeatherTile extends React.Component {
|
||||
weatherStyle = { bg: 'white', text: 'black' }
|
||||
) {
|
||||
return (
|
||||
<Tile bg={weatherStyle.bg} color={weatherStyle.text}>
|
||||
<Tile bg={weatherStyle.bg}>
|
||||
{child}
|
||||
</Tile>
|
||||
);
|
||||
|
@ -173,6 +173,7 @@ export function GroupsPane(props: GroupsPaneProps) {
|
||||
groups={groups}
|
||||
group={groupPath}
|
||||
contacts={props.contacts}
|
||||
workspace={workspace}
|
||||
/>
|
||||
{popovers(routeProps, baseUrl)}
|
||||
</Skeleton>
|
||||
|
@ -45,7 +45,7 @@ interface NewChannelProps {
|
||||
|
||||
|
||||
export function NewChannel(props: NewChannelProps & RouteComponentProps) {
|
||||
const { history, api, group } = props;
|
||||
const { history, api, group, workspace } = props;
|
||||
|
||||
const waiter = useWaitForProps(props, 5000);
|
||||
|
||||
@ -145,12 +145,13 @@ export function NewChannel(props: NewChannelProps & RouteComponentProps) {
|
||||
caption="What's your channel about?"
|
||||
placeholder="Channel description"
|
||||
/>
|
||||
{(workspace?.type === 'home') &&
|
||||
<ShipSearch
|
||||
groups={props.groups}
|
||||
contacts={props.contacts}
|
||||
id="ships"
|
||||
label="Invitees"
|
||||
/>
|
||||
/>}
|
||||
<Box justifySelf="start">
|
||||
<AsyncButton
|
||||
primary
|
||||
|
@ -45,8 +45,9 @@ const searchParticipant = (search: string) => (p: Participant) => {
|
||||
if (search.length == 0) {
|
||||
return true;
|
||||
}
|
||||
const s = search.toLowerCase();
|
||||
return p.patp.includes(s) || p.nickname.toLowerCase().includes(search);
|
||||
let s = search.toLowerCase();
|
||||
s = (s.startsWith('~')) ? s.substr(1) : s;
|
||||
return p.patp.includes(s) || p.nickname.toLowerCase().includes(s);
|
||||
};
|
||||
|
||||
function getParticipants(cs: Contacts, group: Group) {
|
||||
@ -289,6 +290,11 @@ function Participant(props: {
|
||||
});
|
||||
}, [api, association]);
|
||||
|
||||
const onKick = useCallback(async () => {
|
||||
const resource = resourceFromPath(association["group-path"]);
|
||||
await api.groups.remove(resource, [`~${contact.patp}`]);
|
||||
}, [api, association]);
|
||||
|
||||
const avatar =
|
||||
contact?.avatar !== null && !props.hideAvatars ? (
|
||||
<img src={contact.avatar} height={32} width={32} className="dib" />
|
||||
@ -337,9 +343,14 @@ function Participant(props: {
|
||||
{props.role === "admin" && (
|
||||
<>
|
||||
{!isInvite && (
|
||||
<>
|
||||
<StatelessAsyncAction onClick={onBan} bg="transparent">
|
||||
<Text color="red">Ban from {title}</Text>
|
||||
</StatelessAsyncAction>
|
||||
<StatelessAsyncAction onClick={onKick} bg="transparent">
|
||||
<Text color="red">Kick from {title}</Text>
|
||||
</StatelessAsyncAction>
|
||||
</>
|
||||
)}
|
||||
{role === "admin" ? (
|
||||
<StatelessAsyncAction onClick={onDemote} bg="transparent">
|
||||
|
@ -105,6 +105,7 @@ export function Sidebar(props: SidebarProps) {
|
||||
width="100%"
|
||||
gridRow="1/2"
|
||||
gridColumn="1/2"
|
||||
borderTopLeftRadius='2'
|
||||
borderRight={1}
|
||||
borderRightColor="washedGray"
|
||||
overflowY="scroll"
|
||||
|
Loading…
Reference in New Issue
Block a user