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 9acd0f06ea76e50c43b8becd0c9f2d8b3002032b..1c20c59c8a7f1d408b94b65306833a1ee0190f4c 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 @@ -5,7 +5,7 @@ </button> <div> <h2>frag.jetzt</h2> - <h2>{{'qr-dialog.session' | translate}}: {{key.slice(0, 4)}} {{key.slice(4, 8)}}</h2> + <h2>{{'qr-dialog.session' | translate}}: {{key}}</h2> </div> <qrcode [qrdata]="data" [width]="qrWidth" [errorCorrectionLevel]="'M'"></qrcode> </div> diff --git a/src/app/components/shared/header/header.component.ts b/src/app/components/shared/header/header.component.ts index b765ae30537609e658e9ce8a5878c3d898463086..8b4c7eff7ba38183fa984abad58daa84f0731c00 100644 --- a/src/app/components/shared/header/header.component.ts +++ b/src/app/components/shared/header/header.component.ts @@ -20,6 +20,7 @@ import { RemindOfTokensComponent } from '../../participant/_dialogs/remind-of-to import { QrCodeDialogComponent } from '../_dialogs/qr-code-dialog/qr-code-dialog.component'; import { BonusTokenService } from '../../../services/http/bonus-token.service'; import { MotdService } from '../../../services/http/motd.service'; +import { RoomService } from '../../../services/http/room.service'; @Component({ selector: 'app-header', @@ -97,8 +98,10 @@ export class HeaderComponent implements OnInit { /* segments gets all parts of the url */ const segments = this.router.parseUrl(this.router.url).root.children.primary.segments; if (segments && segments.length > 2) { - this.shortId = segments[2].toString(); - localStorage.setItem('shortId', this.shortId); + if (!segments[2].path.includes('%')) { + this.shortId = segments[2].path; + localStorage.setItem('shortId', this.shortId); + } } } }); @@ -240,7 +243,7 @@ export class HeaderComponent implements OnInit { }); const url = this.getURL(); dialogRef.componentInstance.data = url; - dialogRef.componentInstance.key = url.slice(-8); + dialogRef.componentInstance.key = this.shortId; dialogRef.afterClosed().subscribe(res => { Rescale.exitFullscreen(); });