Compare commits

...

3 commits

Author SHA1 Message Date
alyssa
52ebb7d9d1 fix
Some checks are pending
Build and push Rust service Docker images / rust docker build (push) Waiting to run
rust checks / cargo fmt (push) Waiting to run
2026-01-16 14:22:51 -05:00
alyssa
1fa764c9d4 chore: build premium docker image 2026-01-16 13:04:44 -05:00
alyssa
38dd90d88e feat(premium): info page 2026-01-16 13:03:56 -05:00
7 changed files with 39 additions and 2 deletions

View file

@ -34,6 +34,7 @@ RUN cargo build --bin avatars --release --target x86_64-unknown-linux-musl
RUN cargo build --bin avatar_cleanup --release --target x86_64-unknown-linux-musl
RUN cargo build --bin scheduled_tasks --release --target x86_64-unknown-linux-musl
RUN cargo build --bin gdpr_worker --release --target x86_64-unknown-linux-musl
RUN cargo build --bin premium --release --target x86_64-unknown-linux-musl
FROM alpine:latest
@ -45,3 +46,4 @@ COPY --from=binary-builder /build/target/x86_64-unknown-linux-musl/release/avata
COPY --from=binary-builder /build/target/x86_64-unknown-linux-musl/release/avatar_cleanup /avatar_cleanup
COPY --from=binary-builder /build/target/x86_64-unknown-linux-musl/release/scheduled_tasks /scheduled_tasks
COPY --from=binary-builder /build/target/x86_64-unknown-linux-musl/release/gdpr_worker /gdpr_worker
COPY --from=binary-builder /build/target/x86_64-unknown-linux-musl/release/premium /premium

View file

@ -49,3 +49,4 @@ RUN apk add gcompat
EOF
)"
build gdpr_worker
build premium

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>