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

View File

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

View File

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

View File

@ -78,6 +78,7 @@ const Candidate = ({ title, detail, selected, onClick }): ReactElement => (
bg="white"
color="black"
fontSize={0}
cursor="pointer"
p={1}
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 (
<Formik

View File

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

View File

@ -206,7 +206,7 @@ export function GroupsPane(props: GroupsPaneProps) {
resource={groupAssociation.group}
/>;
} 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
</Text></Box>);
}