You've already forked AstralRinth
forked from didirus/AstralRinth
refactor: migrate to common eslint+prettier configs (#4168)
* refactor: migrate to common eslint+prettier configs * fix: prettier frontend * feat: config changes * fix: lint issues * fix: lint * fix: type imports * fix: cyclical import issue * fix: lockfile * fix: missing dep * fix: switch to tabs * fix: continue switch to tabs * fix: rustfmt parity * fix: moderation lint issue * fix: lint issues * fix: ui intl * fix: lint issues * Revert "fix: rustfmt parity" This reverts commit cb99d2376c321d813d4b7fc7e2a213bb30a54711. * feat: revert last rs
This commit is contained in:
@@ -1,116 +1,116 @@
|
||||
import type Stripe from 'stripe'
|
||||
import type { Loaders } from '@modrinth/utils'
|
||||
import type Stripe from 'stripe'
|
||||
|
||||
export type ServerBillingInterval = 'monthly' | 'yearly' | 'quarterly'
|
||||
|
||||
export const monthsInInterval: Record<ServerBillingInterval, number> = {
|
||||
monthly: 1,
|
||||
quarterly: 3,
|
||||
yearly: 12,
|
||||
monthly: 1,
|
||||
quarterly: 3,
|
||||
yearly: 12,
|
||||
}
|
||||
|
||||
export interface ServerPlan {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
metadata: {
|
||||
type: string
|
||||
ram?: number
|
||||
cpu?: number
|
||||
storage?: number
|
||||
swap?: number
|
||||
}
|
||||
prices: {
|
||||
id: string
|
||||
currency_code: string
|
||||
prices: {
|
||||
intervals: {
|
||||
monthly: number
|
||||
yearly: number
|
||||
}
|
||||
}
|
||||
}[]
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
metadata: {
|
||||
type: string
|
||||
ram?: number
|
||||
cpu?: number
|
||||
storage?: number
|
||||
swap?: number
|
||||
}
|
||||
prices: {
|
||||
id: string
|
||||
currency_code: string
|
||||
prices: {
|
||||
intervals: {
|
||||
monthly: number
|
||||
yearly: number
|
||||
}
|
||||
}
|
||||
}[]
|
||||
}
|
||||
|
||||
export interface ServerStockRequest {
|
||||
cpu?: number
|
||||
memory_mb?: number
|
||||
swap_mb?: number
|
||||
storage_mb?: number
|
||||
cpu?: number
|
||||
memory_mb?: number
|
||||
swap_mb?: number
|
||||
storage_mb?: number
|
||||
}
|
||||
|
||||
export interface ServerRegion {
|
||||
shortcode: string
|
||||
country_code: string
|
||||
display_name: string
|
||||
lat: number
|
||||
lon: number
|
||||
shortcode: string
|
||||
country_code: string
|
||||
display_name: string
|
||||
lat: number
|
||||
lon: number
|
||||
}
|
||||
|
||||
/*
|
||||
Request types
|
||||
*/
|
||||
export type PaymentMethodRequest = {
|
||||
type: 'payment_method'
|
||||
id: string
|
||||
type: 'payment_method'
|
||||
id: string
|
||||
}
|
||||
|
||||
export type ConfirmationTokenRequest = {
|
||||
type: 'confirmation_token'
|
||||
token: string
|
||||
type: 'confirmation_token'
|
||||
token: string
|
||||
}
|
||||
|
||||
export type PaymentRequestType = PaymentMethodRequest | ConfirmationTokenRequest
|
||||
|
||||
export type ChargeRequestType =
|
||||
| {
|
||||
type: 'existing'
|
||||
id: string
|
||||
}
|
||||
| {
|
||||
type: 'new'
|
||||
product_id: string
|
||||
interval?: ServerBillingInterval
|
||||
}
|
||||
| {
|
||||
type: 'existing'
|
||||
id: string
|
||||
}
|
||||
| {
|
||||
type: 'new'
|
||||
product_id: string
|
||||
interval?: ServerBillingInterval
|
||||
}
|
||||
|
||||
export type CreatePaymentIntentRequest = PaymentRequestType & {
|
||||
charge: ChargeRequestType
|
||||
metadata?: {
|
||||
type: 'pyro'
|
||||
server_name?: string
|
||||
server_region?: 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
|
||||
| {}
|
||||
}
|
||||
charge: ChargeRequestType
|
||||
metadata?: {
|
||||
type: 'pyro'
|
||||
server_name?: string
|
||||
server_region?: 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
|
||||
| {}
|
||||
}
|
||||
}
|
||||
|
||||
export type UpdatePaymentIntentRequest = CreatePaymentIntentRequest & {
|
||||
existing_payment_intent: string
|
||||
existing_payment_intent: string
|
||||
}
|
||||
|
||||
/*
|
||||
Response types
|
||||
*/
|
||||
export type BasePaymentIntentResponse = {
|
||||
price_id: string
|
||||
tax: number
|
||||
total: number
|
||||
payment_method: Stripe.PaymentMethod
|
||||
price_id: string
|
||||
tax: number
|
||||
total: number
|
||||
payment_method: Stripe.PaymentMethod
|
||||
}
|
||||
|
||||
export type UpdatePaymentIntentResponse = BasePaymentIntentResponse
|
||||
|
||||
export type CreatePaymentIntentResponse = BasePaymentIntentResponse & {
|
||||
payment_intent_id: string
|
||||
client_secret: string
|
||||
payment_intent_id: string
|
||||
client_secret: string
|
||||
}
|
||||
|
||||
@@ -1,307 +1,307 @@
|
||||
import { defineMessages } from '@vintl/vintl'
|
||||
|
||||
export const commonMessages = defineMessages({
|
||||
allProjectType: {
|
||||
id: 'project-type.all',
|
||||
defaultMessage: 'All',
|
||||
},
|
||||
cancelButton: {
|
||||
id: 'button.cancel',
|
||||
defaultMessage: 'Cancel',
|
||||
},
|
||||
collectionsLabel: {
|
||||
id: 'label.collections',
|
||||
defaultMessage: 'Collections',
|
||||
},
|
||||
continueButton: {
|
||||
id: 'button.continue',
|
||||
defaultMessage: 'Continue',
|
||||
},
|
||||
nextButton: {
|
||||
id: 'button.next',
|
||||
defaultMessage: 'Next',
|
||||
},
|
||||
backButton: {
|
||||
id: 'button.back',
|
||||
defaultMessage: 'Back',
|
||||
},
|
||||
copyIdButton: {
|
||||
id: 'button.copy-id',
|
||||
defaultMessage: 'Copy ID',
|
||||
},
|
||||
copyPermalinkButton: {
|
||||
id: 'button.copy-permalink',
|
||||
defaultMessage: 'Copy permanent link',
|
||||
},
|
||||
changesSavedLabel: {
|
||||
id: 'label.changes-saved',
|
||||
defaultMessage: 'Changes saved',
|
||||
},
|
||||
createAProjectButton: {
|
||||
id: 'button.create-a-project',
|
||||
defaultMessage: 'Create a project',
|
||||
},
|
||||
createdAgoLabel: {
|
||||
id: 'label.created-ago',
|
||||
defaultMessage: 'Created {ago}',
|
||||
},
|
||||
dashboardLabel: {
|
||||
id: 'label.dashboard',
|
||||
defaultMessage: 'Dashboard',
|
||||
},
|
||||
dateAtTimeTooltip: {
|
||||
id: 'tooltip.date-at-time',
|
||||
defaultMessage: '{date, date, long} at {time, time, short}',
|
||||
},
|
||||
deleteLabel: {
|
||||
id: 'label.delete',
|
||||
defaultMessage: 'Delete',
|
||||
},
|
||||
descriptionLabel: {
|
||||
id: 'label.description',
|
||||
defaultMessage: 'Description',
|
||||
},
|
||||
downloadButton: {
|
||||
id: 'button.download',
|
||||
defaultMessage: 'Download',
|
||||
},
|
||||
downloadingButton: {
|
||||
id: 'button.downloading',
|
||||
defaultMessage: 'Downloading',
|
||||
},
|
||||
editButton: {
|
||||
id: 'button.edit',
|
||||
defaultMessage: 'Edit',
|
||||
},
|
||||
errorLabel: {
|
||||
id: 'label.error',
|
||||
defaultMessage: 'Error',
|
||||
},
|
||||
errorNotificationTitle: {
|
||||
id: 'notification.error.title',
|
||||
defaultMessage: 'An error occurred',
|
||||
},
|
||||
followedProjectsLabel: {
|
||||
id: 'label.followed-projects',
|
||||
defaultMessage: 'Followed projects',
|
||||
},
|
||||
galleryInputView: {
|
||||
id: 'input.view.gallery',
|
||||
defaultMessage: 'Gallery view',
|
||||
},
|
||||
gridInputView: {
|
||||
id: 'input.view.grid',
|
||||
defaultMessage: 'Grid view',
|
||||
},
|
||||
listInputView: {
|
||||
id: 'input.view.list',
|
||||
defaultMessage: 'Rows view',
|
||||
},
|
||||
loadingLabel: {
|
||||
id: 'label.loading',
|
||||
defaultMessage: 'Loading...',
|
||||
},
|
||||
moderationLabel: {
|
||||
id: 'label.moderation',
|
||||
defaultMessage: 'Moderation',
|
||||
},
|
||||
notificationsLabel: {
|
||||
id: 'label.notifications',
|
||||
defaultMessage: 'Notifications',
|
||||
},
|
||||
playButton: {
|
||||
id: 'button.play',
|
||||
defaultMessage: 'Play',
|
||||
},
|
||||
playedLabel: {
|
||||
id: 'label.played',
|
||||
defaultMessage: 'Played {time}',
|
||||
},
|
||||
privateLabel: {
|
||||
id: 'collection.label.private',
|
||||
defaultMessage: 'Private',
|
||||
},
|
||||
publicLabel: {
|
||||
id: 'label.public',
|
||||
defaultMessage: 'Public',
|
||||
},
|
||||
refreshButton: {
|
||||
id: 'button.refresh',
|
||||
defaultMessage: 'Refresh',
|
||||
},
|
||||
rejectedLabel: {
|
||||
id: 'label.rejected',
|
||||
defaultMessage: 'Rejected',
|
||||
},
|
||||
removeButton: {
|
||||
id: 'button.remove',
|
||||
defaultMessage: 'Remove',
|
||||
},
|
||||
reportButton: {
|
||||
id: 'button.report',
|
||||
defaultMessage: 'Report',
|
||||
},
|
||||
openFolderButton: {
|
||||
id: 'button.open-folder',
|
||||
defaultMessage: 'Open folder',
|
||||
},
|
||||
passwordLabel: {
|
||||
id: 'label.password',
|
||||
defaultMessage: 'Password',
|
||||
},
|
||||
saveButton: {
|
||||
id: 'button.save',
|
||||
defaultMessage: 'Save',
|
||||
},
|
||||
saveChangesButton: {
|
||||
id: 'button.save-changes',
|
||||
defaultMessage: 'Save changes',
|
||||
},
|
||||
scopesLabel: {
|
||||
id: 'label.scopes',
|
||||
defaultMessage: 'Scopes',
|
||||
},
|
||||
serverLabel: {
|
||||
id: 'label.server',
|
||||
defaultMessage: 'Server',
|
||||
},
|
||||
serversLabel: {
|
||||
id: 'label.servers',
|
||||
defaultMessage: 'Servers',
|
||||
},
|
||||
settingsLabel: {
|
||||
id: 'label.settings',
|
||||
defaultMessage: 'Settings',
|
||||
},
|
||||
signInButton: {
|
||||
id: 'button.sign-in',
|
||||
defaultMessage: 'Sign in',
|
||||
},
|
||||
signOutButton: {
|
||||
id: 'button.sign-out',
|
||||
defaultMessage: 'Sign out',
|
||||
},
|
||||
singleplayerLabel: {
|
||||
id: 'label.singleplayer',
|
||||
defaultMessage: 'Singleplayer',
|
||||
},
|
||||
stopButton: {
|
||||
id: 'button.stop',
|
||||
defaultMessage: 'Stop',
|
||||
},
|
||||
titleLabel: {
|
||||
id: 'label.title',
|
||||
defaultMessage: 'Title',
|
||||
},
|
||||
unlistedLabel: {
|
||||
id: 'label.unlisted',
|
||||
defaultMessage: 'Unlisted',
|
||||
},
|
||||
uploadImageButton: {
|
||||
id: 'button.upload-image',
|
||||
defaultMessage: 'Upload image',
|
||||
},
|
||||
removeImageButton: {
|
||||
id: 'button.remove-image',
|
||||
defaultMessage: 'Remove image',
|
||||
},
|
||||
visibilityLabel: {
|
||||
id: 'label.visibility',
|
||||
defaultMessage: 'Visibility',
|
||||
},
|
||||
visitYourProfile: {
|
||||
id: 'label.visit-your-profile',
|
||||
defaultMessage: 'Visit your profile',
|
||||
},
|
||||
paymentMethodCardDisplay: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_card_display',
|
||||
defaultMessage: '{card_brand} ending in {last_four}',
|
||||
},
|
||||
allProjectType: {
|
||||
id: 'project-type.all',
|
||||
defaultMessage: 'All',
|
||||
},
|
||||
cancelButton: {
|
||||
id: 'button.cancel',
|
||||
defaultMessage: 'Cancel',
|
||||
},
|
||||
collectionsLabel: {
|
||||
id: 'label.collections',
|
||||
defaultMessage: 'Collections',
|
||||
},
|
||||
continueButton: {
|
||||
id: 'button.continue',
|
||||
defaultMessage: 'Continue',
|
||||
},
|
||||
nextButton: {
|
||||
id: 'button.next',
|
||||
defaultMessage: 'Next',
|
||||
},
|
||||
backButton: {
|
||||
id: 'button.back',
|
||||
defaultMessage: 'Back',
|
||||
},
|
||||
copyIdButton: {
|
||||
id: 'button.copy-id',
|
||||
defaultMessage: 'Copy ID',
|
||||
},
|
||||
copyPermalinkButton: {
|
||||
id: 'button.copy-permalink',
|
||||
defaultMessage: 'Copy permanent link',
|
||||
},
|
||||
changesSavedLabel: {
|
||||
id: 'label.changes-saved',
|
||||
defaultMessage: 'Changes saved',
|
||||
},
|
||||
createAProjectButton: {
|
||||
id: 'button.create-a-project',
|
||||
defaultMessage: 'Create a project',
|
||||
},
|
||||
createdAgoLabel: {
|
||||
id: 'label.created-ago',
|
||||
defaultMessage: 'Created {ago}',
|
||||
},
|
||||
dashboardLabel: {
|
||||
id: 'label.dashboard',
|
||||
defaultMessage: 'Dashboard',
|
||||
},
|
||||
dateAtTimeTooltip: {
|
||||
id: 'tooltip.date-at-time',
|
||||
defaultMessage: '{date, date, long} at {time, time, short}',
|
||||
},
|
||||
deleteLabel: {
|
||||
id: 'label.delete',
|
||||
defaultMessage: 'Delete',
|
||||
},
|
||||
descriptionLabel: {
|
||||
id: 'label.description',
|
||||
defaultMessage: 'Description',
|
||||
},
|
||||
downloadButton: {
|
||||
id: 'button.download',
|
||||
defaultMessage: 'Download',
|
||||
},
|
||||
downloadingButton: {
|
||||
id: 'button.downloading',
|
||||
defaultMessage: 'Downloading',
|
||||
},
|
||||
editButton: {
|
||||
id: 'button.edit',
|
||||
defaultMessage: 'Edit',
|
||||
},
|
||||
errorLabel: {
|
||||
id: 'label.error',
|
||||
defaultMessage: 'Error',
|
||||
},
|
||||
errorNotificationTitle: {
|
||||
id: 'notification.error.title',
|
||||
defaultMessage: 'An error occurred',
|
||||
},
|
||||
followedProjectsLabel: {
|
||||
id: 'label.followed-projects',
|
||||
defaultMessage: 'Followed projects',
|
||||
},
|
||||
galleryInputView: {
|
||||
id: 'input.view.gallery',
|
||||
defaultMessage: 'Gallery view',
|
||||
},
|
||||
gridInputView: {
|
||||
id: 'input.view.grid',
|
||||
defaultMessage: 'Grid view',
|
||||
},
|
||||
listInputView: {
|
||||
id: 'input.view.list',
|
||||
defaultMessage: 'Rows view',
|
||||
},
|
||||
loadingLabel: {
|
||||
id: 'label.loading',
|
||||
defaultMessage: 'Loading...',
|
||||
},
|
||||
moderationLabel: {
|
||||
id: 'label.moderation',
|
||||
defaultMessage: 'Moderation',
|
||||
},
|
||||
notificationsLabel: {
|
||||
id: 'label.notifications',
|
||||
defaultMessage: 'Notifications',
|
||||
},
|
||||
playButton: {
|
||||
id: 'button.play',
|
||||
defaultMessage: 'Play',
|
||||
},
|
||||
playedLabel: {
|
||||
id: 'label.played',
|
||||
defaultMessage: 'Played {time}',
|
||||
},
|
||||
privateLabel: {
|
||||
id: 'collection.label.private',
|
||||
defaultMessage: 'Private',
|
||||
},
|
||||
publicLabel: {
|
||||
id: 'label.public',
|
||||
defaultMessage: 'Public',
|
||||
},
|
||||
refreshButton: {
|
||||
id: 'button.refresh',
|
||||
defaultMessage: 'Refresh',
|
||||
},
|
||||
rejectedLabel: {
|
||||
id: 'label.rejected',
|
||||
defaultMessage: 'Rejected',
|
||||
},
|
||||
removeButton: {
|
||||
id: 'button.remove',
|
||||
defaultMessage: 'Remove',
|
||||
},
|
||||
reportButton: {
|
||||
id: 'button.report',
|
||||
defaultMessage: 'Report',
|
||||
},
|
||||
openFolderButton: {
|
||||
id: 'button.open-folder',
|
||||
defaultMessage: 'Open folder',
|
||||
},
|
||||
passwordLabel: {
|
||||
id: 'label.password',
|
||||
defaultMessage: 'Password',
|
||||
},
|
||||
saveButton: {
|
||||
id: 'button.save',
|
||||
defaultMessage: 'Save',
|
||||
},
|
||||
saveChangesButton: {
|
||||
id: 'button.save-changes',
|
||||
defaultMessage: 'Save changes',
|
||||
},
|
||||
scopesLabel: {
|
||||
id: 'label.scopes',
|
||||
defaultMessage: 'Scopes',
|
||||
},
|
||||
serverLabel: {
|
||||
id: 'label.server',
|
||||
defaultMessage: 'Server',
|
||||
},
|
||||
serversLabel: {
|
||||
id: 'label.servers',
|
||||
defaultMessage: 'Servers',
|
||||
},
|
||||
settingsLabel: {
|
||||
id: 'label.settings',
|
||||
defaultMessage: 'Settings',
|
||||
},
|
||||
signInButton: {
|
||||
id: 'button.sign-in',
|
||||
defaultMessage: 'Sign in',
|
||||
},
|
||||
signOutButton: {
|
||||
id: 'button.sign-out',
|
||||
defaultMessage: 'Sign out',
|
||||
},
|
||||
singleplayerLabel: {
|
||||
id: 'label.singleplayer',
|
||||
defaultMessage: 'Singleplayer',
|
||||
},
|
||||
stopButton: {
|
||||
id: 'button.stop',
|
||||
defaultMessage: 'Stop',
|
||||
},
|
||||
titleLabel: {
|
||||
id: 'label.title',
|
||||
defaultMessage: 'Title',
|
||||
},
|
||||
unlistedLabel: {
|
||||
id: 'label.unlisted',
|
||||
defaultMessage: 'Unlisted',
|
||||
},
|
||||
uploadImageButton: {
|
||||
id: 'button.upload-image',
|
||||
defaultMessage: 'Upload image',
|
||||
},
|
||||
removeImageButton: {
|
||||
id: 'button.remove-image',
|
||||
defaultMessage: 'Remove image',
|
||||
},
|
||||
visibilityLabel: {
|
||||
id: 'label.visibility',
|
||||
defaultMessage: 'Visibility',
|
||||
},
|
||||
visitYourProfile: {
|
||||
id: 'label.visit-your-profile',
|
||||
defaultMessage: 'Visit your profile',
|
||||
},
|
||||
paymentMethodCardDisplay: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_card_display',
|
||||
defaultMessage: '{card_brand} ending in {last_four}',
|
||||
},
|
||||
})
|
||||
|
||||
export const commonSettingsMessages = defineMessages({
|
||||
appearance: {
|
||||
id: 'settings.appearance.title',
|
||||
defaultMessage: 'Appearance',
|
||||
},
|
||||
language: {
|
||||
id: 'settings.language.title',
|
||||
defaultMessage: 'Language',
|
||||
},
|
||||
profile: {
|
||||
id: 'settings.profile.title',
|
||||
defaultMessage: 'Public profile',
|
||||
},
|
||||
account: {
|
||||
id: 'settings.account.title',
|
||||
defaultMessage: 'Account and security',
|
||||
},
|
||||
authorizedApps: {
|
||||
id: 'settings.authorized-apps.title',
|
||||
defaultMessage: 'Authorized apps',
|
||||
},
|
||||
sessions: {
|
||||
id: 'settings.sessions.title',
|
||||
defaultMessage: 'Sessions',
|
||||
},
|
||||
pats: {
|
||||
id: 'settings.pats.title',
|
||||
defaultMessage: 'Personal access tokens',
|
||||
},
|
||||
applications: {
|
||||
id: 'settings.applications.title',
|
||||
defaultMessage: 'Your applications',
|
||||
},
|
||||
billing: {
|
||||
id: 'settings.billing.title',
|
||||
defaultMessage: 'Billing and subscriptions',
|
||||
},
|
||||
appearance: {
|
||||
id: 'settings.appearance.title',
|
||||
defaultMessage: 'Appearance',
|
||||
},
|
||||
language: {
|
||||
id: 'settings.language.title',
|
||||
defaultMessage: 'Language',
|
||||
},
|
||||
profile: {
|
||||
id: 'settings.profile.title',
|
||||
defaultMessage: 'Public profile',
|
||||
},
|
||||
account: {
|
||||
id: 'settings.account.title',
|
||||
defaultMessage: 'Account and security',
|
||||
},
|
||||
authorizedApps: {
|
||||
id: 'settings.authorized-apps.title',
|
||||
defaultMessage: 'Authorized apps',
|
||||
},
|
||||
sessions: {
|
||||
id: 'settings.sessions.title',
|
||||
defaultMessage: 'Sessions',
|
||||
},
|
||||
pats: {
|
||||
id: 'settings.pats.title',
|
||||
defaultMessage: 'Personal access tokens',
|
||||
},
|
||||
applications: {
|
||||
id: 'settings.applications.title',
|
||||
defaultMessage: 'Your applications',
|
||||
},
|
||||
billing: {
|
||||
id: 'settings.billing.title',
|
||||
defaultMessage: 'Billing and subscriptions',
|
||||
},
|
||||
})
|
||||
|
||||
export const paymentMethodMessages = defineMessages({
|
||||
visa: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.visa',
|
||||
defaultMessage: 'Visa',
|
||||
},
|
||||
amex: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.amex',
|
||||
defaultMessage: 'American Express',
|
||||
},
|
||||
diners: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.diners',
|
||||
defaultMessage: 'Diners Club',
|
||||
},
|
||||
discover: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.discover',
|
||||
defaultMessage: 'Discover',
|
||||
},
|
||||
eftpos: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.eftpos',
|
||||
defaultMessage: 'EFTPOS',
|
||||
},
|
||||
jcb: { id: 'omorphia.component.purchase_modal.payment_method_type.jcb', defaultMessage: 'JCB' },
|
||||
mastercard: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.mastercard',
|
||||
defaultMessage: 'MasterCard',
|
||||
},
|
||||
unionpay: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.unionpay',
|
||||
defaultMessage: 'UnionPay',
|
||||
},
|
||||
paypal: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.paypal',
|
||||
defaultMessage: 'PayPal',
|
||||
},
|
||||
cashapp: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.cashapp',
|
||||
defaultMessage: 'Cash App',
|
||||
},
|
||||
amazon_pay: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.amazon_pay',
|
||||
defaultMessage: 'Amazon Pay',
|
||||
},
|
||||
unknown: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.unknown',
|
||||
defaultMessage: 'Unknown payment method',
|
||||
},
|
||||
visa: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.visa',
|
||||
defaultMessage: 'Visa',
|
||||
},
|
||||
amex: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.amex',
|
||||
defaultMessage: 'American Express',
|
||||
},
|
||||
diners: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.diners',
|
||||
defaultMessage: 'Diners Club',
|
||||
},
|
||||
discover: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.discover',
|
||||
defaultMessage: 'Discover',
|
||||
},
|
||||
eftpos: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.eftpos',
|
||||
defaultMessage: 'EFTPOS',
|
||||
},
|
||||
jcb: { id: 'omorphia.component.purchase_modal.payment_method_type.jcb', defaultMessage: 'JCB' },
|
||||
mastercard: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.mastercard',
|
||||
defaultMessage: 'MasterCard',
|
||||
},
|
||||
unionpay: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.unionpay',
|
||||
defaultMessage: 'UnionPay',
|
||||
},
|
||||
paypal: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.paypal',
|
||||
defaultMessage: 'PayPal',
|
||||
},
|
||||
cashapp: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.cashapp',
|
||||
defaultMessage: 'Cash App',
|
||||
},
|
||||
amazon_pay: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.amazon_pay',
|
||||
defaultMessage: 'Amazon Pay',
|
||||
},
|
||||
unknown: {
|
||||
id: 'omorphia.component.purchase_modal.payment_method_type.unknown',
|
||||
defaultMessage: 'Unknown payment method',
|
||||
},
|
||||
})
|
||||
|
||||
@@ -2,39 +2,39 @@ import { BlocksIcon, CompassIcon, EyeIcon, PickaxeIcon, UnknownIcon } from '@mod
|
||||
import { defineMessage } from '@vintl/vintl'
|
||||
|
||||
export const GAME_MODES = {
|
||||
survival: {
|
||||
icon: PickaxeIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.survival',
|
||||
defaultMessage: 'Survival mode',
|
||||
}),
|
||||
},
|
||||
creative: {
|
||||
icon: BlocksIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.creative',
|
||||
defaultMessage: 'Creative mode',
|
||||
}),
|
||||
},
|
||||
adventure: {
|
||||
icon: CompassIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.adventure',
|
||||
defaultMessage: 'Adventure mode',
|
||||
}),
|
||||
},
|
||||
spectator: {
|
||||
icon: EyeIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.spectator',
|
||||
defaultMessage: 'Spectator mode',
|
||||
}),
|
||||
},
|
||||
unknown: {
|
||||
icon: UnknownIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.unknown',
|
||||
defaultMessage: 'Unknown game mode',
|
||||
}),
|
||||
},
|
||||
survival: {
|
||||
icon: PickaxeIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.survival',
|
||||
defaultMessage: 'Survival mode',
|
||||
}),
|
||||
},
|
||||
creative: {
|
||||
icon: BlocksIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.creative',
|
||||
defaultMessage: 'Creative mode',
|
||||
}),
|
||||
},
|
||||
adventure: {
|
||||
icon: CompassIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.adventure',
|
||||
defaultMessage: 'Adventure mode',
|
||||
}),
|
||||
},
|
||||
spectator: {
|
||||
icon: EyeIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.spectator',
|
||||
defaultMessage: 'Spectator mode',
|
||||
}),
|
||||
},
|
||||
unknown: {
|
||||
icon: UnknownIcon,
|
||||
message: defineMessage({
|
||||
id: 'instance.worlds.game_mode.unknown',
|
||||
defaultMessage: 'Unknown game mode',
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
import { defineMessage, type MessageDescriptor } from '@vintl/vintl'
|
||||
|
||||
export const NOTICE_LEVELS: Record<
|
||||
string,
|
||||
{ name: MessageDescriptor; colors: { text: string; bg: string } }
|
||||
string,
|
||||
{ name: MessageDescriptor; colors: { text: string; bg: string } }
|
||||
> = {
|
||||
info: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.info.name',
|
||||
defaultMessage: 'Info',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-blue)',
|
||||
bg: 'var(--color-blue-bg)',
|
||||
},
|
||||
},
|
||||
warn: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.warn.name',
|
||||
defaultMessage: 'Warning',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-orange)',
|
||||
bg: 'var(--color-orange-bg)',
|
||||
},
|
||||
},
|
||||
critical: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.critical.name',
|
||||
defaultMessage: 'Critical',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-red)',
|
||||
bg: 'var(--color-red-bg)',
|
||||
},
|
||||
},
|
||||
survey: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.survey.name',
|
||||
defaultMessage: 'Survey',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-purple)',
|
||||
bg: 'var(--color-purple-bg)',
|
||||
},
|
||||
},
|
||||
info: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.info.name',
|
||||
defaultMessage: 'Info',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-blue)',
|
||||
bg: 'var(--color-blue-bg)',
|
||||
},
|
||||
},
|
||||
warn: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.warn.name',
|
||||
defaultMessage: 'Warning',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-orange)',
|
||||
bg: 'var(--color-orange-bg)',
|
||||
},
|
||||
},
|
||||
critical: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.critical.name',
|
||||
defaultMessage: 'Critical',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-red)',
|
||||
bg: 'var(--color-red-bg)',
|
||||
},
|
||||
},
|
||||
survey: {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.level.survey.name',
|
||||
defaultMessage: 'Survey',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-purple)',
|
||||
bg: 'var(--color-purple-bg)',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export const DISMISSABLE = {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.dismissable',
|
||||
defaultMessage: 'Dismissable',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-green)',
|
||||
bg: 'var(--color-green-bg)',
|
||||
},
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.dismissable',
|
||||
defaultMessage: 'Dismissable',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-green)',
|
||||
bg: 'var(--color-green-bg)',
|
||||
},
|
||||
}
|
||||
|
||||
export const UNDISMISSABLE = {
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.undismissable',
|
||||
defaultMessage: 'Undismissable',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-red)',
|
||||
bg: 'var(--color-red-bg)',
|
||||
},
|
||||
name: defineMessage({
|
||||
id: 'servers.notice.undismissable',
|
||||
defaultMessage: 'Undismissable',
|
||||
}),
|
||||
colors: {
|
||||
text: 'var(--color-red)',
|
||||
bg: 'var(--color-red-bg)',
|
||||
},
|
||||
}
|
||||
|
||||
export function getDismissableMetadata(dismissable: boolean) {
|
||||
return dismissable ? DISMISSABLE : UNDISMISSABLE
|
||||
return dismissable ? DISMISSABLE : UNDISMISSABLE
|
||||
}
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
import { defineMessage, type MessageDescriptor } from '@vintl/vintl'
|
||||
|
||||
export const regionOverrides = {
|
||||
'us-vin': {
|
||||
name: defineMessage({ id: 'servers.region.north-america', defaultMessage: 'North America' }),
|
||||
flag: 'https://flagcdn.com/us.svg',
|
||||
},
|
||||
'eu-lim': {
|
||||
name: defineMessage({ id: 'servers.region.central-europe', defaultMessage: 'Central Europe' }),
|
||||
flag: 'https://flagcdn.com/de.svg',
|
||||
},
|
||||
'eu-cov': {
|
||||
name: defineMessage({ id: 'servers.region.western-europe', defaultMessage: 'Western Europe' }),
|
||||
flag: 'https://flagcdn.com/gb.svg',
|
||||
},
|
||||
'us-vin': {
|
||||
name: defineMessage({
|
||||
id: 'servers.region.north-america',
|
||||
defaultMessage: 'North America',
|
||||
}),
|
||||
flag: 'https://flagcdn.com/us.svg',
|
||||
},
|
||||
'eu-lim': {
|
||||
name: defineMessage({
|
||||
id: 'servers.region.central-europe',
|
||||
defaultMessage: 'Central Europe',
|
||||
}),
|
||||
flag: 'https://flagcdn.com/de.svg',
|
||||
},
|
||||
'eu-cov': {
|
||||
name: defineMessage({
|
||||
id: 'servers.region.western-europe',
|
||||
defaultMessage: 'Western Europe',
|
||||
}),
|
||||
flag: 'https://flagcdn.com/gb.svg',
|
||||
},
|
||||
} satisfies Record<string, { name?: MessageDescriptor; flag?: string }>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user