fix setup

This commit is contained in:
peter
2019-08-11 12:24:46 +02:00
parent 3812748ba9
commit 2526cd82f3
8 changed files with 17 additions and 6 deletions
+5 -1
View File
@@ -190,7 +190,11 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
response.status(200)
response.set('Content-Type', 'application/javascript')
response.send(frontend)
})
})
this.express.get("*", (req, res) => {
res.status(301).redirect("/")
})
this.httpServer = new http.Server(this.express)
this.httpServer.listen(port, () => {
+1 -1
View File
@@ -81,9 +81,9 @@ window['setup'] = async() => {
await Promise.all([
fb.PluginManager.installPlugin("ApiClient"),
fb.PluginManager.installPlugin("HtmlSupplier"),
fb.PluginManager.installPlugin("PluginManager"),
fb.PluginManager.installPlugin("PaymentManager"),
fb.PluginManager.installPlugin("BTCWallet"),
])
await fb.PluginManager.installPlugin("PluginManager"),
location.reload();
}
@@ -1,11 +1,15 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule, Route } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { ErrorDisplayComponent } from './error-display/error-display.component';
const routes: Routes = [{
path: "",
component: HomeComponent
},{
path: "**",
component: ErrorDisplayComponent
}];
export function getRoutes(){
@@ -13,6 +13,7 @@ import { SidebarComponent } from './sidebar/sidebar.component';
import { MainComponent } from './main/main.component';
import { DynamicLoaderComponent } from './dynamic-loader/dynamic-loader.component';
import { HomeComponent } from './home/home.component';
import { ErrorDisplayComponent } from './error-display/error-display.component';
export function createCompiler(fn: CompilerFactory): Compiler {
return fn.createCompiler();
@@ -27,6 +28,7 @@ const entryComps = []
MainComponent,
DynamicLoaderComponent,
HomeComponent,
ErrorDisplayComponent
],
imports: [
BrowserModule,
@@ -33,6 +33,7 @@ import { AfterViewInit, Component, ViewContainerRef, ViewChild } from '@angular/
import { SidebarComponent } from '../sidebar/sidebar.component';
import { MainComponent } from '../main/main.component';
import { Router } from '@angular/router';
import { FrontendPlugin } from "frontblock-generic/Plugin"
@Component({
@@ -64,7 +65,7 @@ export class DynamicLoaderComponent implements AfterViewInit {
}
private async installWidget(pluginName:string){
const module: any = await SystemJS.import("plugins/"+pluginName+".js");
const module: FrontendPlugin = await SystemJS.import("plugins/"+pluginName+".js");
const plugin = new module['PluginModule']()
const entry = plugin.getSidebarEntry()
entry.route = 'page/' + entry.route
+1 -1
View File
@@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
"types": ["node"]
},
"include": [
"src/**/*.ts"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"extends": "./tsconfig.json",
"include": ["src/frontend/widget"],
"include": ["src/frontend/**/*"],
"exclude": [
"src/backend"
]
+1 -1
View File
@@ -9,6 +9,6 @@
"strict": true,
"experimentalDecorators": true
},
"include": ["src/backend"],
"include": ["src/backend/**/*"],
"exclude": ["node_modules", "**/__tests__/*"],
}