From 8e815c30059f13c0ce67ea42b2c6c71db356c4fe Mon Sep 17 00:00:00 2001
From: tekay <tom.kaesler@mni.thm.de>
Date: Fri, 29 Nov 2019 00:17:33 +0100
Subject: [PATCH] Use domain given by window

---
 .../creator/room-creator-page/room-creator-page.component.ts    | 2 +-
 .../_dialogs/qr-code-dialog/qr-code-dialog.component.html       | 2 +-
 .../shared/_dialogs/qr-code-dialog/qr-code-dialog.component.ts  | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/app/components/creator/room-creator-page/room-creator-page.component.ts b/src/app/components/creator/room-creator-page/room-creator-page.component.ts
index 2c156ff99..885d5fc23 100644
--- a/src/app/components/creator/room-creator-page/room-creator-page.component.ts
+++ b/src/app/components/creator/room-creator-page/room-creator-page.component.ts
@@ -35,7 +35,7 @@ export class RoomCreatorPageComponent extends RoomPageComponent implements OnIni
   deviceType = localStorage.getItem('deviceType');
   viewModuleCount = 1;
   moderatorCommentCounter: number;
-  urlToCopy = 'https://frag.jetzt/participant/room/';
+  urlToCopy = `${window.location.protocol}//${window.location.hostname}/participant/room/`;
 
   constructor(protected roomService: RoomService,
               protected notification: NotificationService,
diff --git a/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.html b/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.html
index a74da2062..30efef0b7 100644
--- a/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.html
+++ b/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.html
@@ -7,7 +7,7 @@
       <mat-icon>close</mat-icon>
     </button>
     <div class="qr_text" #text>
-      <h2>https://frag.jetzt
+      <h2>{{url}}
         <br>{{'qr-dialog.session' | translate}}: {{qrCode.substring(36, 40)}} {{qrCode.substring(40, 44)}}</h2>
     </div>
   </div>
diff --git a/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.ts b/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.ts
index 4a662657b..c1696948d 100644
--- a/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.ts
+++ b/src/app/components/shared/_dialogs/qr-code-dialog/qr-code-dialog.component.ts
@@ -25,6 +25,7 @@ export class QrCodeDialogComponent implements OnInit, AfterViewInit {
   @ViewChild('imageWrapper') imgWrp: ElementRef;
   @ViewChild('text') text: ElementRef;
 
+  url: string = window.location.protocol + '//' + window.location.hostname;
   private img: HTMLImageElement;
   qrCode = '';
 
-- 
GitLab