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

4.0.0-rc12.17

* Added: Setting to disable player auto-play. (Closes #515)
* Fixed: Cheers not appearing in chat messages.
* Fixed: Reasons not working for timeouts / bans in in-line actions. (Closes #513)
This commit is contained in:
SirStendec 2018-08-29 19:03:10 -04:00
parent cf0245204e
commit 5cd0c11b0c
4 changed files with 22 additions and 15 deletions

View file

@ -100,7 +100,7 @@ class FrankerFaceZ extends Module {
FrankerFaceZ.Logger = Logger;
const VER = FrankerFaceZ.version_info = {
major: 4, minor: 0, revision: 0, extra: '-rc12.16',
major: 4, minor: 0, revision: 0, extra: '-rc12.17',
commit: __git_commit__,
build: __webpack_hash__,
toString: () =>

View file

@ -136,7 +136,7 @@ export const ban = {
},
click(event, data) {
this.sendMessage(data.room.login, `/ban ${data.user.login} ${data.reason||''}`);
this.sendMessage(data.room.login, `/ban ${data.user.login} ${data.reason||data.options.reason||''}`);
}
}
@ -177,7 +177,7 @@ export const timeout = {
},
click(event, data) {
this.sendMessage(data.room.login, `/timeout ${data.user.login} ${data.options.duration} ${data.reason||''}`);
this.sendMessage(data.room.login, `/timeout ${data.user.login} ${data.options.duration} ${data.reason||data.options.reason||''}`);
}
}

View file

@ -482,16 +482,13 @@ export const CheerEmotes = {
if ( ! tokens || ! tokens.length || ! msg.bits )
return tokens;
// TODO: Store the room onto the chat message so we don't need to look this up.
const SiteChat = this.resolve('site.chat'),
chat = SiteChat && SiteChat.currentChat,
bitsConfig = chat && chat.props.bitsConfig;
const room = this.getRoom(msg.roomID, msg.roomLogin, true),
actions = room && room.bitsConfig;
if ( ! bitsConfig )
if ( ! actions )
return tokens;
const actions = bitsConfig.indexedActions,
matcher = new RegExp(`^(${Object.keys(actions).join('|')})(\\d+)$`, 'i');
const matcher = new RegExp(`^(${Object.keys(actions).join('|')})(\\d+)$`, 'i');
const out = [],
collected = {},
@ -516,11 +513,11 @@ export const CheerEmotes = {
}
const amount = parseInt(match[2], 10),
tiers = cheer.orderedTiers;
tiers = cheer.tiers;
let tier, token;
for(let i=0, l = tiers.length; i < l; i++)
if ( amount >= tiers[i].bits ) {
if ( amount >= tiers[i].amount ) {
tier = i;
break;
}
@ -566,11 +563,11 @@ export const CheerEmotes = {
if ( has(collected, prefix) ) {
const cheers = collected[prefix],
cheer = actions[prefix],
tiers = cheer.orderedTiers;
tiers = cheer.tiers;
let tier = 0;
for(let l = tiers.length; tier < l; tier++)
if ( cheers.total >= tiers[tier].bits )
if ( cheers.total >= tiers[tier].amount )
break;
out.unshift({

View file

@ -137,6 +137,16 @@ export default class Player extends Module {
},
});
this.settings.add('player.no-autoplay', {
default: false,
ui: {
path: 'Channel > Player >> Playback',
title: 'Do not automatically start playing videos or streams.',
description: 'Note: This feature does not apply when navigating directly from channel to channel.',
component: 'setting-check-box'
}
});
this.settings.add('player.vod.autoplay', {
default: true,
ui: {
@ -265,7 +275,7 @@ export default class Player extends Module {
if ( this.settings.get('player.theatre.auto-enter') && inst.onTheatreChange )
inst.onTheatreChange(true);
if ( ! this.settings.get('player.home.autoplay') && this.router.current.name === 'front-page' ) {
if ( this.settings.get('player.no-autoplay') || (! this.settings.get('player.home.autoplay') && this.router.current.name === 'front-page') ) {
if ( inst.player )
this.disableAutoplay(inst);
else {