1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-02 16:08:31 +00:00
* Added: Option to only hide side navigation when the page is in portrait mode.
* Added: Option to reveal hidden thumbnails after a short delay.
* Changed: Hidden thumbnails are now blurred by default, rather than replaced with a generic live thumbnail.
* Fixed: Directory features.
* Fixed: Position of theater metadata when in portrait mode.
This commit is contained in:
SirStendec 2020-07-16 16:34:03 -04:00
parent 22fd300b28
commit 0003e6e96d
22 changed files with 272 additions and 547 deletions

View file

@ -189,6 +189,11 @@ export default class Layout extends Module {
this.css_tweaks.setVariable('portrait-extra-width', `${this.settings.get('layout.portrait-extra-width')}rem`);
this.css_tweaks.setVariable('portrait-extra-height', `${this.settings.get('layout.portrait-extra-height')}rem`);
this.on('site.directory:update-cards', () => {
for(const inst of this.SideBarChannels.instances)
this.updateCardClass(inst);
});
this.SideBarChannels.ready((cls, instances) => {
for(const inst of instances)
this.updateCardClass(inst);
@ -250,10 +255,17 @@ export default class Layout extends Module {
updateCardClass(inst) {
const node = this.fine.getChildNode(inst);
if ( node )
if ( node ) {
node.classList.toggle('ffz--side-nav-card-rerun',
inst.props?.tooltipContent?.props?.streamType === 'rerun'
);
node.classList.toggle('ffz--side-nav-card-offline',
inst.props?.offline === true
);
const game = inst.props?.tooltipContent?.props?.gameName || inst.props?.metadataLeft?.props?.activity?.stream?.game?.name || inst.props?.metadataLeft;
node.classList.toggle('tw-hide', this.settings.provider.get('directory.game.blocked-games', []).includes(game));
}
}
updateNavLinks() {