diff --git a/src/components/Chat.js b/src/components/Chat.js
index fe04b2a..e90e29c 100644
--- a/src/components/Chat.js
+++ b/src/components/Chat.js
@@ -199,6 +199,7 @@ function Chat({
component={InternalLink}
to={`/profile/${item.user}`}
underline="none"
+ showIcon
/>
: {item.message}
,
diff --git a/src/components/GameInfoRow.js b/src/components/GameInfoRow.js
index 3b89f2d..cb5f80f 100644
--- a/src/components/GameInfoRow.js
+++ b/src/components/GameInfoRow.js
@@ -56,7 +56,7 @@ function GameInfoRow({ gameId, onClick }) {
}
return (
-
+
);
};
diff --git a/src/components/ProfileGamesTable.js b/src/components/ProfileGamesTable.js
index 0a5050b..560784b 100644
--- a/src/components/ProfileGamesTable.js
+++ b/src/components/ProfileGamesTable.js
@@ -29,9 +29,6 @@ const useStyles = makeStyles((theme) => ({
paddingLeft: 12,
paddingRight: 12,
},
- "& svg": {
- display: "block",
- },
"& th": {
background: theme.palette.background.panel,
},
@@ -49,6 +46,11 @@ const useStyles = makeStyles((theme) => ({
display: "none",
},
},
+ starIcon: {
+ display: "block",
+ color: amber[500],
+ marginBlock: -4,
+ },
}));
function ProfileGamesTable({ userId, gamesWithScores, handleClickGame }) {
@@ -115,9 +117,7 @@ function ProfileGamesTable({ userId, gamesWithScores, handleClickGame }) {
{game.scores &&
game.scores[userId] ===
Math.max(0, ...Object.values(game.scores)) && (
-
+
)}
diff --git a/src/components/ProfileName.js b/src/components/ProfileName.js
index 898157d..b624948 100644
--- a/src/components/ProfileName.js
+++ b/src/components/ProfileName.js
@@ -60,6 +60,7 @@ function ProfileName({ userId }) {
return (
{
const isOnline =
player.connections && Object.keys(player.connections).length > 0;
diff --git a/src/components/User.js b/src/components/User.js
index f3a4acd..876f011 100644
--- a/src/components/User.js
+++ b/src/components/User.js
@@ -1,6 +1,8 @@
+import SecurityIcon from "@mui/icons-material/Security";
import WhatshotIcon from "@mui/icons-material/Whatshot";
import { useTheme } from "@mui/material/styles";
import makeStyles from "@mui/styles/makeStyles";
+import clsx from "clsx";
import { useNavigate } from "react-router-dom";
import useFirebaseRef from "../hooks/useFirebaseRef";
@@ -8,6 +10,14 @@ import useStats from "../hooks/useStats";
import { colors } from "../util";
const useStyles = makeStyles(() => ({
+ inlineIcon: {
+ fontSize: "inherit",
+ display: "inline",
+ position: "relative",
+ left: "-0.1em",
+ top: "0.15em",
+ color: "inherit",
+ },
patronIcon: {
cursor: "pointer",
"&:hover": {
@@ -32,6 +42,7 @@ function User({
component,
render,
forcePatron,
+ showIcon,
showRating,
...other
}) {
@@ -46,7 +57,7 @@ function User({
return null;
}
- const handleClick = (e) => {
+ const handlePatronClick = (e) => {
e.preventDefault();
navigate("/donate");
};
@@ -68,20 +79,16 @@ function User({
{loadingStats ? "⋯" : Math.round(stats[showRating].rating)}
)}
- {(user.patron || forcePatron) && (
-
- )}
+ {showIcon &&
+ (user.admin ? (
+ // Moderator icon takes precedence over patron icon.
+
+ ) : user.patron || forcePatron ? (
+
+ ) : null)}
{user.name}
);
diff --git a/src/pages/DonatePage.js b/src/pages/DonatePage.js
index cde6334..25dbdf0 100644
--- a/src/pages/DonatePage.js
+++ b/src/pages/DonatePage.js
@@ -76,7 +76,7 @@ function DonatePage() {
-
Bragging rights with a patron icon next to your name (e.g.,{" "}
-
+
).
-
diff --git a/src/pages/LobbyPage.js b/src/pages/LobbyPage.js
index 853f9d6..2b56f42 100644
--- a/src/pages/LobbyPage.js
+++ b/src/pages/LobbyPage.js
@@ -45,9 +45,6 @@ const useStyles = makeStyles((theme) => ({
paddingLeft: 12,
paddingRight: 12,
},
- "& svg": {
- display: "block",
- },
"& tbody > tr:hover": {
background: theme.palette.action.hover,
cursor: "pointer",
diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js
index a1fa58b..ac74226 100644
--- a/src/pages/ProfilePage.js
+++ b/src/pages/ProfilePage.js
@@ -163,7 +163,7 @@ function ProfilePage() {
Statistics
-
+