mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 05:15:54 +00:00
4.20.25
* Changed: Better formatting for link embeds with no image. * Fixed: Date formatting issue in the emote menu. (What do you mean your sub didn't expire 51 years ago?)
This commit is contained in:
parent
bd0c658acb
commit
e73534dd75
3 changed files with 38 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.20.24",
|
"version": "4.20.25",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -655,31 +655,30 @@ export default class EmoteMenu extends Module {
|
||||||
|
|
||||||
let calendar;
|
let calendar;
|
||||||
|
|
||||||
const renews = data.renews && data.renews - new Date,
|
const renews = data.renews && data.renews.getTime(),
|
||||||
ends = data.ends && data.ends - new Date;
|
ends = data.ends && data.ends.getTime();
|
||||||
|
|
||||||
if ( renews > 0 ) {
|
if ( renews > 0 ) {
|
||||||
calendar = {
|
calendar = {
|
||||||
icon: 'calendar',
|
icon: 'calendar',
|
||||||
message: t.i18n.t('emote-menu.sub-renews', 'This sub renews in {seconds,humantime}.', {seconds: renews / 1000})
|
message: t.i18n.t('emote-menu.sub-renews', 'This sub renews in {seconds,humantime}.', {seconds: renews})
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ( ends ) {
|
} else if ( ends ) {
|
||||||
const seconds = ends / 1000;
|
|
||||||
if ( data.prime )
|
if ( data.prime )
|
||||||
calendar = {
|
calendar = {
|
||||||
icon: 'crown',
|
icon: 'crown',
|
||||||
message: t.i18n.t('emote-menu.sub-prime', 'This is your free sub with Twitch Prime.\nIt ends in {seconds,humantime}.', {seconds})
|
message: t.i18n.t('emote-menu.sub-prime', 'This is your free sub with Twitch Prime.\nIt ends in {seconds,humantime}.', {seconds: ends})
|
||||||
}
|
}
|
||||||
else if ( data.gift )
|
else if ( data.gift )
|
||||||
calendar = {
|
calendar = {
|
||||||
icon: 'gift',
|
icon: 'gift',
|
||||||
message: t.i18n.t('emote-menu.sub-gift-ends', 'This gifted sub ends in {seconds,humantime}.', {seconds})
|
message: t.i18n.t('emote-menu.sub-gift-ends', 'This gifted sub ends in {seconds,humantime}.', {seconds: ends})
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
calendar = {
|
calendar = {
|
||||||
icon: 'calendar-empty',
|
icon: 'calendar-empty',
|
||||||
message: t.i18n.t('emote-menu.sub-ends', 'This sub ends in {seconds,humantime}.', {seconds})
|
message: t.i18n.t('emote-menu.sub-ends', 'This sub ends in {seconds,humantime}.', {seconds: ends})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -531,8 +531,22 @@ function header_vue(token, h, ctx) {
|
||||||
right ? null : content
|
right ? null : content
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
} else if ( ! token.compact )
|
||||||
|
content = h('div', {
|
||||||
|
class: 'tw-flex ffz--rich-header'
|
||||||
|
}, [
|
||||||
|
h('div', {class: 'ffz--header-image tw-mg-x-05'}),
|
||||||
|
content
|
||||||
|
]);
|
||||||
|
|
||||||
|
} else if ( ! token.compact )
|
||||||
|
content = h('div', {
|
||||||
|
class: 'tw-flex ffz--rich-header'
|
||||||
|
}, [
|
||||||
|
h('div', {class: 'ffz--header-image tw-mg-x-05'}),
|
||||||
|
content
|
||||||
|
]);
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
@ -603,8 +617,21 @@ function header_normal(token, createElement, ctx) {
|
||||||
className: 'tw-flex ffz--rich-header'
|
className: 'tw-flex ffz--rich-header'
|
||||||
}, [right ? content : null, image, right ? null : content])
|
}, [right ? content : null, image, right ? null : content])
|
||||||
}
|
}
|
||||||
}
|
} else if ( ! token.compact )
|
||||||
}
|
content = createElement('div', {
|
||||||
|
className: 'tw-flex ffz--rich-header'
|
||||||
|
}, [
|
||||||
|
createElement('div', {className: 'ffz--header-image tw-mg-x-05'}),
|
||||||
|
content
|
||||||
|
]);
|
||||||
|
|
||||||
|
} else if ( ! token.compact )
|
||||||
|
content = createElement('div', {
|
||||||
|
className: 'tw-flex ffz--rich-header'
|
||||||
|
}, [
|
||||||
|
createElement('div', {className: 'ffz--header-image tw-mg-x-05'}),
|
||||||
|
content
|
||||||
|
]);
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue