1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 10:38:30 +00:00

4.0.0-rc18.1

* Fixed: The new ban and timeout reason context menu not appearing in rooms without chat rules set.
This commit is contained in:
SirStendec 2019-04-29 21:14:23 -04:00
parent 23816fafc9
commit 918a5fbb13
2 changed files with 28 additions and 24 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: '-rc18', major: 4, minor: 0, revision: 0, extra: '-rc18.1',
commit: __git_commit__, commit: __git_commit__,
build: __webpack_hash__, build: __webpack_hash__,
toString: () => toString: () =>

View file

@ -199,33 +199,37 @@ export default class Actions extends Module {
return false; return false;
}; };
for(const reason of reasons) { if ( reasons && reasons.length ) {
const text = this.replaceVariables(reason.i18n ? this.i18n.t(reason.i18n, reason.text) : reason.text, data); for(const reason of reasons) {
const text = this.replaceVariables(reason.i18n ? this.i18n.t(reason.i18n, reason.text) : reason.text, data);
reason_elements.push(<li class="tw-full-width tw-relative"> reason_elements.push(<li class="tw-full-width tw-relative">
<a <a
href="#" href="#"
onClick={click_fn(text)} onClick={click_fn(text)}
class="tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive tw-pd-05" class="tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive tw-pd-05"
> >
{text} {text}
</a> </a>
</li>) </li>)
}
} }
if ( reasons && reasons.length && rules && rules.length ) if ( rules && rules.length ) {
reason_elements.push(<div class="tw-mg-y-05 tw-border-b"></div>); if ( reasons && reasons.length )
reason_elements.push(<div class="tw-mg-y-05 tw-border-b"></div>);
for(const rule of rules) { for(const rule of rules) {
reason_elements.push(<li class="tw-full-width tw-relative"> reason_elements.push(<li class="tw-full-width tw-relative">
<a <a
href="#" href="#"
onClick={click_fn(rule)} onClick={click_fn(rule)}
class="tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive tw-pd-05" class="tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive tw-pd-05"
> >
{rule} {rule}
</a> </a>
</li>); </li>);
}
} }
let reason_text; let reason_text;