You've already forked AstralRinth
forked from didirus/AstralRinth
Add quick server button, dynamic price preview for custom server modal (#3815)
* Add quick server creation button, and dynamic pricing to custom server selection * Remove test in compatibility card * Lint + remove duplicate file * Adjust z-index of popup * $6 -> $5 * Dismiss prompt if the button is clicked * Make "Create a server" disabled for now * Use existing loaders type
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import type Stripe from 'stripe'
|
||||
import type { Loaders } from '@modrinth/utils'
|
||||
|
||||
export type ServerBillingInterval = 'monthly' | 'yearly' | 'quarterly'
|
||||
|
||||
export const monthsInInterval: Record<ServerBillingInterval, number> = {
|
||||
monthly: 1,
|
||||
quarterly: 3,
|
||||
yearly: 12,
|
||||
}
|
||||
|
||||
export interface ServerPlan {
|
||||
id: string
|
||||
name: string
|
||||
@@ -72,11 +79,18 @@ export type CreatePaymentIntentRequest = PaymentRequestType & {
|
||||
type: 'pyro'
|
||||
server_name?: string
|
||||
server_region?: string
|
||||
source: {
|
||||
loader?: string
|
||||
game_version?: string
|
||||
loader_version?: string
|
||||
}
|
||||
source:
|
||||
| {
|
||||
loader: Loaders
|
||||
game_version?: string
|
||||
loader_version?: string
|
||||
}
|
||||
| {
|
||||
project_id: string
|
||||
version_id?: string
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
| {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user