kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Update translated text and use Goose to update small things in wallet
rodzic
0957c5b92e
commit
21fc7c8ed9
|
@ -100,7 +100,7 @@ const messages = defineMessages({
|
|||
profileExternal: { id: 'account.profile_external', defaultMessage: 'View profile on {domain}' },
|
||||
header: { id: 'account.header.alt', defaultMessage: 'Profile header' },
|
||||
subscribeFeed: { id: 'account.rss_feed', defaultMessage: 'Subscribe to RSS feed' },
|
||||
method: { id: 'payment_method.send_to', defaultMessage: 'Send {method} to {target}' },
|
||||
method: { id: 'payment_method.send_to', defaultMessage: 'Send sats via {method} to {target}' },
|
||||
});
|
||||
|
||||
interface IHeader {
|
||||
|
|
|
@ -89,7 +89,7 @@ const ZapsModal: React.FC<IZapsModal> = ({ onClose, statusId }) => {
|
|||
return (
|
||||
<div key={index}>
|
||||
<Text weight='bold'>
|
||||
{account.type === 'zap' ? shortNumberFormat(account.amount / 1000) : shortNumberFormat(account.amount)}
|
||||
{account.type === 'lightning' ? shortNumberFormat(account.amount / 1000) : shortNumberFormat(account.amount)}
|
||||
</Text>
|
||||
<AccountContainer id={account.id} note={account.comment} emoji='⚡' />
|
||||
</div>
|
||||
|
|
|
@ -47,54 +47,91 @@ const CreateWallet = () => {
|
|||
}
|
||||
|
||||
return (
|
||||
<Stack className='rounded-lg border p-6' space={4}>
|
||||
<Stack
|
||||
className='rounded-lg border border-gray-200 p-8
|
||||
dark:border-gray-700'
|
||||
space={4}
|
||||
>
|
||||
<Stack space={3} justifyContent='center' alignItems='center'>
|
||||
{!formActive
|
||||
?
|
||||
(
|
||||
<>
|
||||
<Text theme='default' size='2xl'>
|
||||
{intl.formatMessage(messages.title)}
|
||||
{!formActive ? (
|
||||
<>
|
||||
<div className='mb-2 flex size-16 items-center justify-center rounded-full bg-primary-100 dark:bg-primary-800'>
|
||||
<Icon
|
||||
className='size-8 text-primary-500 dark:text-primary-400'
|
||||
src={plusIcon}
|
||||
/>
|
||||
</div>
|
||||
<Text
|
||||
theme='default'
|
||||
size='2xl'
|
||||
weight='bold'
|
||||
align='center'
|
||||
className='mb-1 text-gray-900 dark:text-gray-100'
|
||||
>
|
||||
{intl.formatMessage(messages.title)}
|
||||
</Text>
|
||||
<HStack space={3} className='mt-2'>
|
||||
<Text
|
||||
theme='default'
|
||||
size='lg'
|
||||
align='center'
|
||||
className='text-gray-800 dark:text-gray-200'
|
||||
>
|
||||
{intl.formatMessage(messages.question)}
|
||||
</Text>
|
||||
<HStack space={2}>
|
||||
<Text theme='default' size='lg'>
|
||||
{intl.formatMessage(messages.question)}
|
||||
</Text>
|
||||
<Button icon={plusIcon} theme='primary' text={intl.formatMessage(messages.button)} onClick={() => setFormActive(!formActive)} />
|
||||
</HStack>
|
||||
</>
|
||||
)
|
||||
:
|
||||
(
|
||||
<Stack space={4} className='w-full'>
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Stack>
|
||||
<HStack alignItems='center' space={1}>
|
||||
<Text>
|
||||
{intl.formatMessage(messages.mints)}
|
||||
</Text>
|
||||
<Tooltip text={'Mint: A kind of digital bank that issues tokens backed by Bitcoin, like “Bitcoin gift cards” with built-in privacy.'}>
|
||||
<div>
|
||||
<Icon src={helpIcon} />
|
||||
</div>
|
||||
</Tooltip>
|
||||
</HStack>
|
||||
<Button
|
||||
theme='primary'
|
||||
text={intl.formatMessage(messages.button)}
|
||||
onClick={() => setFormActive(!formActive)}
|
||||
className='px-6 font-medium'
|
||||
/>
|
||||
</HStack>
|
||||
</>
|
||||
) : (
|
||||
<Stack space={5} className='w-full'>
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Stack className='rounded-lg p-4'>
|
||||
<HStack alignItems='center' space={2}>
|
||||
<Text
|
||||
size='lg'
|
||||
weight='medium'
|
||||
className='text-gray-900 dark:text-gray-100'
|
||||
>
|
||||
{intl.formatMessage(messages.mints)}
|
||||
</Text>
|
||||
<Tooltip text={'Mint: A kind of digital bank that issues tokens backed by Bitcoin, like \'Bitcoin gift cards\' with built-in privacy.'}>
|
||||
<div className='text-gray-500 transition-colors hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200'>
|
||||
<Icon src={helpIcon} />
|
||||
</div>
|
||||
</Tooltip>
|
||||
</HStack>
|
||||
<div>
|
||||
<MintEditor items={mints} setItems={setMints} />
|
||||
</Stack>
|
||||
</div>
|
||||
</Stack>
|
||||
|
||||
<FormActions>
|
||||
<Button to='/wallet' onClick={()=> setFormActive(false)} theme='tertiary'>
|
||||
<FormattedMessage id='common.cancel' defaultMessage='Cancel' />
|
||||
</Button>
|
||||
<FormActions>
|
||||
<Button
|
||||
to='/wallet'
|
||||
onClick={() => setFormActive(false)}
|
||||
theme='tertiary'
|
||||
className='px-6 text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800'
|
||||
>
|
||||
<FormattedMessage id='common.cancel' defaultMessage='Cancel' />
|
||||
</Button>
|
||||
|
||||
<Button theme={isLoading ? 'secondary' : 'primary'} type='submit' disabled={isLoading}>
|
||||
<FormattedMessage id='common.save' defaultMessage='Save' />
|
||||
</Button>
|
||||
</FormActions>
|
||||
</Form>
|
||||
</Stack>
|
||||
)
|
||||
}
|
||||
<Button
|
||||
theme={isLoading ? 'secondary' : 'primary'}
|
||||
type='submit'
|
||||
disabled={isLoading}
|
||||
className='px-6 font-medium'
|
||||
>
|
||||
<FormattedMessage id='common.save' defaultMessage='Save' />
|
||||
</Button>
|
||||
</FormActions>
|
||||
</Form>
|
||||
</Stack>
|
||||
)}
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
|
|
|
@ -26,7 +26,7 @@ const messages = defineMessages({
|
|||
});
|
||||
|
||||
const paymentMethods = {
|
||||
zap: 'zap',
|
||||
lightning: 'lightning',
|
||||
cashu: 'cashu',
|
||||
};
|
||||
|
||||
|
@ -45,13 +45,15 @@ const Wallet = () => {
|
|||
return (
|
||||
<>
|
||||
{isLoading ?
|
||||
<Stack className='h-screen justify-center'>
|
||||
<Spinner size={40} withText={false} />
|
||||
<Stack className='h-screen items-center justify-center'>
|
||||
<div className='rounded-lg border border-gray-200 p-10 dark:border-gray-700'>
|
||||
<Spinner size={50} withText={false} />
|
||||
</div>
|
||||
</Stack>
|
||||
:
|
||||
(
|
||||
<Column label={intl.formatMessage(messages.wallet)} transparent withHeader={false} slim>
|
||||
<Card className='space-y-4'>
|
||||
<Card className='space-y-4 overflow-hidden'>
|
||||
<CardHeader>
|
||||
<CardTitle title={intl.formatMessage(messages.wallet)} />
|
||||
</CardHeader>
|
||||
|
@ -59,7 +61,11 @@ const Wallet = () => {
|
|||
{walletData ? (
|
||||
<>
|
||||
<CardBody>
|
||||
<Stack className='rounded-lg border p-6 black:border-gray-500 dark:border-gray-500' alignItems='center' space={4}>
|
||||
<Stack
|
||||
className='rounded-lg border border-gray-200 p-8 dark:border-gray-700'
|
||||
alignItems='center'
|
||||
space={4}
|
||||
>
|
||||
<Balance />
|
||||
</Stack>
|
||||
</CardBody>
|
||||
|
@ -70,8 +76,13 @@ const Wallet = () => {
|
|||
|
||||
<CardBody>
|
||||
<Transactions limit={4} />
|
||||
{hasTransactions && <div className='flex w-full justify-center'>
|
||||
<Button icon={moreIcon} theme='primary' to='/wallet/transactions'>
|
||||
{hasTransactions && <div className='mt-4 flex w-full justify-center'>
|
||||
<Button
|
||||
icon={moreIcon}
|
||||
theme='primary'
|
||||
to='/wallet/transactions'
|
||||
className='px-6 font-medium'
|
||||
>
|
||||
{intl.formatMessage(messages.more)}
|
||||
</Button>
|
||||
</div>}
|
||||
|
@ -91,7 +102,7 @@ const Wallet = () => {
|
|||
items={paymentMethods}
|
||||
defaultValue={method}
|
||||
onChange={(event: React.ChangeEvent<HTMLSelectElement>) => {
|
||||
changeMethod((event.target.value as 'cashu' | 'zap'));
|
||||
changeMethod((event.target.value as 'cashu' | 'lightning'));
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
|
|
|
@ -128,8 +128,8 @@ const PayRequestForm = ({ account, status, onClose }: IPayRequestForm) => {
|
|||
<Text weight='semibold'>
|
||||
<FormattedMessage
|
||||
id='payment_method.send_to'
|
||||
defaultMessage='Send {method} to {target}'
|
||||
values={{ target: emojifyText(account.display_name, account.emojis), method: amount > 1 ? `${paymentMethod}s` : paymentMethod }}
|
||||
defaultMessage='Send sats via {method} to {target}'
|
||||
values={{ target: emojifyText(account.display_name, account.emojis), method: paymentMethod }}
|
||||
/>
|
||||
</Text>
|
||||
<Avatar src={account.avatar} size={50} />
|
||||
|
|
|
@ -4,14 +4,14 @@ import { create } from 'zustand';
|
|||
enableMapSet();
|
||||
|
||||
interface IPaymentMethod {
|
||||
method: 'cashu' | 'zap';
|
||||
changeMethod: (method: 'cashu' | 'zap') => void;
|
||||
method: 'cashu' | 'lightning';
|
||||
changeMethod: (method: 'cashu' | 'lightning') => void;
|
||||
}
|
||||
|
||||
export const usePaymentMethod = create<IPaymentMethod>(
|
||||
(set) => ({
|
||||
method: localStorage.getItem('soapbox:payment_method') as 'cashu' | 'zap' || 'cashu',
|
||||
changeMethod: (method: 'cashu' | 'zap') => {
|
||||
method: localStorage.getItem('soapbox:payment_method') as 'cashu' | 'lightning' || 'cashu',
|
||||
changeMethod: (method: 'cashu' | 'lightning') => {
|
||||
localStorage.setItem('soapbox:payment_method', method);
|
||||
set({ method });
|
||||
},
|
||||
|
|
|
@ -1523,5 +1523,5 @@
|
|||
"payment_method.comment_input.placeholder": "تعليق إختياري",
|
||||
"zap.open_wallet": "فتح المحفظة",
|
||||
"zap.send_to": "أرسل zaps إلى {target}",
|
||||
"payment_method.send_to": "أرسل {method} إلى {target}"
|
||||
"payment_method.send_to": "أرسل sats عبر {method} إلى {target}"
|
||||
}
|
||||
|
|
|
@ -1297,7 +1297,7 @@
|
|||
"patron.title": "Funding Goal",
|
||||
"payment_method.button.text.raw": "Zap {amount} sats",
|
||||
"payment_method.comment_input.placeholder": "Optional comment",
|
||||
"payment_method.send_to": "Send {method} to {target}",
|
||||
"payment_method.send_to": "Send sats via {method} to {target}",
|
||||
"payment_method.split_message.deducted": "{amountDeducted} sats will deducted*",
|
||||
"pinned_accounts.title": "{name}’s choices",
|
||||
"pinned_statuses.none": "No pins to show.",
|
||||
|
|
|
@ -1630,5 +1630,5 @@
|
|||
"payment_method.comment_input.placeholder": "Comentario opcional",
|
||||
"zap.open_wallet": "Abrir Wallet",
|
||||
"zap.send_to": "Enviar zaps a {target}",
|
||||
"payment_method.send_to": "Enviar {method} a {target}"
|
||||
"payment_method.send_to": "Enviar sats a través de {method} a {target}"
|
||||
}
|
||||
|
|
|
@ -1686,7 +1686,7 @@
|
|||
"zap.next": "Ar Aghaidh",
|
||||
"zap.open_wallet": "Oscail Sparán",
|
||||
"zap.send_to": "Seol zaps chuig {target}",
|
||||
"payment_method.send_to": "Seol {method} chuig {target}",
|
||||
"payment_method.send_to": "Seol sats trí {method} chuig {target}",
|
||||
"payment_method.split_message.deducted": "Asbhainfear {amountDeducted} sats*",
|
||||
"zap.split_message.receiver": "Gheobhaidh {receiver} {amountReceiver} sats*",
|
||||
"zap_split.question": "Cén fáth a bhfuil mé ag íoc seo?",
|
||||
|
|
|
@ -1639,7 +1639,7 @@
|
|||
"payment_method.comment_input.placeholder": "Comentário opcional",
|
||||
"zap.open_wallet": "Abrir Carteira",
|
||||
"zap.send_to": "Enviar zaps para {target}",
|
||||
"payment_method.send_to": "Enviar {method} para {target}",
|
||||
"payment_method.send_to": "Enviar sats via {method} para {target}",
|
||||
"payment_method.split_message.deducted": "{amountDeducted} sats serão deduzidos*",
|
||||
"zap.split_message.receiver": "{receiver} receberá {amountReceiver} sats*",
|
||||
"zap_split.question": "Por que estou pagando isso?",
|
||||
|
|
|
@ -1618,6 +1618,6 @@
|
|||
"who_to_follow.title": "Quem Seguir",
|
||||
"payment_method.comment_input.placeholder": "Comentário opcional",
|
||||
"zap.open_wallet": "Abrir Carteira",
|
||||
"payment_method.send_to": "Enviar {method} para {target}",
|
||||
"payment_method.send_to": "Enviar sats através de {method} para {target}",
|
||||
"zap.send_to": "Enviar zaps para {target}"
|
||||
}
|
||||
|
|
|
@ -1623,6 +1623,6 @@
|
|||
"payment_method.button.text.raw": "打闪 {amount} 聪",
|
||||
"payment_method.comment_input.placeholder": "可选评论",
|
||||
"zap.open_wallet": "打开钱包",
|
||||
"payment_method.send_to": "发送打闪给 {target}",
|
||||
"payment_method.send_to": "通过 {method} 发送 sats 到 {target}",
|
||||
"zap.send_to": "发送打闪给 {target}"
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue