matrix-dimension/web/app/integration/integration.component.ts

31 lines
993 B
TypeScript
Raw Normal View History

2017-12-09 18:34:59 -05:00
import { Component, EventEmitter, Input, Output } from "@angular/core";
import { LegacyIntegration } from "../shared/models/legacyintegration";
2017-12-15 23:22:34 -05:00
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({
2017-08-27 01:26:00 -04:00
selector: "my-integration",
templateUrl: "./integration.component.html",
styleUrls: ["./integration.component.scss"],
})
export class IntegrationComponent {
@Input() integration: LegacyIntegration;
2017-12-15 23:22:34 -05:00
@Output() selected: EventEmitter<any> = new EventEmitter<any>();
2017-12-15 23:22:34 -05:00
constructor(private sanitizer: DomSanitizer) {
}
2017-12-15 23:22:34 -05:00
public getSafeUrl(url: string): SafeResourceUrl {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}