From 38dd90d88ecf49ca6f048a0e2ccb2c214054da6a Mon Sep 17 00:00:00 2001 From: alyssa Date: Fri, 16 Jan 2026 13:03:56 -0500 Subject: [PATCH] feat(premium): info page --- crates/premium/src/auth.rs | 8 ++++++++ crates/premium/src/main.rs | 1 + crates/premium/templates/cancel.html | 5 ++++- crates/premium/templates/index.html | 5 ++++- crates/premium/templates/info.html | 19 +++++++++++++++++++ 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 crates/premium/templates/info.html diff --git a/crates/premium/src/auth.rs b/crates/premium/src/auth.rs index 8f84f32c..d5303b10 100644 --- a/crates/premium/src/auth.rs +++ b/crates/premium/src/auth.rs @@ -171,6 +171,14 @@ pub async fn middleware( }); } } + "/info/" => { + let response = next.run(request).await; + if let Some(ref session) = session { + refresh_session_cookie(session, response) + } else { + response + } + } "/login" => { if let Some(ref session) = session { // no session here because that shows the "you're logged in as" component diff --git a/crates/premium/src/main.rs b/crates/premium/src/main.rs index 98c96c49..fd6604cf 100644 --- a/crates/premium/src/main.rs +++ b/crates/premium/src/main.rs @@ -61,6 +61,7 @@ fn router(ctx: ApiContext) -> Router { // processed upside down (???) so we have to put middleware at the end Router::new() .route("/", get(home_handler)) + .route("/info/", get(|| async { Html(include_str!("../templates/info.html")) })) .route("/login/{token}", get(|| async { "handled in auth middleware" diff --git a/crates/premium/templates/cancel.html b/crates/premium/templates/cancel.html index 222d8bdb..2004ff59 100644 --- a/crates/premium/templates/cancel.html +++ b/crates/premium/templates/cancel.html @@ -25,5 +25,8 @@ {% endif %}

-

for assistance please email us at billing@pluralkit.me

+for assistance please email us at billing@pluralkit.me +
+
pricing/refunds +
home diff --git a/crates/premium/templates/index.html b/crates/premium/templates/index.html index 687707ed..a9263980 100644 --- a/crates/premium/templates/index.html +++ b/crates/premium/templates/index.html @@ -146,5 +146,8 @@ error initializing paddle client {% endif %}

-

for assistance please email us at billing@pluralkit.me

+for assistance please email us at billing@pluralkit.me +
+
pricing/refunds +
home diff --git a/crates/premium/templates/info.html b/crates/premium/templates/info.html new file mode 100644 index 00000000..65188e63 --- /dev/null +++ b/crates/premium/templates/info.html @@ -0,0 +1,19 @@ + + + Billing information - PluralKit Premium + + + +

PluralKit Premium

+

Pricing

+

PluralKit Premium costs $5/mo plus tax applied as per your region.
For any plans longer than 1 month, the equivalent price is applied - for instance, a 3-month plan is $15/3mo plus tax, or a yearly plan is $60/year plus tax.
There is no discount for pre-paying multiple months.

+ +

Refund policy

+

We will process any refund requests at our discretion, or where required by law.

+ +

+for assistance please email us at billing@pluralkit.me +
+
pricing/refunds +
home +