From 7f5e9319a819058ede1d27db3fc06862e5055362 Mon Sep 17 00:00:00 2001 From: broisnischal Date: Sat, 21 Nov 2026 09:00:26 +0545 Subject: [PATCH] Donate goes to the pay-what-you-want checkout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /donate/checkout redirects to the Dodo checkout (one constant, LINKS.donateCheckout) - The app's Settings › About › Donate, the site footer and the landing link use it - /donate page (opened by copies ≤ 0.19.10): 'Donate any amount' leads, license second - Website source link points at apps/web in this repo --- apps/macos/Sources/EWizKit/EWizLinks.swift | 5 +-- .../src/components/landing/landing-data.ts | 8 ++++- .../src/components/landing/landing-page.tsx | 6 ++-- apps/web/src/components/site/site-shell.tsx | 2 +- apps/web/src/routeTree.gen.ts | 21 ++++++++++++ apps/web/src/routes/donate.tsx | 32 +++++++++++++++---- apps/web/src/routes/donate_.checkout.ts | 20 ++++++++++++ 7 files changed, 80 insertions(+), 14 deletions(-) create mode 100644 apps/web/src/routes/donate_.checkout.ts diff --git a/apps/macos/Sources/EWizKit/EWizLinks.swift b/apps/macos/Sources/EWizKit/EWizLinks.swift index d0fc754..669e0e9 100644 --- a/apps/macos/Sources/EWizKit/EWizLinks.swift +++ b/apps/macos/Sources/EWizKit/EWizLinks.swift @@ -16,8 +16,9 @@ public enum EWizLinks { /// one. The license window and the "isn't linked to a Mac" error send people here. public static let license = URL(string: "https://ewiz.app/license")! - /// Settings › About › Donate. - public static let donate = URL(string: "https://ewiz.app/donate")! + /// Settings › About › Donate: the website redirects this to the pay-what-you-want + /// checkout, so the checkout link can change without an app release. + public static let donate = URL(string: "https://ewiz.app/donate/checkout")! /// Where Contact Support and the license window's help link write to. public static let supportEmail = "hello@ewiz.app" diff --git a/apps/web/src/components/landing/landing-data.ts b/apps/web/src/components/landing/landing-data.ts index 8b627e6..cb8da8f 100644 --- a/apps/web/src/components/landing/landing-data.ts +++ b/apps/web/src/components/landing/landing-data.ts @@ -1,9 +1,15 @@ export const LINKS = { github: "https://github.com/stroke-app/ewiz", /** This website's source. */ - siteSource: "https://github.com/stroke-app/ewiz-releases", + siteSource: "https://github.com/stroke-app/ewiz/tree/main/apps/web", releases: "https://github.com/stroke-app/ewiz/releases", feedback: "https://github.com/stroke-app/ewiz/issues", + /** + * Pay-what-you-want donation checkout (Dodo). Every Donate button goes through + * /donate/checkout, which redirects here, so the target can change without an + * app release. + */ + donateCheckout: "https://checkout.dodopayments.com/session/cks_0NsOth7ruTtl42VyOoxxM", x: "https://x.com/broisnischal", stroke: "https://stroke.click", site: "https://nischal-dahal.com.np", diff --git a/apps/web/src/components/landing/landing-page.tsx b/apps/web/src/components/landing/landing-page.tsx index bf9f31d..2b0cfff 100644 --- a/apps/web/src/components/landing/landing-page.tsx +++ b/apps/web/src/components/landing/landing-page.tsx @@ -724,12 +724,12 @@ function ClosingCta() {

Already using it and want to help?{" "} - Donate - +

