mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-11 00:20:54 +00:00
4.57.0
* Added: The FFZ Subwoofer badge now displays a user's number of subscribed months in its tool-tip. * Added: Setting to set the default sorting mode of the directory. (Have you tried the Deck add-on?) * Fixed: The location of certain player action buttons was incorrect after Twitch made changes to the player. * Changed: Badges added by add-on are now grouped by add-on in badge visibility settings. This allows users to disable all badges from a given add-on at once, and is just generally nicer to look at. * API Added: `iterateMessages()` method on the `chat` module as an easy way to iterate over all live chat messages, in case existing messages need to be modified without the overhead of tokenization. * API Added: Badges can now be stacked together for visibility purposes, similar to Twitch's native badge versions, by setting a `base_id` on each badge. * API Added: Badges can now display dynamic data on their tool-tip by using a `tooltipExtra` method. This was used to display Subwoofer subscription lengths. * API Added: New setting UI type `setting-text` that can be used to insert arbitrary markdown into settings pages. * API Changed: The `ffz_user_class` special property on messages can be an array instead of a string. * API Fixed: Add-on proxy modules are now correctly used for an add-on's sub-modules.
This commit is contained in:
parent
0eaf1a55be
commit
21ae0059a5
22 changed files with 499 additions and 688 deletions
58
src/modules/main_menu/components/setting-text.vue
Normal file
58
src/modules/main_menu/components/setting-text.vue
Normal file
|
@ -0,0 +1,58 @@
|
|||
<template lang="html">
|
||||
<div class="ffz--setting-text" :class="classes">
|
||||
<div v-if="loading" class="tw-align-center tw-pd-05">
|
||||
<h3 class="tw-mg-1 ffz-i-zreknarf loading" />
|
||||
</div>
|
||||
<markdown v-else :source="content" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {maybe_call} from 'utilities/object';
|
||||
|
||||
export default {
|
||||
props: ['item', 'context'],
|
||||
|
||||
data() {
|
||||
let classes = maybe_call(this.item.classes, this, this.item, this.context);
|
||||
if ( classes instanceof Promise ) {
|
||||
classes.then(classes => {
|
||||
this.classes = classes;
|
||||
}).catch(err => {
|
||||
console.error('Error loading async classes:', err);
|
||||
this.classes = '';
|
||||
});
|
||||
|
||||
classes = '';
|
||||
|
||||
} else if ( ! classes )
|
||||
classes = '';
|
||||
|
||||
const source = maybe_call(this.item.content, this, this.item, this.context);
|
||||
if ( !(source instanceof Promise) )
|
||||
return {
|
||||
loading: false,
|
||||
content: source,
|
||||
classes
|
||||
};
|
||||
|
||||
source.then(content => {
|
||||
this.content = content;
|
||||
this.loading = false;
|
||||
}).catch(err => {
|
||||
console.error('Error loading async content:', err);
|
||||
this.loading = false;
|
||||
this.content = this.t('setting.error', 'An error occurred.');
|
||||
});
|
||||
|
||||
return {
|
||||
loading: true,
|
||||
content: null,
|
||||
classes
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue