Fix and prettier incoming changes from PR #119.

Cherry pick PR #130: don't show add friend button on banned / deleted accounts.
Also account for this in context menu.
This commit is contained in:
Paul
2021-09-03 10:43:48 +01:00
parent 25e49b63fa
commit bd54c341b9
3 changed files with 34 additions and 14 deletions

View File

@@ -196,6 +196,8 @@ export const UserProfile = observer(
</IconButton>
)}
{!user.bot &&
flags != 2 &&
flags != 4 &&
(user.relationship ===
RelationshipStatus.Incoming ||
user.relationship ===
@@ -315,10 +317,14 @@ export const UserProfile = observer(
content={
<Text id="app.special.popovers.user_profile.badges.translator" />
}>
<img src="/assets/badges/translator.svg"
onClick={() => {
window.open("https://weblate.insrt.uk/projects/revolt/web-app/", "_blank")
}}
<img
src="/assets/badges/translator.svg"
onClick={() => {
window.open(
"https://weblate.insrt.uk/projects/revolt/web-app/",
"_blank",
);
}}
/>
</Tooltip>
) : (
@@ -343,7 +349,10 @@ export const UserProfile = observer(
size={32}
color="#efab44"
onClick={() => {
window.open("https://insrt.uk/donate", "_blank")
window.open(
"https://insrt.uk/donate",
"_blank",
);
}}
/>
</Tooltip>