mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-12 15:01:38 +03:00
landscape: hide 'promote to admin' on pending patp
Fixes urbit/landscape#694
This commit is contained in:
parent
421dc97a64
commit
103547ba3b
@ -295,7 +295,7 @@ function Participant(props: {
|
||||
const resource = resourceFromPath(association.group);
|
||||
if(contact.pending) {
|
||||
await api.groups.changePolicy(
|
||||
resource,
|
||||
resource,
|
||||
{ invite: { removeInvites: [`~${contact.patp}`] } }
|
||||
);
|
||||
} else {
|
||||
@ -305,12 +305,12 @@ function Participant(props: {
|
||||
|
||||
const avatar =
|
||||
contact?.avatar !== null && !hideAvatars ? (
|
||||
<Image
|
||||
src={contact.avatar}
|
||||
height={32}
|
||||
width={32}
|
||||
<Image
|
||||
src={contact.avatar}
|
||||
height={32}
|
||||
width={32}
|
||||
display='inline-block'
|
||||
style={{ objectFit: 'cover' }}
|
||||
style={{ objectFit: 'cover' }}
|
||||
/>
|
||||
) : (
|
||||
<Sigil ship={contact.patp} size={32} color={`#${color}`} />
|
||||
@ -386,9 +386,9 @@ function Participant(props: {
|
||||
{(contact.patp !== window.ship) && (<StatelessAsyncAction onClick={onKick} bg="transparent">
|
||||
<Text color="red">Kick from {title}</Text>
|
||||
</StatelessAsyncAction>)}
|
||||
<StatelessAsyncAction onClick={onPromote} bg="transparent">
|
||||
{!contact.pending && <StatelessAsyncAction onClick={onPromote} bg="transparent">
|
||||
Promote to Admin
|
||||
</StatelessAsyncAction>
|
||||
</StatelessAsyncAction>}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user