mirror of
https://github.com/modrinth/code.git
synced 2026-08-24 16:44:51 +00:00
Impove Intl formatting (#5372)
* Improve Intl formatting * Additional fixes * Fixed formatters were not updated on locale change * Fixed formatNumber was not updated on locale change * Additional formatting and fixes after merge * Run prepr:frontend * Remove `'` in icon map * Run `pnpm install` * fix: lint + import * Additional fixes --------- Co-authored-by: Calum H. <calum@modrinth.com> Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
This commit is contained in:
co-authored by
Calum H.
Calum H.
parent
9b2f0c88cd
commit
f62c60a681
@@ -35,7 +35,7 @@
|
||||
>{{ formatTransactionStatus(transaction.status) }} <BulletDivider
|
||||
/></span>
|
||||
</template>
|
||||
{{ dayjs(transaction.created).format('MMM DD YYYY') }}
|
||||
{{ formatDate(transaction.created) }}
|
||||
<template v-if="transaction.type === 'withdrawal' && transaction.fee">
|
||||
<BulletDivider /> Fee {{ formatMoney(transaction.fee) }}
|
||||
</template>
|
||||
@@ -79,10 +79,11 @@ import {
|
||||
ButtonStyled,
|
||||
getCurrencyIcon,
|
||||
injectNotificationManager,
|
||||
useFormatDateTime,
|
||||
useFormatMoney,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { capitalizeString, formatMoney } from '@modrinth/utils'
|
||||
import dayjs from 'dayjs'
|
||||
import { capitalizeString } from '@modrinth/utils'
|
||||
import { Tooltip } from 'floating-vue'
|
||||
|
||||
import { useGeneratedState } from '~/composables/generated'
|
||||
@@ -188,6 +189,8 @@ function formatTransactionStatus(status: string): string {
|
||||
}
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
const formatMoney = useFormatMoney()
|
||||
const formatDate = useFormatDateTime({ dateStyle: 'medium' })
|
||||
|
||||
function formatMethodName(method: string | undefined, method_id: string | undefined): string {
|
||||
if (!method) return 'Unknown'
|
||||
|
||||
Reference in New Issue
Block a user