Tweak tip/boost toast message

- Split the friendly text (non-essential) to `subMessage`.
- Put a link to the wallet history for all these tipping toasts.
- Don't say "tip" for the Wallet Send action (Issue_1605)
- Make the link font-size smaller than the main text.
This commit is contained in:
infinite-persistence 2022-06-02 15:29:37 +08:00
parent f69097b488
commit d89e04942b
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
4 changed files with 17 additions and 13 deletions

View file

@ -1072,7 +1072,9 @@
"Boost": "Boost",
"Boost transaction successful.": "Boost transaction successful.",
"Boost transaction failed.": "Boost transaction failed.",
"Tip successfully sent. I'm sure they appreciate it!": "Tip successfully sent. I'm sure they appreciate it!",
"Credits successfully sent.": "Credits successfully sent.",
"Tip successfully sent.": "Tip successfully sent.",
"I'm sure they appreciate it!": "I'm sure they appreciate it!",
"Tip transaction failed.": "Tip transaction failed.",
"Add a Card": "Add a Card",
"To Tip Creators": "To Tip Creators",

View file

@ -311,8 +311,10 @@ export function CommentCreate(props: Props) {
}, 1500);
doToast({
message: __("Tip successfully sent. I'm sure they appreciate it!"),
subMessage: `${tipAmount} LBC ⇒ ${tipChannelName}`, // force show decimal places
message: __('Tip successfully sent.'),
subMessage: __("I'm sure they appreciate it!"),
linkText: `${tipAmount} LBC ⇒ ${tipChannelName}`, // force show decimal places
linkTarget: '/wallet',
});
setSuccessTip({ txid, tipAmount });

View file

@ -293,9 +293,8 @@ export function doSendDraftTransaction(address, amount) {
});
dispatch(
doToast({
message: __("Tip successfully sent. I'm sure they appreciate it!"),
subMessage: `${amount} LBC`,
linkText: __('History'),
message: __('Credits successfully sent.'),
linkText: `${amount} LBC`,
linkTarget: '/wallet',
})
);
@ -371,11 +370,9 @@ export function doSendTip(params, isSupport, successCallback, errorCallback, sho
if (shouldNotify) {
dispatch(
doToast({
message: shouldSupport
? __('Boost transaction successful.')
: __("Tip successfully sent. I'm sure they appreciate it!"),
subMessage: `${params.amount} LBC`,
linkText: __('History'),
message: shouldSupport ? __('Boost transaction successful.') : __('Tip successfully sent.'),
subMessage: __("I'm sure they appreciate it!"),
linkText: `${params.amount} LBC`,
linkTarget: '/wallet',
})
);
@ -767,8 +764,10 @@ export const doSendCashTip = (
dispatch(
doToast({
message: __("Tip successfully sent. I'm sure they appreciate it!"),
subMessage: `${fiatSymbol}${tipParams.tipAmount}${tipParams.tipChannelName}`,
message: __('Tip successfully sent.'),
subMessage: __("I'm sure they appreciate it!"),
linkText: `${fiatSymbol}${tipParams.tipAmount}${tipParams.tipChannelName}`,
linkTarget: '/wallet',
})
);

View file

@ -75,6 +75,7 @@
margin-left: auto;
min-width: min-content;
color: var(--color-white);
font-size: var(--font-small);
span:hover {
text-decoration: underline;