Medal promo v2 (#4220)

* Revert "Revert "feat: medal promotion on servers page (#4117)""

This reverts commit 2e6cff7efc.

* Revert "Revert "update changelog""

This reverts commit b2ff2d8737.

* Revert "Revert "turn off medal promo""

This reverts commit eaa4b44a16.

* Revert "Revert "Revert "turn off medal promo"""

This reverts commit 76d0ef03e7.

* Revert "Revert "fix medal thing showing up for everyone""

This reverts commit ee8c47adcb.

* New medal colors

* Update medal server listings

* Upgrade modal enhancements & more medal consistency

* undo app promo changes

* Only apply medal promo with flag on

* remove unneessary files

* lint

* disable medal flag
This commit is contained in:
Prospector
2025-08-19 10:39:09 -07:00
committed by GitHub
parent 07703e49ef
commit d3459e4b12
37 changed files with 2077 additions and 347 deletions

View File

@@ -10,6 +10,12 @@ export type VersionEntry = {
}
const VERSIONS: VersionEntry[] = [
{
date: `2025-08-18T11:25:00-07:00`,
product: 'web',
body: `### Improvements
- Added Modrinth Servers free trial promotion in partnership with Medal.`,
},
{
date: `2025-08-18T09:10:00-07:00`,
product: 'servers',

View File

@@ -52,6 +52,9 @@ export interface Server {
flows: {
intro?: boolean
}
is_medal?: boolean
medal_expires?: string
}
export interface Servers {

View File

@@ -37,6 +37,7 @@ export interface ServerGeneral {
flows?: {
intro?: boolean
}
is_medal?: boolean
}
export interface Allocation {

View File

@@ -513,6 +513,38 @@ export interface ModerationJudgements {
[sha1: string]: ModerationJudgement
}
// Subscriptions
export interface UserSubscription {
id: string
user_id: string
price_id: string
interval: 'five-days' | 'monthly' | 'quarterly' | 'yearly'
status: 'provisioned' | 'unprovisioned'
created: string // ISO date string
metadata?: SubscriptionMetadata
}
export interface Charge {
id: string
user_id: string
price_id: string
amount: number
currency_code: string
status: 'open' | 'processing' | 'succeeded' | 'failed' | 'cancelled' | 'expiring'
due: string // ISO date string
last_attempt?: string // ISO date string
type: 'one-time' | 'subscription' | 'proration' | 'refund'
subscription_id?: string
subscription_interval?: 'five-days' | 'monthly' | 'quarterly' | 'yearly'
platform: 'stripe' | 'none'
parent_charge_id?: string
net?: number
}
export type SubscriptionMetadata =
| { type: 'pyro'; id: string; region?: string }
| { type: 'medal'; id: string }
// Delphi
export interface DelphiReport {
id: string