1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-04 01:58:31 +00:00

4.0.0-rc7

* Added: Initial support for Chat on Videos.

Please note that moderation features are not currently available when FFZ features for Chat on Videos are enabled. There is a setting to disable custom FFZ rendering which makes moderation tools accessible.

More work has also been done on getting custom viewer cards ready.
This commit is contained in:
SirStendec 2018-07-19 22:03:01 -04:00
parent 99ba52d4ad
commit 5a7a4f3ea9
25 changed files with 679 additions and 62 deletions

View file

@ -245,7 +245,8 @@ export default {
},
presets() {
const out = [];
const out = [],
contexts = this.item.context || [];
out.push({
disabled: this.hasInheritance,
@ -282,7 +283,19 @@ export default {
for(const key in this.data.actions) { // eslint-disable-line guard-for-in
const act = this.data.actions[key];
if ( act && act.presets )
if ( act && act.presets ) {
if ( act.required_context ) {
let okay = true;
for(const ctx of act.required_context)
if ( ! contexts.includes(ctx) ) {
okay = false;
break;
}
if ( ! okay )
continue;
}
for(const preset of act.presets) {
if ( typeof act.title !== 'string' && ! preset.title )
continue;
@ -298,6 +311,7 @@ export default {
}
}, preset));
}
}
}
return out;