mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
interface: fix up issues from zustand merge
This commit is contained in:
parent
2e45f4fd99
commit
bdfa1650cf
@ -73,6 +73,7 @@
|
||||
creator our.bowl
|
||||
config [%graph module.action]
|
||||
preview %.n
|
||||
hidden %.n
|
||||
==
|
||||
=/ met-action=action:met
|
||||
[%add group graph+rid.action metadatum]
|
||||
|
@ -20,8 +20,9 @@ export default class MetadataApi extends BaseApi<StoreState> {
|
||||
color,
|
||||
'date-created': dateCreated,
|
||||
creator,
|
||||
'module': moduleName,
|
||||
config: { graph: moduleName },
|
||||
picture: '',
|
||||
hidden: false,
|
||||
preview: false,
|
||||
vip: ''
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ export function SidebarList(props: {
|
||||
const assoc = associations[a];
|
||||
if (workspace?.type === 'messages') {
|
||||
return (
|
||||
!(assoc.group in props.associations.groups) &&
|
||||
!(assoc.group in associationState.groups) &&
|
||||
'graph' in assoc.metadata.config &&
|
||||
assoc.metadata.config.graph === 'chat'
|
||||
);
|
||||
@ -64,7 +64,6 @@ export function SidebarList(props: {
|
||||
assoc.group === group &&
|
||||
!assoc.metadata.hidden
|
||||
) : (
|
||||
!(assoc.group in props.associations.groups) &&
|
||||
'graph' in assoc.metadata.config &&
|
||||
assoc.metadata.config.graph !== 'chat' &&
|
||||
!assoc.metadata.hidden
|
||||
|
@ -44,8 +44,10 @@ export function SidebarListHeader(props: {
|
||||
const groupPath = getGroupFromWorkspace(props.workspace);
|
||||
const role = groupPath && groups?.[groupPath] ? roleForShip(groups[groupPath], window.ship) : undefined;
|
||||
const associations = useMetadataState(state => state.associations);
|
||||
|
||||
const metadata = associations?.groups?.[groupPath]?.metadata;
|
||||
const memberMetadata =
|
||||
groupPath ? associations.groups?.[groupPath].metadata.vip === 'member-metadata' : false;
|
||||
groupPath ? metadata.vip === 'member-metadata' : false;
|
||||
|
||||
const isAdmin = memberMetadata || (role === 'admin') || (props.workspace?.type === 'home') || (props.workspace?.type === 'messages');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user