mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-10-14 23:11:58 +00:00
Add a setting for tab-completion of FFZ emotes. Process default values of settings with merge strategies.
This commit is contained in:
parent
d922c00748
commit
79e4b02e6b
6 changed files with 44 additions and 11 deletions
|
@ -241,6 +241,9 @@ export default class SettingsContext extends EventEmitter {
|
|||
value = def_default(this);
|
||||
else
|
||||
value = def_default;
|
||||
|
||||
if ( type.default )
|
||||
value = type.default(value);
|
||||
}
|
||||
|
||||
if ( definition.requires )
|
||||
|
|
|
@ -43,6 +43,15 @@ export const object_merge = {
|
|||
|
||||
|
||||
export const array_merge = {
|
||||
default(val) {
|
||||
const values = [];
|
||||
for(const v of val)
|
||||
if ( v.t !== 'inherit' && v.v )
|
||||
values.push(v.v);
|
||||
|
||||
return values;
|
||||
},
|
||||
|
||||
get(key, profiles, log) {
|
||||
const values = [],
|
||||
trailing = [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue