1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00
* 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:
SirStendec 2020-08-06 01:32:55 -04:00
parent bd0c658acb
commit e73534dd75
3 changed files with 38 additions and 12 deletions

View file

@ -1,7 +1,7 @@
{
"name": "frankerfacez",
"author": "Dan Salvato LLC",
"version": "4.20.24",
"version": "4.20.25",
"description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0",
"scripts": {

View file

@ -655,31 +655,30 @@ export default class EmoteMenu extends Module {
let calendar;
const renews = data.renews && data.renews - new Date,
ends = data.ends && data.ends - new Date;
const renews = data.renews && data.renews.getTime(),
ends = data.ends && data.ends.getTime();
if ( renews > 0 ) {
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 ) {
const seconds = ends / 1000;
if ( data.prime )
calendar = {
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 )
calendar = {
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
calendar = {
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})
}
}

View file

@ -531,8 +531,22 @@ function header_vue(token, h, ctx) {
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;
}
@ -603,8 +617,21 @@ function header_normal(token, createElement, ctx) {
className: 'tw-flex ffz--rich-header'
}, [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;