mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
Updates
This commit is contained in:
parent
f53c8199c2
commit
a1ae6a384f
@ -21,7 +21,7 @@ export class ConfigurationManager extends NitroManager implements IConfiguration
|
||||
|
||||
protected onInit(): void
|
||||
{
|
||||
this.parseConfiguration(this.getDefaultConfig());
|
||||
this.parseConfiguration(this.getDefaultConfig(), true);
|
||||
|
||||
this._pendingUrls = this.getValue<string[]>('config.urls').slice();
|
||||
|
||||
@ -83,7 +83,7 @@ export class ConfigurationManager extends NitroManager implements IConfiguration
|
||||
this.events && this.events.dispatchEvent(new ConfigurationEvent(type));
|
||||
}
|
||||
|
||||
private parseConfiguration(data: { [index: string]: any }): boolean
|
||||
private parseConfiguration(data: { [index: string]: any }, overrides: boolean = false): boolean
|
||||
{
|
||||
if(!data) return false;
|
||||
|
||||
@ -93,14 +93,19 @@ export class ConfigurationManager extends NitroManager implements IConfiguration
|
||||
|
||||
for(const key in data)
|
||||
{
|
||||
if(this._definitions.has(key)) continue;
|
||||
|
||||
let value = data[key];
|
||||
|
||||
if(typeof value === 'string') value = this.interpolate((value as string), regex);
|
||||
|
||||
if(this._definitions.has(key))
|
||||
{
|
||||
if(overrides) this.setValue(key, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setValue(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -160,7 +160,6 @@ export class BadgeImageManager implements IDisposable
|
||||
url = (Nitro.instance.getConfiguration<string>('badge.asset.url')).replace('%badgename%', badge);
|
||||
break;
|
||||
case BadgeImageManager.GROUP_BADGE:
|
||||
//url = (Nitro.instance.getConfiguration<string>('badge.asset.group.url')).replace('%badgedata%', badge);
|
||||
url = badge;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user