Merge pull request #4370 from urbit/la/bug-fixes

Fix joining DMs and a few visual issues
This commit is contained in:
L 2021-02-03 13:32:37 -06:00 committed by GitHub
commit 0790525836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 17 deletions

View File

@ -14,6 +14,7 @@
--
::
%- agent:dbug
%+ verb |
^- agent:gall
%- (agent:pull-hook config)
^- (pull-hook:pull-hook config)

View File

@ -14,6 +14,7 @@
--
::
%- agent:dbug
%+ verb |
^- agent:gall
%- (agent:pull-hook config)
^- (pull-hook:pull-hook config)

View File

@ -1,13 +1,7 @@
/- *group
/- metadata=metadata-store
/+ store=graph-store
/+ mdl=metadata
/+ res=resource
/+ graph
/+ group
/+ default-agent
/+ dbug
/+ push-hook
/- *group, metadata=metadata-store
/+ store=graph-store, mdl=metadata, res=resource, graph, group, default-agent,
dbug, verb, push-hook
::
~% %graph-push-hook-top ..part ~
|%
+$ card card:agent:gall
@ -32,6 +26,7 @@
=| state-zero
=* state -
%- agent:dbug
%+ verb |
^- agent:gall
%- (agent:push-hook config)
^- agent
@ -98,7 +93,7 @@
++ initial-watch
|= [=path =resource:res]
^- vase
?> (is-allowed resource)
?> (is-allowed:hc resource)
!> ^- update:store
?~ path
:: new subscribe

View File

@ -1,7 +1,7 @@
:: graph-store [landscape]
::
::
/+ store=graph-store, sigs=signatures, res=resource, default-agent, dbug,
/+ store=graph-store, sigs=signatures, res=resource, default-agent, dbug, verb,
*migrate
~% %graph-store-top ..part ~
|%
@ -25,6 +25,7 @@
=* state -
::
%- agent:dbug
%+ verb |
^- agent:gall
~% %graph-store-agent ..card ~
|_ =bowl:gall

View File

@ -24,11 +24,11 @@ export function makeResource(ship: string, name: string) {
export function isWriter(group: Group, resource: string) {
const writers: Set<string> | undefined = _.get(
group.tags,
["graph", resource, "writers"],
group,
["tags", "graph", resource, "writers"],
undefined
);
const admins = group.tags?.role?.admin ?? new Set();
const admins = group?.tags?.role?.admin ?? new Set();
if (_.isUndefined(writers)) {
return true;
} else {

View File

@ -83,7 +83,7 @@ export const ShareProfile = (props) => {
p={1}
alignItems="center"
borderRadius={2}
backgroundColor={!props.our ? `#${uxToHex(props.our.color)}` : "#000000"}>
backgroundColor={!!props.our ? `#${uxToHex(props.our.color)}` : "#000000"}>
<Sigil
ship={window.ship}
size={16}

View File

@ -76,7 +76,7 @@ export function GraphPermissions(props: GraphPermissionsProps) {
const { api, group, association } = props;
const writers = _.get(
group.tags,
group?.tags,
["graph", association.resource, "writers"],
new Set()
);

View File

@ -87,6 +87,7 @@ export function JoinGroup(props: JoinGroupProps) {
(group in (p.associations?.graph ?? {})
|| group in (p.associations?.groups ?? {}))
});
if(props.groups?.[group]?.hidden) {
const { metadata } = associations.graph[group];
history.push(`/~landscape/home/resource/${metadata.module}${group}`);