Exceptions and Errors are better Files structure is better New ComponentContext.ts New DataTable.tsx tables.ts Massive components refactoring New Group.java New LoggingRequestFilter.java LoggingSessionListener.java New NotificationStore.ts SysInfoStore.ts New reactiveValue.ts ReactiveControls.tsx New dependencies And much more
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import {configure} from "mobx";
|
|
import {RootStore} from "../store/RootStore";
|
|
import {RouterService} from "../services/RouterService";
|
|
import {library} from '@fortawesome/fontawesome-svg-core';
|
|
import {fas} from '@fortawesome/free-solid-svg-icons';
|
|
import {fab} from "@fortawesome/free-brands-svg-icons";
|
|
import {far} from "@fortawesome/free-regular-svg-icons";
|
|
import {NotificationService} from "../services/NotificationService";
|
|
|
|
const initMobX = () => {
|
|
configure({enforceActions: 'observed'});
|
|
console.debug('MobX initialized');
|
|
}
|
|
|
|
const initFontAwesome = () => {
|
|
library.add(fas);
|
|
library.add(fab);
|
|
library.add(far);
|
|
console.debug('FontAwesome initialized');
|
|
}
|
|
|
|
const initLibs = () => {
|
|
initMobX();
|
|
initFontAwesome();
|
|
console.debug('Libraries initialized');
|
|
}
|
|
|
|
const initServices = (rootStore: RootStore) => {
|
|
RouterService.init(rootStore.routerStore);
|
|
NotificationService.init(rootStore.notificationStore);
|
|
console.debug('Services initialized');
|
|
}
|
|
|
|
export const initApp = () => {
|
|
console.debug('Initializing app');
|
|
console.debug('>>>>>>>>>>>>>>>>>>>>>>>>');
|
|
|
|
initLibs();
|
|
|
|
let rootStore = new RootStore().init();
|
|
|
|
initServices(rootStore);
|
|
|
|
console.debug('<<<<<<<<<<<<<<<<<<<<<<<<');
|
|
console.debug('App initialized');
|
|
return rootStore;
|
|
}
|