2017-12-09 18:34:59 -05:00
|
|
|
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
2017-12-20 23:28:43 -05:00
|
|
|
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";
|
2017-05-29 00:51:04 -04:00
|
|
|
|
|
|
|
export class ConfigModalContext extends BSModalContext {
|
2017-12-20 23:28:43 -05:00
|
|
|
public integration: LegacyIntegration;
|
2017-05-29 00:51:04 -04:00
|
|
|
public roomId: string;
|
2017-12-14 00:44:20 -05:00
|
|
|
public userId: string;
|
2017-05-29 00:51:04 -04:00
|
|
|
public scalarToken: string;
|
2017-10-09 23:55:45 -04:00
|
|
|
public integrationId: string;
|
2017-05-29 00:51:04 -04:00
|
|
|
}
|
2017-05-28 02:35:40 -04:00
|
|
|
|
|
|
|
@Component({
|
2017-08-27 01:26:00 -04:00
|
|
|
selector: "my-integration",
|
|
|
|
templateUrl: "./integration.component.html",
|
|
|
|
styleUrls: ["./integration.component.scss"],
|
2017-05-28 02:35:40 -04:00
|
|
|
})
|
|
|
|
export class IntegrationComponent {
|
|
|
|
|
2017-12-20 23:28:43 -05:00
|
|
|
@Input() integration: LegacyIntegration;
|
2017-12-15 23:22:34 -05:00
|
|
|
@Output() selected: EventEmitter<any> = new EventEmitter<any>();
|
2017-05-28 02:35:40 -04:00
|
|
|
|
2017-12-15 23:22:34 -05:00
|
|
|
constructor(private sanitizer: DomSanitizer) {
|
2017-05-28 02:35:40 -04:00
|
|
|
}
|
|
|
|
|
2017-12-15 23:22:34 -05:00
|
|
|
public getSafeUrl(url: string): SafeResourceUrl {
|
|
|
|
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
2017-12-10 04:35:24 -05:00
|
|
|
}
|
2017-05-28 02:35:40 -04:00
|
|
|
}
|