mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
Merge pull request #4507 from urbit/mp/landscape/misc
landscape: grabbag
This commit is contained in:
commit
322d6e9a41
@ -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>
|
||||
);
|
||||
|
@ -41,6 +41,7 @@ const Candidate = ({ title, selected, onClick }): ReactElement => (
|
||||
<CandidateBox
|
||||
onClick={onClick}
|
||||
selected={selected}
|
||||
cursor="pointer"
|
||||
borderColor="washedGray"
|
||||
color="black"
|
||||
fontSize={0}
|
||||
|
@ -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>
|
||||
);
|
||||
|
@ -78,6 +78,7 @@ const Candidate = ({ title, detail, selected, onClick }): ReactElement => (
|
||||
bg="white"
|
||||
color="black"
|
||||
fontSize={0}
|
||||
cursor="pointer"
|
||||
p={1}
|
||||
width="100%"
|
||||
>
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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>);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user