mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(premium): info page
This commit is contained in:
parent
78606f4a9f
commit
38dd90d88e
5 changed files with 36 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
19
crates/premium/templates/info.html
Normal file
19
crates/premium/templates/info.html
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue