feat(premium): info page

This commit is contained in:
alyssa 2026-01-16 13:03:56 -05:00
parent 3b3e779d44
commit 19348ec7b9
5 changed files with 36 additions and 2 deletions

View file

@ -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

View file

@ -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"

View file

@ -25,5 +25,8 @@
{% endif %}
<br/><br/>
<p>for assistance please email us at <a href="mailto:billing@pluralkit.me">billing@pluralkit.me</a></p>
<span>for assistance please email us at <a href="mailto:billing@pluralkit.me">billing@pluralkit.me</a></span>
<br/>
<br/><a href="/info/">pricing/refunds</a>
<br/><a href="/">home</a>
</body>

View file

@ -146,5 +146,8 @@ error initializing paddle client
{% endif %}
<br/><br/>
<p>for assistance please email us at <a href="mailto:billing@pluralkit.me">billing@pluralkit.me</a></p>
<span>for assistance please email us at <a href="mailto:billing@pluralkit.me">billing@pluralkit.me</a></span>
<br/>
<br/><a href="/info/">pricing/refunds</a>
<br/><a href="/">home</a>
</body>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<head>
<title>Billing information - PluralKit Premium</title>
<link rel="stylesheet" href="/static/stylesheet.css" />
</head>
<body>
<h2>PluralKit Premium</h2>
<h3>Pricing</h3>
<p>PluralKit Premium costs $5/mo plus tax applied as per your region.<br/>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.<br/>There is no discount for pre-paying multiple months.</p>
<h3>Refund policy</h3>
<p>We will process any refund requests at our discretion, or where required by law.</p>
<br/><br/>
<span>for assistance please email us at <a href="mailto:billing@pluralkit.me">billing@pluralkit.me</a></span>
<br/>
<br/><a href="/info/">pricing/refunds</a>
<br/><a href="/">home</a>
</body>