{{ t('setting.terms.warn-invalid', 'This highlight term is invalid.') }}
-
+
{{ t('setting.terms.warn-complex', 'This highlight term is potentially too complex. It may cause client lag.') }}
@@ -56,7 +56,7 @@
-
+
-
+
diff --git a/src/sites/twitch-twilight/modules/channel_bar.jsx b/src/sites/twitch-twilight/modules/channel_bar.jsx
index f2cd6d42..f520be61 100644
--- a/src/sites/twitch-twilight/modules/channel_bar.jsx
+++ b/src/sites/twitch-twilight/modules/channel_bar.jsx
@@ -5,9 +5,9 @@
// ============================================================================
import Module from 'utilities/module';
-import {get, deep_copy} from 'utilities/object';
+import {get} from 'utilities/object';
-import CHANNEL_QUERY from './channel_header_query.gql';
+//import CHANNEL_QUERY from './channel_header_query.gql';
export default class ChannelBar extends Module {
@@ -25,14 +25,14 @@ export default class ChannelBar extends Module {
this.inject('metadata');
this.inject('socket');
- this.apollo.registerModifier('ChannelPage_ChannelHeader', CHANNEL_QUERY);
+ /*this.apollo.registerModifier('ChannelPage_ChannelHeader', CHANNEL_QUERY);
this.apollo.registerModifier('ChannelPage_ChannelHeader', data => {
const u = data && data.data && data.data.user;
if ( u ) {
const o = u.profileViewCount = new Number(u.profileViewCount || 0);
o.data = deep_copy(u);
}
- }, false);
+ }, false);*/
this.settings.add('channel.metadata.force-above', {
diff --git a/src/sites/twitch-twilight/modules/css_tweaks/index.js b/src/sites/twitch-twilight/modules/css_tweaks/index.js
index 22f73ac5..29ba9fe2 100644
--- a/src/sites/twitch-twilight/modules/css_tweaks/index.js
+++ b/src/sites/twitch-twilight/modules/css_tweaks/index.js
@@ -11,7 +11,7 @@ import {has} from 'utilities/object';
const STYLE_VALIDATOR = document.createElement('span');
const CLASSES = {
- 'top-discover': '.top-nav__nav-link[data-a-target="discover-link"]',
+ 'top-discover': '.navigation-link[data-a-target="discover-link"]',
'side-nav': '.side-nav',
'side-rec-channels': '.side-nav .recommended-channels,.side-nav .ffz--popular-channels',
'side-rec-friends': '.side-nav .recommended-friends',
@@ -31,7 +31,7 @@ const CLASSES = {
'pinned-cheer': '.pinned-cheer,.pinned-cheer-v2,.channel-leaderboard',
'whispers': 'body .whispers',
- 'dir-live-ind': '.live-channel-card:not([data-a-target*="host"]) .stream-type-indicator.stream-type-indicator--live,.stream-thumbnail__card .stream-type-indicator.stream-type-indicator--live,.preview-card .stream-type-indicator.stream-type-indicator--live,.preview-card .preview-card-stat.preview-card-stat--live',
+ 'dir-live-ind': '.preview-card[data-ffz-type="live"] .tw-channel-status-text-indicator,.live-channel-card:not([data-a-target*="host"]) .stream-type-indicator.stream-type-indicator--live,.stream-thumbnail__card .stream-type-indicator.stream-type-indicator--live,.preview-card .stream-type-indicator.stream-type-indicator--live,.preview-card .preview-card-stat.preview-card-stat--live',
'profile-hover': '.preview-card .tw-relative:hover .ffz-channel-avatar',
'not-live-bar': 'div[data-test-selector="non-live-video-banner-layout"]',
'channel-live-ind': '.channel-header__user .tw-channel-status-text-indicator'
@@ -228,7 +228,7 @@ export default class CSSTweaks extends Module {
ui: {
path: 'Appearance > Theme >> Fonts',
title: 'Font Family',
- description: 'Override the font used for the entire Twitch website.',
+ description: 'Override the font used for the entire Twitch website. The old default font was: `"Helvetica Neue",Helvetica,Arial,sans-serif`',
component: 'setting-text-box'
},
changed: () => this.updateFont()
diff --git a/src/sites/twitch-twilight/modules/css_tweaks/styles/square-avatars.scss b/src/sites/twitch-twilight/modules/css_tweaks/styles/square-avatars.scss
index 82ebd30b..02d1fec1 100644
--- a/src/sites/twitch-twilight/modules/css_tweaks/styles/square-avatars.scss
+++ b/src/sites/twitch-twilight/modules/css_tweaks/styles/square-avatars.scss
@@ -1,8 +1,7 @@
-.player-streaminfo__picture img[src],
-.side-nav-card__avatar.tw-border-radius-rounded,
-.tw-avatar .tw-border-radius-rounded {
- .tw-root--theme-dark &,
- & {
- border-radius: 0 !important;
- }
+.tw-avatar {
+ --border-radius-rounded: 0 !important;
+}
+
+.bits-leaderboard-medal .tw-avatar {
+ --border-radius-rounded: 9000px !important;
}
\ No newline at end of file
diff --git a/src/sites/twitch-twilight/modules/css_tweaks/styles/swap-sidebars.scss b/src/sites/twitch-twilight/modules/css_tweaks/styles/swap-sidebars.scss
index f0513476..e4e8321a 100644
--- a/src/sites/twitch-twilight/modules/css_tweaks/styles/swap-sidebars.scss
+++ b/src/sites/twitch-twilight/modules/css_tweaks/styles/swap-sidebars.scss
@@ -72,7 +72,7 @@
right: 0;
}
-body .whispers--theatre-mode.whispers--right-column-expanded {
+body .whispers--theatre-mode.whispers--right-column-expanded-beside {
left: var(--ffz-chat-width) !important;
right: 0 !important;
}
diff --git a/src/sites/twitch-twilight/modules/directory/following.jsx b/src/sites/twitch-twilight/modules/directory/following.jsx
index 86832efe..1fc3af6d 100644
--- a/src/sites/twitch-twilight/modules/directory/following.jsx
+++ b/src/sites/twitch-twilight/modules/directory/following.jsx
@@ -11,12 +11,12 @@ import {get} from 'utilities/object';
import Popper from 'popper.js';
import {makeReference} from 'utilities/tooltip';
-import FOLLOWED_INDEX from './followed_index.gql';
+/*import FOLLOWED_INDEX from './followed_index.gql';
import FOLLOWED_HOSTS from './followed_hosts.gql';
import FOLLOWED_CHANNELS from './followed_channels.gql';
import FOLLOWED_LIVE from './followed_live.gql';
import SUBSCRIBED_CHANNELS from './sidenav_subscribed.gql';
-import RECOMMENDED_CHANNELS from './recommended_channels.gql';
+import RECOMMENDED_CHANNELS from './recommended_channels.gql';*/
export default class Following extends SiteModule {
constructor(...args) {
@@ -66,7 +66,7 @@ export default class Following extends SiteModule {
changed: () => this.parent.DirectoryCard.forceUpdate()
});
- this.apollo.registerModifier('FollowedChannels_RENAME2', FOLLOWED_CHANNELS);
+ /*this.apollo.registerModifier('FollowedChannels_RENAME2', FOLLOWED_CHANNELS);
this.apollo.registerModifier('SideNav_SubscribedChannels', SUBSCRIBED_CHANNELS);
this.apollo.registerModifier('RecommendedChannels', RECOMMENDED_CHANNELS);
@@ -97,7 +97,7 @@ export default class Following extends SiteModule {
shelf.node.content.edges = this.parent.processNodes(edges);
}
- }, false);
+ }, false);*/
this.hosts = new WeakMap;
}
@@ -185,7 +185,7 @@ export default class Following extends SiteModule {
'data.currentUser.recommendations.liveRecommendations.nodes.0.createdAt'
);*/
- if ( this.router.current_name !== 'dir-following' )
+ /*if ( this.router.current_name !== 'dir-following' )
return;
const bit = this.router.match[1];
@@ -204,11 +204,11 @@ export default class Following extends SiteModule {
'data.currentUser.followedLiveUsers.nodes.0.stream.createdAt'
);*/
- else if ( bit === 'hosts' )
+ /*else if ( bit === 'hosts' )
this.apollo.ensureQuery(
'FollowingHosts_CurrentUser',
'data.currentUser.followedHosts.nodes.0.hosting.stream.createdAt'
- );
+ );*/
}
onEnable() {
diff --git a/src/sites/twitch-twilight/modules/directory/game.jsx b/src/sites/twitch-twilight/modules/directory/game.jsx
index 4cd07555..4ac99a8a 100644
--- a/src/sites/twitch-twilight/modules/directory/game.jsx
+++ b/src/sites/twitch-twilight/modules/directory/game.jsx
@@ -8,7 +8,7 @@ import {SiteModule} from 'utilities/module';
import {createElement} from 'utilities/dom';
import { get } from 'utilities/object';
-import GAME_QUERY from './game.gql';
+//import GAME_QUERY from './game.gql';
export default class Game extends SiteModule {
constructor(...args) {
@@ -27,16 +27,16 @@ export default class Game extends SiteModule {
['dir-game-index', 'dir-community', 'dir-game-videos', 'dir-game-clips', 'dir-game-details']
);
- this.apollo.registerModifier('DirectoryPage_Game', GAME_QUERY);
+ /*this.apollo.registerModifier('DirectoryPage_Game', GAME_QUERY);
this.apollo.registerModifier('DirectoryPage_Game', res => {
/*setTimeout(() =>
this.apollo.ensureQuery(
'DirectoryPage_Game',
'data.game.streams.edges.0.node.createdAt'
- ), 500);*/
+ ), 500);* /
this.modifyStreams(res);
- }, false);
+ }, false);*/
}
modifyStreams(res) { // eslint-disable-line class-methods-use-this
diff --git a/src/sites/twitch-twilight/modules/directory/index.jsx b/src/sites/twitch-twilight/modules/directory/index.jsx
index bcc81462..ebe1a009 100644
--- a/src/sites/twitch-twilight/modules/directory/index.jsx
+++ b/src/sites/twitch-twilight/modules/directory/index.jsx
@@ -11,7 +11,7 @@ import {get} from 'utilities/object';
import Following from './following';
import Game from './game';
-import BrowsePopular from './browse_popular';
+//import BrowsePopular from './browse_popular';
export const CARD_CONTEXTS = ((e ={}) => {
@@ -45,7 +45,7 @@ export default class Directory extends SiteModule {
this.inject(Following);
this.inject(Game);
- this.inject(BrowsePopular);
+ //this.inject(BrowsePopular);
this.DirectoryCard = this.fine.define(
'directory-card',
@@ -336,6 +336,7 @@ export default class Directory extends SiteModule {
game = props.gameTitle || props.playerMetadataGame || (props.trackingProps && props.trackingProps.categoryName);
container.classList.toggle('ffz-hide-thumbnail', this.settings.provider.get('directory.game.hidden-thumbnails', []).includes(game));
+ container.dataset.ffzType = props.streamType;
const should_hide = (props.streamType === 'rerun' && this.settings.get('directory.hide-vodcasts')) ||
(props.context !== CARD_CONTEXTS.SingleGameList && this.settings.provider.get('directory.game.blocked-games', []).includes(game));
@@ -447,7 +448,7 @@ export default class Directory extends SiteModule {
inst.ffz_uptime_el = card.querySelector('.ffz-uptime-element');
if ( ! inst.ffz_uptime_el )
card.appendChild(inst.ffz_uptime_el = (
-
+
diff --git a/src/sites/twitch-twilight/modules/theme/index.js b/src/sites/twitch-twilight/modules/theme/index.js
index 1a425d73..552519dd 100644
--- a/src/sites/twitch-twilight/modules/theme/index.js
+++ b/src/sites/twitch-twilight/modules/theme/index.js
@@ -20,11 +20,14 @@ export default class ThemeEngine extends Module {
this.inject('settings');
this.inject('site');
+ this.inject('site.fine');
this.inject('site.css_tweaks');
this.inject('site.router');
this.should_enable = true;
+ // Font
+
// Colors
this.settings.add('theme.color.background', {
@@ -32,7 +35,9 @@ export default class ThemeEngine extends Module {
ui: {
path: 'Appearance > Theme >> Colors @{"description": "This is a quick preview of a new system coming soon to FrankerFaceZ. Expect heavy changes here, including separate Basic and Advanced modes, and better color selection."}',
title: 'Background',
- component: 'setting-color-box'
+ description: 'Try `#0E0C13` for something close to the old dark theme, or `#0E0E0E` for a nice dark gray. Transparent colors not allowed.',
+ component: 'setting-color-box',
+ alpha: false
},
changed: () => this.updateCSS()
});
@@ -42,6 +47,7 @@ export default class ThemeEngine extends Module {
ui: {
path: 'Appearance > Theme >> Colors',
title: 'Text',
+ description: 'If not set, this will automatically be set to white or black based on the brightness of the background.',
component: 'setting-color-box'
},
changed: () => this.updateCSS()
@@ -55,13 +61,12 @@ export default class ThemeEngine extends Module {
},
ui: {
- path: 'Appearance @{"description": "Personalize the appearance of Twitch. Change the color scheme and fonts and tune the layout to optimize your experience."} > Theme >> General',
+ path: 'Appearance @{"description": "Personalize the appearance of Twitch. Change the color scheme and fonts and tune the layout to optimize your experience."} > Theme >> Legacy',
title: 'Gray (no Purple)',
description: `*Requires Dark Theme to be Enabled.*
-I see my website and I want it painted black...
-
-This is a very early feature and will change as there is time.`,
+This setting will be going away very soon, as the new theme system matures.
+The CSS loaded by this setting is far too heavy and can cause performance issues.`,
component: 'setting-check-box'
},
@@ -115,12 +120,32 @@ This is a very early feature and will change as there is time.`,
const background = Color.RGBA.fromCSS(this.settings.get('theme.color.background'));
if ( background ) {
+ background.a = 1;
bits.push(`--color-background-body: ${background.toCSS()};`);
const hsla = background.toHSLA(),
luma = hsla.l;
dark = luma < 0.5;
+ if ( dark && ! this.settings.get('theme.can-dark') )
+ return this.css_tweaks.delete('colors');
+
+ // Make sure the Twitch theme is set correctly.
+ try {
+ const store = this.resolve('site').store,
+ theme = store.getState().ui.theme,
+ wanted_theme = dark ? 1 : 0;
+
+ if( theme !== wanted_theme )
+ store.dispatch({
+ type: 'core.ui.THEME_CHANGED',
+ theme: wanted_theme
+ });
+ } catch(err) {
+ this.log.warning('Unable to automatically set the Twitch Dark Theme state.', err);
+ }
+
+ bits.push(`--color-background-input-focus: ${background.toCSS()};`);
bits.push(`--color-background-base: ${hsla._l(luma + (dark ? .05 : -.05)).toCSS()};`);
bits.push(`--color-background-alt: ${hsla._l(luma + (dark ? .1 : -.1)).toCSS()};`);
bits.push(`--color-background-alt-2: ${hsla._l(luma + (dark ? .15 : -.15)).toCSS()};`);
@@ -135,10 +160,13 @@ This is a very early feature and will change as there is time.`,
bits.push(`--color-text-base: ${text.toCSS()};`);
const hsla = text.toHSLA(),
- luma = hsla.l;
+ alpha = hsla.a;
- bits.push(`--color-text-alt: ${hsla._l(luma + (dark ? -.1 : .1)).toRGBA().toCSS()};`);
- bits.push(`--color-text-alt-2: ${hsla._l(luma + (dark ? -.2 : .2)).toRGBA().toCSS()};`);
+ bits.push(`--color-text-label: ${text.toCSS()};`);
+ bits.push(`--color-text-label-optional: ${hsla._a(alpha - 0.4).toCSS()};`);
+
+ bits.push(`--color-text-alt: ${hsla._a(alpha - 0.2).toCSS()};`);
+ bits.push(`--color-text-alt-2: ${hsla._a(alpha - 0.4).toCSS()};`);
}
diff --git a/src/sites/twitch-twilight/modules/video_chat/index.jsx b/src/sites/twitch-twilight/modules/video_chat/index.jsx
index b7a0e3f6..94c2090c 100644
--- a/src/sites/twitch-twilight/modules/video_chat/index.jsx
+++ b/src/sites/twitch-twilight/modules/video_chat/index.jsx
@@ -254,7 +254,7 @@ export default class VideoChatHook extends Module {
{ t.i18n.t('video-chat.reply', 'Reply') }
-
+
• { t.i18n.t('video-chat.time', '{time,humantime} ago', {
time: msg.timestamp
}) }
@@ -288,7 +288,7 @@ export default class VideoChatHook extends Module {
>
{this.props.hideTimestamp || (