matrix-dimension/web/app/integration/integration.component.ts
Travis Ralston 4965b61f2d Re-wire the UI to support the new backend
This still doesn't allow editing, but it supports showing the widgets at least.
2017-12-20 21:28:43 -07:00

31 lines
993 B
TypeScript

import { Component, EventEmitter, Input, Output } from "@angular/core";
import { LegacyIntegration } from "../shared/models/legacyintegration";
import { BSModalContext } from "ngx-modialog/plugins/bootstrap";
import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser";
export class ConfigModalContext extends BSModalContext {
public integration: LegacyIntegration;
public roomId: string;
public userId: string;
public scalarToken: string;
public integrationId: string;
}
@Component({
selector: "my-integration",
templateUrl: "./integration.component.html",
styleUrls: ["./integration.component.scss"],
})
export class IntegrationComponent {
@Input() integration: LegacyIntegration;
@Output() selected: EventEmitter<any> = new EventEmitter<any>();
constructor(private sanitizer: DomSanitizer) {
}
public getSafeUrl(url: string): SafeResourceUrl {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}