From f2b39b046c19b08b3e8f2045ed67ae6778d1517f Mon Sep 17 00:00:00 2001
From: Pas <74743263+Pasithea0@users.noreply.github.com>
Date: Tue, 9 Dec 2025 12:04:46 -0700
Subject: [PATCH] Add support bar and donation modal to homepage
Introduces a support bar component on the homepage to display project funding progress and encourage donations. Adds a modal with more information about supporting the project. Updates configuration to allow toggling the support bar and setting funding values. Updates links to the new donation page and adds related translations.
---
public/notifications.xml | 2 +-
src/assets/locales/en.json | 12 ++
src/components/LinksDropdown.tsx | 2 +-
src/components/layout/Footer.tsx | 2 +-
src/components/overlays/SupportInfoModal.tsx | 40 ++++++
src/pages/HomePage.tsx | 3 +
src/pages/parts/home/SupportBar.tsx | 131 +++++++++++++++++++
src/setup/App.tsx | 2 +
src/setup/config.ts | 8 ++
9 files changed, 199 insertions(+), 3 deletions(-)
create mode 100644 src/components/overlays/SupportInfoModal.tsx
create mode 100644 src/pages/parts/home/SupportBar.tsx
diff --git a/public/notifications.xml b/public/notifications.xml
index 8ab9835b..28c9f676 100644
--- a/public/notifications.xml
+++ b/public/notifications.xml
@@ -257,7 +257,7 @@ It will improve uptime for FED API and faster EU streams, another proxy which we
If you are interested in donating, please check the link below!
- https://rentry.co/h5mypdfs
+ https://rentry.co/nnqtas3e
Sat, 06 Sep 2025 14:42:00 MSTannouncement
diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json
index af290b9a..36de4fc0 100644
--- a/src/assets/locales/en.json
+++ b/src/assets/locales/en.json
@@ -392,6 +392,18 @@
"It's the Great Pumpkin, Charlie Brown!"
]
}
+ },
+ "support": {
+ "title": "P-Stream needs your help!",
+ "description": "P-Stream is run at a loss, and we need help to keep it ad free! If you enjoy using P-Stream, please consider donating to help us cover our costs.",
+ "moreInfo": "More info",
+ "explanation": "If you aren't using the extension or don't have FED API set up, it may be harder to find content! We want to fix this, but it's a lot harder to provide content without expensive servers. So please, if you enjoy using P-Stream, please consider donating to help us cover our growing costs.",
+ "explanation2": "If you want more info, please join our ",
+ "discord": "Discord",
+ "thankYou": "Thank you for your support!",
+ "donate": "Donate",
+ "label": "Project Funding: ${{current}} / ${{goal}}",
+ "complete": "complete"
}
},
"media": {
diff --git a/src/components/LinksDropdown.tsx b/src/components/LinksDropdown.tsx
index d4338b4b..50ae38c0 100644
--- a/src/components/LinksDropdown.tsx
+++ b/src/components/LinksDropdown.tsx
@@ -315,7 +315,7 @@ export function LinksDropdown(props: { children: React.ReactNode }) {
/>
diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx
index 458f2294..5eb71c42 100644
--- a/src/components/layout/Footer.tsx
+++ b/src/components/layout/Footer.tsx
@@ -83,7 +83,7 @@ export function Footer() {
{t("footer.links.discord")}
-
+
{t("footer.links.funding")}
diff --git a/src/components/overlays/SupportInfoModal.tsx b/src/components/overlays/SupportInfoModal.tsx
new file mode 100644
index 00000000..573af03c
--- /dev/null
+++ b/src/components/overlays/SupportInfoModal.tsx
@@ -0,0 +1,40 @@
+import { useTranslation } from "react-i18next";
+
+import { FancyModal } from "./Modal";
+import { Button } from "../buttons/Button";
+import { MwLink } from "../text/Link";
+
+export function SupportInfoModal({ id }: { id: string }) {
+ const { t } = useTranslation();
+
+ return (
+
+