1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 18:48:31 +00:00

4.0.0-rc13.13

* Added: Setting to force the tags/metadata bar to the top of information pane beneath the player.
* Fixed: Some users, somehow, have their emote menu sorting setting set to an invalid value, breaking the player when it tries to sort. Fall back to the default if there's no valid sorting setting.
* Changed: Make the changelog properly handle commits with versions starting with a `v`.
This commit is contained in:
SirStendec 2018-12-05 14:51:03 -05:00
parent a340f3cd00
commit 49bcfaebed
6 changed files with 73 additions and 8 deletions

View file

@ -149,7 +149,7 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}`
FrankerFaceZ.Logger = Logger; FrankerFaceZ.Logger = Logger;
const VER = FrankerFaceZ.version_info = { const VER = FrankerFaceZ.version_info = {
major: 4, minor: 0, revision: 0, extra: '-rc13.12.1', major: 4, minor: 0, revision: 0, extra: '-rc13.13',
commit: __git_commit__, commit: __git_commit__,
build: __webpack_hash__, build: __webpack_hash__,
toString: () => toString: () =>

View file

@ -37,6 +37,7 @@ export default class Actions extends Module {
{v: {action: 'ban', appearance: {type: 'icon', icon: 'ffz-i-block'}, options: {}, display: {mod: true, mod_icons: true, deleted: false}}}, {v: {action: 'ban', appearance: {type: 'icon', icon: 'ffz-i-block'}, options: {}, display: {mod: true, mod_icons: true, deleted: false}}},
{v: {action: 'unban', appearance: {type: 'icon', icon: 'ffz-i-ok'}, options: {}, display: {mod: true, mod_icons: true, deleted: true}}}, {v: {action: 'unban', appearance: {type: 'icon', icon: 'ffz-i-ok'}, options: {}, display: {mod: true, mod_icons: true, deleted: true}}},
{v: {action: 'timeout', appearance: {type: 'icon', icon: 'ffz-i-clock'}, display: {mod: true, mod_icons: true}}}, {v: {action: 'timeout', appearance: {type: 'icon', icon: 'ffz-i-clock'}, display: {mod: true, mod_icons: true}}},
{v: {action: 'msg_delete', appearance: {type: 'icon', icon: 'ffz-i-trash'}, options: {}, display: {mod: true, mod_icons: true}}}
], ],
type: 'array_merge', type: 'array_merge',

View file

@ -51,7 +51,7 @@
import {get} from 'utilities/object'; import {get} from 'utilities/object';
const TITLE_MATCH = /^(\d+\.\d+\.\d+(?:-[^\n]+)?)\n+/; const TITLE_MATCH = /^v?(\d+\.\d+\.\d+(?:-[^\n]+)?)\n+/;
export default { export default {

View file

@ -10,13 +10,16 @@ import {get, deep_copy} from 'utilities/object';
import CHANNEL_QUERY from './channel_header_query.gql'; import CHANNEL_QUERY from './channel_header_query.gql';
export default class LegacyChannelBar extends Module { export default class ChannelBar extends Module {
constructor(...args) { constructor(...args) {
super(...args); super(...args);
this.should_enable = true; this.should_enable = true;
this.inject('settings');
this.inject('site.css_tweaks');
this.inject('site.fine'); this.inject('site.fine');
this.inject('site.web_munch');
this.inject('site.apollo'); this.inject('site.apollo');
this.inject('metadata'); this.inject('metadata');
this.inject('socket'); this.inject('socket');
@ -31,28 +34,89 @@ export default class LegacyChannelBar extends Module {
}, false); }, false);
this.settings.add('channel.metadata.force-above', {
default: false,
ui: {
path: 'Channel > Metadata >> Appearance',
title: 'Force metadata and tags to the top of the channel information bar.',
component: 'setting-check-box'
},
changed: val => this.css_tweaks.toggle('channel-metadata-top', val)
});
this.ChannelBar = this.fine.define( this.ChannelBar = this.fine.define(
'legacy-channel-bar', 'channel-bar',
n => n.getTitle && n.getGame && n.renderGame, n => n.getTitle && n.getGame && n.renderGame,
['user'] ['user']
); );
this.HostBar = this.fine.define( this.HostBar = this.fine.define(
'legacy-host-container', 'host-container',
n => n.handleReportHosterClick, n => n.handleReportHosterClick,
['user'] ['user']
) )
} }
onEnable() { async onEnable() {
/*const t = this,
React = await this.web_munch.findModule('react');
if ( ! React )
return;
//const createElement = React.createElement;*/
this.css_tweaks.toggle('channel-metadata-top', this.settings.get('channel.metadata.force-above'));
this.ChannelBar.on('unmount', this.unmountChannelBar, this); this.ChannelBar.on('unmount', this.unmountChannelBar, this);
this.ChannelBar.on('mount', this.updateChannelBar, this); this.ChannelBar.on('mount', this.updateChannelBar, this);
this.ChannelBar.on('update', this.updateChannelBar, this); this.ChannelBar.on('update', this.updateChannelBar, this);
this.ChannelBar.ready((cls, instances) => { this.ChannelBar.ready((cls, instances) => {
for(const inst of instances) /*const old_render = cls.prototype.render;
cls.prototype.render = function() {
if ( this.props.channelIsHosting )
return null;
const title = this.getTitle();
return (<div
data-test-selector="channel-info-bar-wrapper"
class="channel-info-bar tw-border-b tw-border-bottom-left-radius-large tw-border-bottom-right-radius-large tw-border-l tw-border-r tw-border-t tw-flex tw-flex-wrap tw-justify-content-between tw-lg-pd-b-0 tw-lg-pd-t-1 tw-lg-pd-x-1 tw-pd-1"
>
<div class="channel-info-bar__content-container tw-flex tw-full-width tw-justify-content-between tw-mg-b-1">
<div class="tw-full-width">
<div class="tw-flex">
<div class="tw-flex tw-mg-t-05">
{this.renderGameBoxArt()}
</div>
<div class="channel-info-bar__content-right tw-full-width">
<div class="tw-flex tw-justify-content-between">
<div class="tw-ellipsis tw-mg-b-05 tw-mg-r-2">
<span
class="tw-font-size-4"
data-a-target="stream-title"
data-test-selector="channel-info-bar-title-text"
title={title}
>
{title}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>);
}*/
for(const inst of instances) {
//inst.forceUpdate();
this.updateChannelBar(inst); this.updateChannelBar(inst);
}
}); });

View file

@ -1158,7 +1158,7 @@ export default class EmoteMenu extends Module {
getSorter() { // eslint-disable-line class-methods-use-this getSorter() { // eslint-disable-line class-methods-use-this
return EMOTE_SORTERS[t.chat.context.get('chat.emote-menu.sort-emotes')]; return EMOTE_SORTERS[t.chat.context.get('chat.emote-menu.sort-emotes')] || EMOTE_SORTERS[0] || (() => 0);
} }
buildState(props, old_state) { buildState(props, old_state) {