mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
4.75.6
* Fixed: Certain chat features not working correctly during a Shared Chat session. (Closes #1574) * Fixed: The Add-Ons menu not displaying a loaded add-on if it has incomplete data.
This commit is contained in:
parent
ef7e91f82b
commit
a5ba29a153
8 changed files with 31 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.75.5",
|
"version": "4.75.6",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|
|
@ -13,7 +13,7 @@ import type SettingsManager from './settings';
|
||||||
import type TranslationManager from './i18n';
|
import type TranslationManager from './i18n';
|
||||||
import type LoadTracker from './load_tracker';
|
import type LoadTracker from './load_tracker';
|
||||||
import type FrankerFaceZ from './main';
|
import type FrankerFaceZ from './main';
|
||||||
import type { AddonInfo } from 'utilities/types';
|
import type { AddonInfo, BasicAddonInfo } from 'utilities/types';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
|
@ -245,7 +245,7 @@ export default class AddonManager extends Module<'addons'> {
|
||||||
this.emit(':data-loaded');
|
this.emit(':data-loaded');
|
||||||
}
|
}
|
||||||
|
|
||||||
addAddon(input: AddonInfo, is_dev: boolean = false) {
|
addAddon(input: BasicAddonInfo, is_dev: boolean = false) {
|
||||||
let addon = input as FullAddonInfo;
|
let addon = input as FullAddonInfo;
|
||||||
|
|
||||||
const old = this.addons[addon.id];
|
const old = this.addons[addon.id];
|
||||||
|
@ -255,6 +255,8 @@ export default class AddonManager extends Module<'addons'> {
|
||||||
addon.short_name_i18n = addon.short_name_i18n || `addon.${addon.id}.short_name`;
|
addon.short_name_i18n = addon.short_name_i18n || `addon.${addon.id}.short_name`;
|
||||||
addon.author_i18n = addon.author_i18n || `addon.${addon.id}.author`;*/
|
addon.author_i18n = addon.author_i18n || `addon.${addon.id}.author`;*/
|
||||||
|
|
||||||
|
addon.name = addon.name ?? addon.id;
|
||||||
|
|
||||||
addon.dev = is_dev;
|
addon.dev = is_dev;
|
||||||
addon.requires = addon.requires || [];
|
addon.requires = addon.requires || [];
|
||||||
addon.required_by = Array.isArray(old) ? old : old && old.required_by || [];
|
addon.required_by = Array.isArray(old) ? old : old && old.required_by || [];
|
||||||
|
@ -566,7 +568,7 @@ export default class AddonManager extends Module<'addons'> {
|
||||||
crossorigin: 'anonymous'
|
crossorigin: 'anonymous'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Error if this takes more than 5 seconds.
|
// Error if this takes more than 60 seconds.
|
||||||
await timeout(this.waitFor(`addon.${id}:registered` as any), 60000);
|
await timeout(this.waitFor(`addon.${id}:registered` as any), 60000);
|
||||||
|
|
||||||
module = this.resolve(`addon.${id}`);
|
module = this.resolve(`addon.${id}`);
|
||||||
|
|
|
@ -167,8 +167,8 @@ export default {
|
||||||
if ( a.sort < b.sort ) return -1;
|
if ( a.sort < b.sort ) return -1;
|
||||||
if ( b.sort < a.sort ) return 1;
|
if ( b.sort < a.sort ) return 1;
|
||||||
|
|
||||||
const a_n = a.name.toLowerCase(),
|
const a_n = (a.name ?? a.id).toLowerCase(),
|
||||||
b_n = b.name.toLowerCase();
|
b_n = (b.name ?? b.id).toLowerCase();
|
||||||
|
|
||||||
if ( a_n < b_n ) return -1;
|
if ( a_n < b_n ) return -1;
|
||||||
if ( b_n < a_n ) return 1;
|
if ( b_n < a_n ) return 1;
|
||||||
|
|
|
@ -31,13 +31,13 @@
|
||||||
<h4>
|
<h4>
|
||||||
{{ addon.name_i18n ? t(addon.name_i18n, addon.name) : addon.name }}
|
{{ addon.name_i18n ? t(addon.name_i18n, addon.name) : addon.name }}
|
||||||
<span
|
<span
|
||||||
v-if="addon.dev || addon.unlisted"
|
v-if="addon.dev || addon.unlisted "
|
||||||
class="tw-c-text-alt-2 tw-font-size-6"
|
class="tw-c-text-alt-2 tw-font-size-6"
|
||||||
>
|
>
|
||||||
({{ addon.id }})
|
({{ addon.id }})
|
||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
<span class="tw-c-text-alt tw-mg-r-1">
|
<span v-if="addon.author" class="tw-c-text-alt tw-mg-r-1">
|
||||||
{{ t('addon.author', 'By: {author}', {
|
{{ t('addon.author', 'By: {author}', {
|
||||||
author: addon.author_i18n ? t(addon.author_i18n, addon.author) : addon.author
|
author: addon.author_i18n ? t(addon.author_i18n, addon.author) : addon.author
|
||||||
}) }}
|
}) }}
|
||||||
|
@ -203,7 +203,10 @@ export default {
|
||||||
if ( this.addon.description_i18n )
|
if ( this.addon.description_i18n )
|
||||||
return this.t(this.addon.description_i18n, this.addon.description);
|
return this.t(this.addon.description_i18n, this.addon.description);
|
||||||
|
|
||||||
return this.addon.description;
|
else if ( this.addon.description )
|
||||||
|
return this.addon.description;
|
||||||
|
|
||||||
|
return this.t('addon.no-desc', '*No description.*');
|
||||||
},
|
},
|
||||||
|
|
||||||
maintainer() {
|
maintainer() {
|
||||||
|
@ -322,4 +325,4 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,7 +8,6 @@ import Module from 'utilities/module';
|
||||||
|
|
||||||
import {createElement, on, off} from 'utilities/dom';
|
import {createElement, on, off} from 'utilities/dom';
|
||||||
import {isValidShortcut, debounce, has} from 'utilities/object';
|
import {isValidShortcut, debounce, has} from 'utilities/object';
|
||||||
import { IS_FIREFOX } from 'utilities/constants';
|
|
||||||
import { getFontsList, useFont } from 'utilities/fonts';
|
import { getFontsList, useFont } from 'utilities/fonts';
|
||||||
|
|
||||||
const STYLE_VALIDATOR = createElement('span');
|
const STYLE_VALIDATOR = createElement('span');
|
||||||
|
|
|
@ -219,7 +219,7 @@ export default class ChatHook extends Module {
|
||||||
|
|
||||||
this.ChatRenderer = this.fine.define(
|
this.ChatRenderer = this.fine.define(
|
||||||
'chat-renderer',
|
'chat-renderer',
|
||||||
n => n.mapMessageToChatLine && n.reportChatRenderSent,
|
n => n.mapMessagesToChatLines && n.reportChatRenderSent,
|
||||||
Twilight.CHAT_ROUTES
|
Twilight.CHAT_ROUTES
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { AddonInfo } from './types';
|
||||||
import type Logger from './logging';
|
import type Logger from './logging';
|
||||||
import type TranslationManager from '../i18n';
|
import type TranslationManager from '../i18n';
|
||||||
import type SettingsManager from '../settings';
|
import type SettingsManager from '../settings';
|
||||||
|
import type AddonManager from '../addons';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A special sub-class of {@link Module} used for the root module of an add-on.
|
* A special sub-class of {@link Module} used for the root module of an add-on.
|
||||||
|
@ -61,10 +62,18 @@ export class Addon<TPath extends string = '', TEventMap extends ModuleEvents = M
|
||||||
if ( ! info && this.info )
|
if ( ! info && this.info )
|
||||||
info = this.info;
|
info = this.info;
|
||||||
|
|
||||||
const ffz = window.FrankerFaceZ.get();
|
const ffz = window.FrankerFaceZ.get(),
|
||||||
if ( info ) {
|
addons = (ffz as any)?.addons as AddonManager;
|
||||||
info.id = id;
|
|
||||||
(ffz as any).addons.addAddon(info);
|
if ( addons ) {
|
||||||
|
if ( info ) {
|
||||||
|
info.id = id;
|
||||||
|
addons.addAddon(info);
|
||||||
|
|
||||||
|
} else if ( ! addons.hasAddon(id) )
|
||||||
|
addons.addAddon({
|
||||||
|
id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -93,6 +93,8 @@ export type AddonInfo = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type BasicAddonInfo = Pick<AddonInfo, 'id'> & Partial<AddonInfo>;
|
||||||
|
|
||||||
// These types are used by get()
|
// These types are used by get()
|
||||||
|
|
||||||
export type ExtractSegments<Input extends string> =
|
export type ExtractSegments<Input extends string> =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue