Merge pull request #4507 from urbit/mp/landscape/misc

landscape: grabbag
This commit is contained in:
matildepark 2021-02-25 22:20:12 -05:00 committed by GitHub
commit 322d6e9a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 9 deletions

View File

@ -5,7 +5,7 @@ import { Box } from '@tlon/indigo-react';
export function Body( export function Body(
props: { children: ReactNode } & Parameters<typeof Box>[0] props: { children: ReactNode } & Parameters<typeof Box>[0]
) { ) {
const { children, ...boxProps } = props; const { children, border, ...boxProps } = props;
return ( return (
<Box fontSize={0} px={[0, 3]} pb={[0, 3]} height="100%" width="100%"> <Box fontSize={0} px={[0, 3]} pb={[0, 3]} height="100%" width="100%">
<Box <Box
@ -13,11 +13,11 @@ export function Body(
height="100%" height="100%"
width="100%" width="100%"
borderRadius={2} borderRadius={2}
border={[0, 1]} border={border ? border : [0, 1]}
borderColor={['washedGray', 'washedGray']} borderColor={['washedGray', 'washedGray']}
{...boxProps} {...boxProps}
> >
{props.children} {children}
</Box> </Box>
</Box> </Box>
); );

View File

@ -41,6 +41,7 @@ const Candidate = ({ title, selected, onClick }): ReactElement => (
<CandidateBox <CandidateBox
onClick={onClick} onClick={onClick}
selected={selected} selected={selected}
cursor="pointer"
borderColor="washedGray" borderColor="washedGray"
color="black" color="black"
fontSize={0} fontSize={0}

View File

@ -8,10 +8,10 @@ interface LoadingProps {
} }
export function Loading({ text }: LoadingProps) { export function Loading({ text }: LoadingProps) {
return ( return (
<Body> <Body border="0">
<Center height="100%"> <Center height="100%">
<LoadingSpinner /> <LoadingSpinner />
{Boolean(text) && <Text>{text}</Text>} {Boolean(text) && <Text ml={4}>{text}</Text>}
</Center> </Center>
</Body> </Body>
); );

View File

@ -78,6 +78,7 @@ const Candidate = ({ title, detail, selected, onClick }): ReactElement => (
bg="white" bg="white"
color="black" color="black"
fontSize={0} fontSize={0}
cursor="pointer"
p={1} p={1}
width="100%" width="100%"
> >

View File

@ -151,7 +151,7 @@ export function GraphPermissions(props: GraphPermissionsProps) {
} }
}; };
const schema = formSchema(Array.from(group.members)); const schema = formSchema(Array.from(group?.members ?? []));
return ( return (
<Formik <Formik

View File

@ -22,6 +22,7 @@ import { isChannelAdmin, isHost } from '~/logic/lib/group';
interface ChannelPopoverRoutesProps { interface ChannelPopoverRoutesProps {
baseUrl: string; baseUrl: string;
rootUrl: string;
association: Association; association: Association;
group: Group; group: Group;
groups: Groups; groups: Groups;
@ -51,8 +52,8 @@ export function ChannelPopoverRoutes(props: ChannelPopoverRoutesProps) {
}; };
const handleArchive = async () => { const handleArchive = async () => {
const [,,,name] = association.resource.split('/'); const [,,,name] = association.resource.split('/');
await api.graph.deleteGraph(name); api.graph.deleteGraph(name);
history.push(props.baseUrl); return history.push(props.rootUrl);
}; };
const canAdmin = isChannelAdmin(group, association.resource); const canAdmin = isChannelAdmin(group, association.resource);

View File

@ -206,7 +206,7 @@ export function GroupsPane(props: GroupsPaneProps) {
resource={groupAssociation.group} resource={groupAssociation.group}
/>; />;
} else { } else {
summary = (<Box p="4"><Text fontSize="0" color='gray'> summary = (<Box p="4"><Text color='gray'>
Create or select a channel to get started Create or select a channel to get started
</Text></Box>); </Text></Box>);
} }