update token input

This commit is contained in:
_Bastler 2021-12-30 17:25:19 +01:00
parent 285ab37e10
commit 86c48ac23c

View File

@ -1,34 +1,3 @@
<form [formGroup]="form" (ngSubmit)="redeemSecret()" #formDirective="ngForm">
<mat-card>
<mat-card-header>
<mat-card-title>{{'tokens.enter' | i18n}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-error *ngIf="tokenInvalid">
{{'tokens.invalid' | i18n}}
</mat-error>
<mat-error *ngIf="tokenRedeemed">
{{'tokens.redeemed' | i18n}}
</mat-error>
<mat-form-field>
<input matInput placeholder="{{'token' | i18n}}" formControlName="token" matAutofocus>
<mat-error>
{{'tokens.provide-valid' | i18n}}
</mat-error>
</mat-form-field>
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" [disabled]="form.invalid">{{'tokens.validate' | i18n}}</button>
</mat-card-actions>
<mat-card-footer>
<a href="https://wiki.bstly.de/services/webstly#token" class="help-button"
matTooltip="{{'help-button' | i18n}}" matTooltipPosition="above" target="_blank" mat-fab color="accent">
<mat-icon>contact_support</mat-icon>
</a>
</mat-card-footer>
</mat-card>
</form>
<div *ngIf="items && items[0]"> <div *ngIf="items && items[0]">
<h2>{{'tokens.active' | i18n}}</h2> <h2>{{'tokens.active' | i18n}}</h2>
<mat-card> <mat-card>
@ -82,3 +51,34 @@
<app-quotas [quotas]="quotas"></app-quotas> <app-quotas [quotas]="quotas"></app-quotas>
</div> </div>
</div> </div>
<form [formGroup]="form" (ngSubmit)="redeemSecret()" #formDirective="ngForm">
<mat-card>
<mat-card-header>
<mat-card-title>{{'tokens.enter' | i18n}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-error *ngIf="tokenInvalid">
{{'tokens.invalid' | i18n}}
</mat-error>
<mat-error *ngIf="tokenRedeemed">
{{'tokens.redeemed' | i18n}}
</mat-error>
<mat-form-field>
<input matInput placeholder="{{'token' | i18n}}" formControlName="token" matAutofocus>
<mat-error>
{{'tokens.provide-valid' | i18n}}
</mat-error>
</mat-form-field>
</mat-card-content>
<mat-card-actions>
<button mat-raised-button color="primary" [disabled]="form.invalid">{{ (items && items[0] ? 'tokens.validate.other' : 'tokens.validate') | i18n}}</button>
</mat-card-actions>
<mat-card-footer>
<a href="https://wiki.bstly.de/services/webstly#token" class="help-button"
matTooltip="{{'help-button' | i18n}}" matTooltipPosition="above" target="_blank" mat-fab color="accent">
<mat-icon>contact_support</mat-icon>
</a>
</mat-card-footer>
</mat-card>
</form>