mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-11 00:20:54 +00:00
4.20.6
* Added: Settings for replacing the native Twitch viewer count with a custom display that doesn't animate when changing. (Closes #841) * Fixed: Replace rendering for the Chat Paused footer so that we can render the correct text and disable mouse interaction when appropriate. * Fixed: Hiding Recommended Channels causing the Online Friends section of the side navigation bar to disappear. (Closes #482)
This commit is contained in:
parent
0532357eae
commit
bc1ca88a1e
17 changed files with 140 additions and 25 deletions
|
@ -73,6 +73,46 @@ export default class Metadata extends Module {
|
|||
changed: () => this.updateMetadata('uptime')
|
||||
});
|
||||
|
||||
this.settings.add('metadata.viewers', {
|
||||
default: false,
|
||||
|
||||
ui: {
|
||||
path: 'Channel > Metadata >> Player',
|
||||
title: 'Alternative Viewer Count',
|
||||
description: "This displays the current channel's viewer count without an animation when it changes.",
|
||||
|
||||
component: 'setting-check-box'
|
||||
},
|
||||
|
||||
changed: () => this.updateMetadata('viewers')
|
||||
});
|
||||
|
||||
|
||||
this.definitions.viewers = {
|
||||
|
||||
refresh() { return this.settings.get('metadata.viewers') },
|
||||
|
||||
setup(data) {
|
||||
return data.getViewerCount();
|
||||
},
|
||||
|
||||
order: 1,
|
||||
icon: 'ffz-i-viewers',
|
||||
|
||||
label(data) {
|
||||
if ( ! this.settings.get('metadata.viewers') )
|
||||
return null;
|
||||
|
||||
return this.i18n.formatNumber(data)
|
||||
},
|
||||
|
||||
tooltip() {
|
||||
return this.i18n.t('metadata.viewers', 'Viewer Count');
|
||||
},
|
||||
|
||||
color: 'var(--color-text-live)'
|
||||
};
|
||||
|
||||
|
||||
this.definitions.uptime = {
|
||||
inherit: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue