From 56ba342346dc1bccadaaaf63bc20765ab0a0a9f0 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:22:49 -0800 Subject: [PATCH 01/39] Initial servers upgrades frontend (#3219) * Initial servers upgrades frontend * Fix error when purchasing non-custom servers * fix backend * Fix comment --------- Signed-off-by: Jai Agrawal <18202329+Geometrically@users.noreply.github.com> Co-authored-by: Jai A Co-authored-by: Jai Agrawal <18202329+Geometrically@users.noreply.github.com> --- .../src/pages/settings/billing/index.vue | 236 ++++++++++++------ apps/labrinth/src/models/v3/billing.rs | 2 +- apps/labrinth/src/routes/internal/billing.rs | 130 ++++++---- packages/ui/src/components/base/CopyCode.vue | 1 + .../src/components/billing/PurchaseModal.vue | 191 ++++++++++---- 5 files changed, 389 insertions(+), 171 deletions(-) diff --git a/apps/frontend/src/pages/settings/billing/index.vue b/apps/frontend/src/pages/settings/billing/index.vue index bfba19d5..912885f3 100644 --- a/apps/frontend/src/pages/settings/billing/index.vue +++ b/apps/frontend/src/pages/settings/billing/index.vue @@ -1,5 +1,5 @@ diff --git a/apps/frontend/src/plugins/dayjs.js b/apps/frontend/src/plugins/dayjs.js index 6a0bf90b..a22b6be2 100644 --- a/apps/frontend/src/plugins/dayjs.js +++ b/apps/frontend/src/plugins/dayjs.js @@ -1,7 +1,11 @@ import dayjs from "dayjs"; import quarterOfYear from "dayjs/plugin/quarterOfYear"; +import advanced from "dayjs/plugin/advancedFormat"; +import relativeTime from "dayjs/plugin/relativeTime"; dayjs.extend(quarterOfYear); +dayjs.extend(advanced); +dayjs.extend(relativeTime); export default defineNuxtPlugin(() => { return { diff --git a/packages/utils/utils.ts b/packages/utils/utils.ts index 42b6b1c3..56f34523 100644 --- a/packages/utils/utils.ts +++ b/packages/utils/utils.ts @@ -87,6 +87,17 @@ export const formatNumber = (number, abbreviate = true) => { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') } +export function formatDate( + date: dayjs.Dayjs, + options: Intl.DateTimeFormatOptions = { + month: 'long', + day: 'numeric', + year: 'numeric', + }, +): string { + return date.toDate().toLocaleDateString(undefined, options) +} + export function formatMoney(number, abbreviate = false) { const x = Number(number) if (x >= 1000000 && abbreviate) { From 6667b620d181c26b72b283bc5b9d8ebb9e96217b Mon Sep 17 00:00:00 2001 From: Prospector Date: Thu, 20 Feb 2025 18:10:41 -0800 Subject: [PATCH 24/39] Update changelog --- packages/utils/changelog.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/utils/changelog.ts b/packages/utils/changelog.ts index 6f5d0c94..122cfee4 100644 --- a/packages/utils/changelog.ts +++ b/packages/utils/changelog.ts @@ -10,6 +10,14 @@ export type VersionEntry = { } const VERSIONS: VersionEntry[] = [ + { + date: `2025-02-20T18:15:00-08:00`, + product: 'web', + body: `### Improvements +- Revenue page has been updated to more clearly display pending revenue and when it will be available to withdraw. (Contributed by [IMB11](https://github.com/modrinth/code/pull/3250)) +- Footer will now be forced to the bottom of the page on short pages. +- Styling fixes to moderation checklist proof form.`, + }, { date: `2025-02-19T22:20:00-08:00`, product: 'web', From 27fba4ba111a6581d867b271cbe305910f32e2ad Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Fri, 21 Feb 2025 02:06:27 -0800 Subject: [PATCH 25/39] Fix padding error on revenue page (#3285) --- apps/frontend/src/pages/dashboard/revenue/index.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/frontend/src/pages/dashboard/revenue/index.vue b/apps/frontend/src/pages/dashboard/revenue/index.vue index 13a2d5ee..53f2d788 100644 --- a/apps/frontend/src/pages/dashboard/revenue/index.vue +++ b/apps/frontend/src/pages/dashboard/revenue/index.vue @@ -223,8 +223,6 @@ strong { } .available-soon { - padding-top: 0; - .label { margin: 0; } From 719b395b7b78bc6afd21bfdbfc13637dec6eff69 Mon Sep 17 00:00:00 2001 From: worldwidepixel <58098422+worldwidepixel@users.noreply.github.com> Date: Fri, 21 Feb 2025 10:41:25 -0800 Subject: [PATCH 26/39] feat(frontend): Sort collections by creation date on user pages and dashboard (#3286) --- .../frontend/src/pages/dashboard/collections.vue | 4 +++- apps/frontend/src/pages/user/[id].vue | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/frontend/src/pages/dashboard/collections.vue b/apps/frontend/src/pages/dashboard/collections.vue index a231062b..11c86c38 100644 --- a/apps/frontend/src/pages/dashboard/collections.vue +++ b/apps/frontend/src/pages/dashboard/collections.vue @@ -49,7 +49,9 @@
-
{{ collection.projects?.length || 0 }} projects
+
+ + {{ + `${$formatNumber(collection.projects?.length || 0, false)} project${(collection.projects?.length || 0) !== 1 ? "s" : ""}` + }} +
diff --git a/apps/app-frontend/src/pages/instance/Mods.vue b/apps/app-frontend/src/pages/instance/Mods.vue index 45ef2372..e49f2d9c 100644 --- a/apps/app-frontend/src/pages/instance/Mods.vue +++ b/apps/app-frontend/src/pages/instance/Mods.vue @@ -179,7 +179,6 @@ diff --git a/apps/frontend/src/pages/admin/billing/[id].vue b/apps/frontend/src/pages/admin/billing/[id].vue index db7f9b41..60ac7681 100644 --- a/apps/frontend/src/pages/admin/billing/[id].vue +++ b/apps/frontend/src/pages/admin/billing/[id].vue @@ -40,12 +40,7 @@ Whether or not the subscription should be unprovisioned on refund. - +
@@ -114,7 +109,7 @@
From a02eb5445b1453fb11aecd6a7eb18488f91ab38d Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Fri, 21 Feb 2025 18:45:55 +0000 Subject: [PATCH 28/39] Update Last Modified in cmp-info (#3287) Signed-off-by: Calum H. --- apps/frontend/src/pages/legal/cmp-info.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/pages/legal/cmp-info.vue b/apps/frontend/src/pages/legal/cmp-info.vue index ef607242..0a10b3be 100644 --- a/apps/frontend/src/pages/legal/cmp-info.vue +++ b/apps/frontend/src/pages/legal/cmp-info.vue @@ -1,7 +1,7 @@