1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 01:56:55 +00:00

Added UI for clearing temp highlights

This commit is contained in:
gr3ger 2020-09-27 15:43:10 +02:00
parent fac918b897
commit 441ccee64d
2 changed files with 52 additions and 0 deletions

View file

@ -363,6 +363,16 @@ export default class Chat extends Module {
} }
}); });
this.settings.add('chat.filtering.highlight-basic-users-temp', {
default: [],
type: 'array_merge',
always_inherit: true,
ui: {
path: 'Chat > Filtering >> Temporary User Highlights',
component: 'temp-highlights',
}
});
this.settings.add('chat.filtering.highlight-basic-users--color-regex', { this.settings.add('chat.filtering.highlight-basic-users--color-regex', {
requires: ['chat.filtering.highlight-basic-users'], requires: ['chat.filtering.highlight-basic-users'],
equals: 'requirements', equals: 'requirements',

View file

@ -0,0 +1,42 @@
<template lang="html">
<section class="ffz--widget">
<button
class="tw-button tw-mg-x-1"
@click="clear"
>
<span class="tw-button__icon tw-button__icon--left">
<figure class="ffz-i-trash" />
</span>
<span class="tw-button__text">
{{ t('setting.highlights-temp.clear', 'Clear highlights') }}
</span>
</button>
</section>
</template>
<script>
import SettingMixin from '../setting-mixin';
export default {
mixins: [SettingMixin],
props: ['item', 'context'],
data() {
return {
error_desc: null,
error: false,
message: null
}
},
methods: {
clear(){
const settings = this.context.getFFZ().resolve('settings')
settings.provider.delete('chat.filtering.highlight-temp')
this.context.getFFZ().resolve('chat').emit('chat:update-lines')
},
}
}
</script>