mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
21 lines
508 B
TypeScript
21 lines
508 B
TypeScript
import {PublicConfigClass} from './ConfigClass';
|
|
import {WebConfigLoader} from 'typeconfig/src/WebConfigLoader';
|
|
|
|
|
|
declare module ServerInject {
|
|
export const ConfigInject: PublicConfigClass;
|
|
}
|
|
|
|
export let Config = new PublicConfigClass();
|
|
|
|
|
|
if (typeof ServerInject !== 'undefined' && typeof ServerInject.ConfigInject !== 'undefined') {
|
|
WebConfigLoader.loadFrontendConfig(Config.Client, ServerInject.ConfigInject);
|
|
}
|
|
|
|
|
|
if (Config.Client.publicUrl === '') {
|
|
Config.Client.publicUrl = location.origin;
|
|
}
|
|
|