1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 10:06:54 +00:00
* Added: Setting to automatically open chat when navigating to an offline channel.
* Added: Support for multi-month gift sub messages.
* Fixed: The FFZ Control Center, when maximized, disappearing beneath chat on channel pages. (Closes #833)
* Fixed: Metadata appearing in theater mode when hovering over the player.
* Fixed: Automatic theater mode enabling theater mode when navigating back to a channel's landing page.
This commit is contained in:
SirStendec 2020-07-02 14:54:46 -04:00
parent 339b6fdfbb
commit b11e4edf2b
10 changed files with 156 additions and 29 deletions

View file

@ -462,9 +462,13 @@ other {# messages were deleted by a moderator.}
} else if ( msg.ffz_type === 'sub_gift' ) {
const plan = msg.sub_plan || {},
months = msg.sub_months || 1,
tier = SUB_TIERS[plan.plan] || 1;
const sub_msg = t.i18n.tList('chat.sub.mystery', '{user} gifted a {plan} Sub to {recipient}! ', {
let sub_msg;
const bits = {
months,
user: (msg.sub_anon || user.username === 'ananonymousgifter') ?
t.i18n.t('chat.sub.anonymous-gifter', 'An anonymous gifter') :
e('span', {
@ -484,7 +488,13 @@ other {# messages were deleted by a moderator.}
}, e('span', {
className: 'tw-c-text-base tw-strong'
}, msg.sub_recipient.displayName))
});
};
if ( months <= 1 )
sub_msg = t.i18n.tList('chat.sub.mystery', '{user} gifted a {plan} Sub to {recipient}! ', bits);
else
sub_msg = t.i18n.tList('chat.sub.gift-months', '{user} gifted {months,number} month{months,en_plural} of {plan} Sub to {recipient}!', bits);
if ( msg.sub_total === 1 )
sub_msg.push(t.i18n.t('chat.sub.gift-first', "It's their first time gifting a Sub in the channel!"));