diff --git a/apps/web/src/components/site/site-shell.tsx b/apps/web/src/components/site/site-shell.tsx index d7e2e5e..55c17ee 100644 --- a/apps/web/src/components/site/site-shell.tsx +++ b/apps/web/src/components/site/site-shell.tsx @@ -93,7 +93,7 @@ const FOOTER_COLUMNS: Array<{ title: string; links: FooterLink[] }> = [ { label: "Download", to: "/download" }, { label: "Changelog", to: "/changelog" }, { label: "Blog", to: "/blog" }, - { label: "Donate", to: "/donate" }, + { label: "Donate", href: "/donate/checkout" }, ], }, { diff --git a/apps/web/src/routeTree.gen.ts b/apps/web/src/routeTree.gen.ts index 46005d7..d269c7f 100644 --- a/apps/web/src/routeTree.gen.ts +++ b/apps/web/src/routeTree.gen.ts @@ -32,6 +32,7 @@ import { Route as BlogIndexRouteImport } from './routes/blog/index' import { Route as LegalTermsRouteImport } from './routes/legal/terms' import { Route as LegalPrivacyRouteImport } from './routes/legal/privacy' import { Route as LegalLicenseRouteImport } from './routes/legal/license' +import { Route as DonateCheckoutRouteImport } from './routes/donate_.checkout' import { Route as BlogSlugRouteImport } from './routes/blog/$slug' import { Route as GuestLoginRouteImport } from './routes/_guest/login' import { Route as AuthAppRouteRouteImport } from './routes/_auth/app/route' @@ -151,6 +152,11 @@ const LegalLicenseRoute = LegalLicenseRouteImport.update({ path: '/license', getParentRoute: () => LegalRouteRoute, } as any) +const DonateCheckoutRoute = DonateCheckoutRouteImport.update({ + id: '/donate_/checkout', + path: '/donate/checkout', + getParentRoute: () => rootRouteImport, +} as any) const BlogSlugRoute = BlogSlugRouteImport.update({ id: '/$slug', path: '/$slug', @@ -198,6 +204,7 @@ export interface FileRoutesByFullPath { '/app': typeof AuthAppRouteRouteWithChildren '/login': typeof GuestLoginRoute '/blog/$slug': typeof BlogSlugRoute + '/donate/checkout': typeof DonateCheckoutRoute '/legal/license': typeof LegalLicenseRoute '/legal/privacy': typeof LegalPrivacyRoute '/legal/terms': typeof LegalTermsRoute @@ -224,6 +231,7 @@ export interface FileRoutesByTo { '/terms': typeof TermsRoute '/login': typeof GuestLoginRoute '/blog/$slug': typeof BlogSlugRoute + '/donate/checkout': typeof DonateCheckoutRoute '/legal/license': typeof LegalLicenseRoute '/legal/privacy': typeof LegalPrivacyRoute '/legal/terms': typeof LegalTermsRoute @@ -255,6 +263,7 @@ export interface FileRoutesById { '/_auth/app': typeof AuthAppRouteRouteWithChildren '/_guest/login': typeof GuestLoginRoute '/blog/$slug': typeof BlogSlugRoute + '/donate_/checkout': typeof DonateCheckoutRoute '/legal/license': typeof LegalLicenseRoute '/legal/privacy': typeof LegalPrivacyRoute '/legal/terms': typeof LegalTermsRoute @@ -285,6 +294,7 @@ export interface FileRouteTypes { | '/app' | '/login' | '/blog/$slug' + | '/donate/checkout' | '/legal/license' | '/legal/privacy' | '/legal/terms' @@ -311,6 +321,7 @@ export interface FileRouteTypes { | '/terms' | '/login' | '/blog/$slug' + | '/donate/checkout' | '/legal/license' | '/legal/privacy' | '/legal/terms' @@ -341,6 +352,7 @@ export interface FileRouteTypes { | '/_auth/app' | '/_guest/login' | '/blog/$slug' + | '/donate_/checkout' | '/legal/license' | '/legal/privacy' | '/legal/terms' @@ -369,6 +381,7 @@ export interface RootRouteChildren { RobotsDottxtRoute: typeof RobotsDottxtRoute SitemapDotxmlRoute: typeof SitemapDotxmlRoute TermsRoute: typeof TermsRoute + DonateCheckoutRoute: typeof DonateCheckoutRoute ApiAuthSplatRoute: typeof ApiAuthSplatRoute } @@ -535,6 +548,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LegalLicenseRouteImport parentRoute: typeof LegalRouteRoute } + '/donate_/checkout': { + id: '/donate_/checkout' + path: '/donate/checkout' + fullPath: '/donate/checkout' + preLoaderRoute: typeof DonateCheckoutRouteImport + parentRoute: typeof rootRouteImport + } '/blog/$slug': { id: '/blog/$slug' path: '/$slug' @@ -659,6 +679,7 @@ const rootRouteChildren: RootRouteChildren = { RobotsDottxtRoute: RobotsDottxtRoute, SitemapDotxmlRoute: SitemapDotxmlRoute, TermsRoute: TermsRoute, + DonateCheckoutRoute: DonateCheckoutRoute, ApiAuthSplatRoute: ApiAuthSplatRoute, } export const routeTree = rootRouteImport diff --git a/apps/web/src/routes/donate.tsx b/apps/web/src/routes/donate.tsx index 3d70794..1258808 100644 --- a/apps/web/src/routes/donate.tsx +++ b/apps/web/src/routes/donate.tsx @@ -8,12 +8,14 @@ import { Container, SitePage } from "#/components/site/site-shell"; import { Button } from "#/components/ui/button"; import { seo } from "#/lib/seo"; -// Settings › About › Donate in the app opens this page. +// Copies of the app up to 0.19.10 open this page from Settings › About › Donate; +// newer ones go straight to /donate/checkout. export const Route = createFileRoute("/donate")({ head: () => ({ ...seo({ title: "Support eWiz", - description: "Buying a license, starring the repo or reporting a bug keeps eWiz going.", + description: + "Donate any amount, buy a license, star the repo or report a bug to keep eWiz going.", path: "/donate", }), }), @@ -44,12 +46,28 @@ function DonatePage() {

Support eWiz

- The best way to support eWiz is a license: it's a one-time {PRICE}, and it keeps - updates coming for everyone. + eWiz is made by one person. Donate whatever it's worth to you, or buy a license for{" "} + {PRICE} once. Either keeps updates coming for everyone.

- +
+ + +
{ways.map((w) => ( + new Response(null, { + status: 302, + headers: { location: LINKS.donateCheckout, "cache-control": "no-store" }, + }), + }, + }, +});