[Glitch] Show "Follow" button next to accounts in a collection when logged out
Port 60a437e045fbd6a19a51f3f0edb7e8ea3dd0228a to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
98780106cb
commit
f532c9f179
@ -138,12 +138,16 @@ export const CollectionAccountsList: React.FC<{
|
||||
|
||||
const renderAccountItemButton = useCallback(
|
||||
({ relationship, accountId }: RenderButtonOptions) => {
|
||||
if (!me || !relationship) {
|
||||
// Show follow button when logged out (it will trigger the remote interaction modal)
|
||||
return <AccountListItemFollowButton accountId={accountId} />;
|
||||
}
|
||||
|
||||
// When viewing your own collection, only show the Follow button
|
||||
// for accounts you're not following anymore.
|
||||
const withoutButton =
|
||||
!relationship ||
|
||||
(collectionOwnerId === me &&
|
||||
(relationship.following || relationship.requested));
|
||||
collectionOwnerId === me &&
|
||||
(relationship.following || relationship.requested);
|
||||
|
||||
if (withoutButton) return null;
|
||||
|
||||
|
||||
@ -483,11 +483,19 @@ const InteractionModal: React.FC<{
|
||||
/>
|
||||
</h3>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='interaction_modal.action'
|
||||
defaultMessage="To interact with {name}'s post, you need to sign into your account on whatever Mastodon server you use."
|
||||
values={{ name }}
|
||||
/>
|
||||
{intent === 'follow' ? (
|
||||
<FormattedMessage
|
||||
id='interaction_modal.action_follow'
|
||||
defaultMessage='To follow {name}, you need to sign into your account on whatever Mastodon server you use.'
|
||||
values={{ name }}
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage
|
||||
id='interaction_modal.action'
|
||||
defaultMessage="To interact with {name}'s post, you need to sign into your account on whatever Mastodon server you use."
|
||||
values={{ name }}
|
||||
/>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user