summaryrefslogtreecommitdiffstats
path: root/webapp/src/app/devel/devel.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/app/devel/devel.component.ts')
-rw-r--r--webapp/src/app/devel/devel.component.ts32
1 files changed, 32 insertions, 0 deletions
diff --git a/webapp/src/app/devel/devel.component.ts b/webapp/src/app/devel/devel.component.ts
new file mode 100644
index 0000000..ff12127
--- /dev/null
+++ b/webapp/src/app/devel/devel.component.ts
@@ -0,0 +1,32 @@
+import { Component } from '@angular/core';
+
+import { Observable } from 'rxjs';
+
+import { ConfigService, IConfig, IProject } from "../services/config.service";
+
+@Component({
+ selector: 'devel',
+ moduleId: module.id,
+ templateUrl: './devel.component.html',
+ styleUrls: ['./devel.component.css'],
+})
+
+export class DevelComponent {
+
+ curPrj: IProject;
+ config$: Observable<IConfig>;
+
+ constructor(private configSvr: ConfigService) {
+ }
+
+ ngOnInit() {
+ this.config$ = this.configSvr.conf;
+ this.config$.subscribe((cfg) => {
+ if ("projects" in cfg) {
+ this.curPrj = cfg.projects[0];
+ } else {
+ this.curPrj = null;
+ }
+ });
+ }
+} \ No newline at end of file