+
+ {MUTEABLE_NOTIFICATION_TYPES.map((notificationType) => {
+ const id = `notification-${notificationType.value.replace(":", "-")}`;
+ return (
+
+ );
+ })}
+
+
+
+
+
+
+ Discord
+ Choose whether the bot can send you direct messages.
+
+
+
+
+
+ {MUTEABLE_NOTIFICATION_TYPES.map((notificationType) => {
+ const id = `discord-${notificationType.value.replace(":", "-")}`;
+ return (
+
+ );
+ })}
+
+
+
+
+ {error && (
+
+ {error}
+
+ )}
+ {success && (
+
+ {success}
+
+ )}
+
diff --git a/src/components/static/VersionOverlay.tsx b/src/components/static/VersionOverlay.tsx
index e83d7f2..24f3bfd 100644
--- a/src/components/static/VersionOverlay.tsx
+++ b/src/components/static/VersionOverlay.tsx
@@ -2,6 +2,9 @@
import { useEffect, useState } from "react";
import type { VersionInfo } from "@/lib/versionInfo";
+import { getPayload } from "payload";
+import config from "@payload-config";
+import { User } from "@/payload-types";
const EMPTY: VersionInfo = {
version: null,
@@ -30,7 +33,7 @@ function formatCommitDate(iso: string | null): string | null {
});
}
-const VersionOverlay = () => {
+const VersionOverlay = ({ canSeeCommit }: { canSeeCommit: boolean }) => {
const [info, setInfo] = useState
(null);
useEffect(() => {
@@ -59,13 +62,15 @@ const VersionOverlay = () => {
return (
-
-
version {versionLabel}
+
+
+ version {versionLabel}
+
{showSecondary && (
-
+
{lastUpdated && <>last updated {lastUpdated}>}
- {lastUpdated && commitInfo &&
}
- {commitInfo && <>{commitInfo}>}
+ {canSeeCommit && lastUpdated && commitInfo &&
}
+ {canSeeCommit && commitInfo && {commitInfo}}
)}