1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-01 08:38:32 +00:00

4.0.0-rc20

* Added: Room Actions for Chat. Easily send canned messages or open relevant links.
* Changed: Refactor how action data is passed to in-line chat actions. Should perform better now, and also allow using the message text in actions.
* Changed: Blacklist a few errors from automatic error reporting.
* Fixed: Include the Squad Bar when calculating the player height for Portrait Mode.
* Fixed: Issue with rich content embeds breaking chat rendering when an error occurs loading their data.
* Fixed: Duplicate icon keys in chat action editor.
This commit is contained in:
SirStendec 2019-05-07 15:04:12 -04:00
parent c920b43e01
commit 5500b6eef3
14 changed files with 312 additions and 67 deletions

View file

@ -104,7 +104,7 @@
</select>
</div>
<div class="tw-flex tw-align-items-center">
<div v-if="has_message" class="tw-flex tw-align-items-center">
<label for="vis_deleted">
{{ t('setting.actions.edit-visible.deleted', 'Message Deleted') }}
</label>
@ -215,7 +215,7 @@
import {has, maybe_call, deep_copy} from 'utilities/object';
export default {
props: ['action', 'data', 'inline'],
props: ['action', 'data', 'inline', 'context'],
data() {
return {
@ -233,14 +233,30 @@ export default {
return this.action.v;
},
has_message() {
return this.context && this.context.includes('message')
},
vars() {
const out = ['user.login', 'user.displayName', 'user.id', 'user.type'];
const out = [],
ctx = this.context || [];
out.push('room.login')
out.push('room.id');
if ( ctx.includes('user') ) {
out.push('user.login');
out.push('user.displayName');
out.push('user.id');
out.push('user.type');
}
if ( this.inline )
out.push('message_id');
if ( ctx.includes('room') ) {
out.push('room.login');
out.push('room.id');
}
if ( ctx.includes('message') ) {
out.push('message.id');
out.push('message.text');
}
return out.map(x => `{{${x}}}`).join(', ');
},