This commit is contained in:
Lurkars 2021-03-14 20:33:34 +01:00
parent bb96636571
commit 88efd55aee
4 changed files with 8 additions and 8 deletions

View File

@ -14,8 +14,8 @@
<mat-icon>arrow_drop_down</mat-icon>
</button>
<mat-menu #menu="matMenu">
<a *ngFor="let locale of locales" mat-menu-item
(click)="setLocale(locale)">{{'locale.' + locale + '.long' | i18n}}</a>
<a *ngFor="let locale of locales" mat-menu-item (click)="setLocale(locale)">{{'locale.' + locale + '.long' |
i18n}}</a>
</mat-menu>
</ng-container>
</mat-toolbar>
@ -36,7 +36,7 @@
<a routerLink="/tokens" mat-list-item>
<mat-icon>card_giftcard</mat-icon> {{'tokens.redeem' | i18n}}
</a>
<a href="https://token.bstly.de" target="_blank" mat-list-item>
<a (click)="openExternal('https://membership.bstly.de')" mat-list-item>
<mat-icon>shopping_cart</mat-icon> {{'tokens.get' | i18n}}<mat-icon style="font-size: 1em;">open_in_new
</mat-icon>
</a>

View File

@ -63,6 +63,10 @@ export class AppComponent {
}
}
openExternal(url) {
window.open(url, '_blank');
}
@HostListener('window:resize', ['$event'])
onResize(event) {
if(event.target.innerWidth < 768) {

View File

@ -53,10 +53,6 @@ export class TokensComponent implements OnInit {
if (params.token) {
this.itemService.redeemSecret(params.token).subscribe((data: any) => {
this.update();
this.router.navigate(
['.'],
{ relativeTo: this.route }
);
}, error => {
this.form.get('token').patchValue(params.token);
if (error.status == 410) {

View File

@ -264,7 +264,7 @@
"tokens": {
".": "Tokens",
"enter": "Token eingeben",
"get": "Mitmachen",
"get": "Tokens",
"invalid": "Das Token ist leider nicht gültig.",
"provide-valid": "Bitte gebe ein gültiges Token ein.",
"redeem": "Tokens einlösen",