30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
<form [formGroup]="form" (ngSubmit)="save()" #formDirective="ngForm" *ngIf="user">
|
|
<mat-card>
|
|
<mat-card-content>
|
|
<mat-form-field>
|
|
<input matInput formControlName="username" type="text">
|
|
</mat-form-field>
|
|
<mat-form-field>
|
|
<input matInput placeholder="{{'settings.email' | i18n}}" formControlName="email" type="email">
|
|
<mat-error *ngIf="hasError('email')">
|
|
{{'settings.email.error' | i18n}}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
<mat-form-field>
|
|
<textarea matInput placeholder="{{'settings.about' | i18n}}" formControlName="about"></textarea>
|
|
<mat-error>
|
|
{{'settings.about.error' | i18n}}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
<mat-slide-toggle (change)="darkThemeChange($event)" [checked]="user.darkTheme">
|
|
{{'settings.darkTheme' | i18n}}
|
|
</mat-slide-toggle>
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<button *ngIf="!working" mat-raised-button color="primary" [disabled]="form.invalid">
|
|
{{'settings.update' | i18n}}
|
|
</button>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
|
|
</form> |