Browse Source

Notifo fix.

pull/539/head
Sebastian 6 years ago
parent
commit
d70ec15490
  1. 11
      frontend/app/shared/components/notifo.component.ts

11
frontend/app/shared/components/notifo.component.ts

@ -44,18 +44,21 @@ export class NotifoComponent implements AfterViewInit, OnChanges, OnDestroy {
}
public ngAfterViewInit() {
if (this.notifoApiKey) {
const userToken = this.notifoApiKey;
if (userToken) {
let notifo = window['notifo'];
if (!notifo) {
notifo = [];
const options: any = { apiUrl: this.notifoApiUrl, userToken };
if (this.notifoApiUrl.indexOf('localhost:5002') >= 0) {
notifo.push(['set', 'style', 'https://localhost:3002/notifo-sdk.css']);
options.styleUrl = 'https://localhost:3002/notifo-sdk.css';
}
notifo.push(['set', 'api-url', this.notifoApiUrl]);
notifo.push(['set', 'user-token', this.notifoApiKey]);
notifo.push(['init', options]);
notifo.push(['subscribe']);
window['notifo'] = notifo;

Loading…
Cancel
Save