From 0b41672a3cb46766f12c76ad1b51bf9d4f9733e6 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Fri, 9 Oct 2026 08:06:19 -0500 Subject: [PATCH] chore: stop pushing the release- docker tag --- .github/workflows/docker.yml | 2 +- .../database/routes/donation-modal-utils.ts | 12 ---- .../routes/donation-modal-utils.test.ts | 37 ------------ src/ui/user/DonationReminderModal.tsx | 59 ------------------- 4 files changed, 1 insertion(+), 109 deletions(-) delete mode 100644 src/backend/database/routes/donation-modal-utils.ts delete mode 100644 src/backend/tests/database/routes/donation-modal-utils.test.ts delete mode 100644 src/ui/user/DonationReminderModal.tsx diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 72a5d23fd..d486744ce 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -81,7 +81,7 @@ jobs: ALL_TAGS=() if [ "$BUILD_TYPE" = "Production" ]; then - TAGS+=("release-$VERSION" "$VERSION" "latest") + TAGS+=("$VERSION" "latest") elif [ "$BUILD_TYPE" = "Beta" ]; then TAGS+=("beta" "$VERSION") else diff --git a/src/backend/database/routes/donation-modal-utils.ts b/src/backend/database/routes/donation-modal-utils.ts deleted file mode 100644 index f0f85e9d2..000000000 --- a/src/backend/database/routes/donation-modal-utils.ts +++ /dev/null @@ -1,12 +0,0 @@ -const DONATION_MODAL_DELAY_MS = 30 * 24 * 60 * 60 * 1000; - -export function shouldShowDonationModal( - registeredAt: string, - donationModalDismissed: boolean, - now: number = Date.now(), -): boolean { - if (donationModalDismissed) return false; - const registeredAtMs = Date.parse(registeredAt); - if (Number.isNaN(registeredAtMs)) return false; - return now - registeredAtMs >= DONATION_MODAL_DELAY_MS; -} diff --git a/src/backend/tests/database/routes/donation-modal-utils.test.ts b/src/backend/tests/database/routes/donation-modal-utils.test.ts deleted file mode 100644 index 823b9e9ca..000000000 --- a/src/backend/tests/database/routes/donation-modal-utils.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { describe, it, expect } from "vitest"; -import { shouldShowDonationModal } from "../../../database/routes/donation-modal-utils.js"; - -describe("shouldShowDonationModal", () => { - const now = Date.parse("2026-07-17T00:00:00.000Z"); - - it("returns false when the user already dismissed it", () => { - const registeredAt = new Date(now - 60 * 24 * 60 * 60 * 1000).toISOString(); - expect(shouldShowDonationModal(registeredAt, true, now)).toBe(false); - }); - - it("returns false before the 30 day mark", () => { - const registeredAt = new Date(now - 29 * 24 * 60 * 60 * 1000).toISOString(); - expect(shouldShowDonationModal(registeredAt, false, now)).toBe(false); - }); - - it("returns true at exactly 30 days", () => { - const registeredAt = new Date(now - 30 * 24 * 60 * 60 * 1000).toISOString(); - expect(shouldShowDonationModal(registeredAt, false, now)).toBe(true); - }); - - it("returns true well past the 30 day mark", () => { - const registeredAt = new Date( - now - 200 * 24 * 60 * 60 * 1000, - ).toISOString(); - expect(shouldShowDonationModal(registeredAt, false, now)).toBe(true); - }); - - it("returns false for an unparseable registeredAt", () => { - expect(shouldShowDonationModal("not-a-date", false, now)).toBe(false); - }); - - it("treats a backdated registeredAt for pre-existing users as immediately eligible", () => { - const registeredAt = new Date(now - 31 * 24 * 60 * 60 * 1000).toISOString(); - expect(shouldShowDonationModal(registeredAt, false, now)).toBe(true); - }); -}); diff --git a/src/ui/user/DonationReminderModal.tsx b/src/ui/user/DonationReminderModal.tsx deleted file mode 100644 index b6d214688..000000000 --- a/src/ui/user/DonationReminderModal.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import React from "react"; -import { useTranslation } from "react-i18next"; -import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, -} from "@/components/dialog.tsx"; -import { Button } from "@/components/button.tsx"; - -const DONATE_URL = "https://donate.termix.site/donate/"; - -interface DonationReminderModalProps { - open: boolean; - onDismiss: () => void; -} - -export function DonationReminderModal({ - open, - onDismiss, -}: DonationReminderModalProps) { - const { t } = useTranslation(); - - const handleDonate = () => { - window.open(DONATE_URL, "_blank", "noopener,noreferrer"); - onDismiss(); - }; - - return ( - { - if (!next) onDismiss(); - }} - > - - - {t("donation.title")} - {t("donation.body")} - {t("donation.milestones")} - - - - - - - - ); -}