diff --git a/apps/frontend/src/assets/images/badges/alpha-tester.svg b/apps/frontend/src/assets/images/badges/alpha-tester.svg
new file mode 100644
index 000000000..487b25eb7
--- /dev/null
+++ b/apps/frontend/src/assets/images/badges/alpha-tester.svg
@@ -0,0 +1,12 @@
+
diff --git a/apps/frontend/src/assets/images/badges/beta-tester.svg b/apps/frontend/src/assets/images/badges/beta-tester.svg
new file mode 100644
index 000000000..63d0c4003
--- /dev/null
+++ b/apps/frontend/src/assets/images/badges/beta-tester.svg
@@ -0,0 +1,12 @@
+
diff --git a/apps/frontend/src/pages/user/[id].vue b/apps/frontend/src/pages/user/[id].vue
index 7761503b3..2a7564d58 100644
--- a/apps/frontend/src/pages/user/[id].vue
+++ b/apps/frontend/src/pages/user/[id].vue
@@ -240,6 +240,8 @@
+
+
@@ -272,6 +274,8 @@ import ModBadge from "~/assets/images/badges/mod.svg?component";
import PlusBadge from "~/assets/images/badges/plus.svg?component";
import TenMClubBadge from "~/assets/images/badges/10m-club.svg?component";
import EarlyAdopterBadge from "~/assets/images/badges/early-adopter.svg?component";
+import AlphaTesterBadge from "~/assets/images/badges/alpha-tester.svg?component";
+import BetaTesterBadge from "~/assets/images/badges/beta-tester.svg?component";
import ReportIcon from "~/assets/images/utils/report.svg?component";
import UpToDate from "~/assets/images/illustrations/up_to_date.svg?component";
@@ -463,6 +467,10 @@ const sumDownloads = computed(() => {
return sum;
});
+const joinDate = computed(() => new Date(user.value.created));
+const MODRINTH_BETA_END_DATE = new Date("2022-02-27T08:00:00.000Z");
+const MODRINTH_ALPHA_END_DATE = new Date("2020-11-30T08:00:00.000Z");
+
const badges = computed(() => {
const badges = [];
@@ -490,8 +498,10 @@ const badges = computed(() => {
badges.push("early-adopter");
}
- if (isPermission(user.value.badges, 1 << 4)) {
+ if (isPermission(user.value.badges, 1 << 4) || joinDate.value < MODRINTH_ALPHA_END_DATE) {
badges.push("alpha-tester");
+ } else if (isPermission(user.value.badges, 1 << 4) || joinDate.value < MODRINTH_BETA_END_DATE) {
+ badges.push("beta-tester");
}
if (isPermission(user.value.badges, 1 << 5)) {