Converted input placeholders to mat-label

Various style improvements

Updated translations
This commit is contained in:
Isaac Abadi
2022-11-27 12:10:45 -05:00
parent 5a6e17edb6
commit 0efbd11d29
17 changed files with 485 additions and 318 deletions

View File

@@ -5,16 +5,19 @@
<button style="position: absolute; right: 16px; top: 8px;" mat-icon-button (click)="editing = !editing"><mat-icon>edit</mat-icon></button>
</div>
<mat-form-field class="info-field">
<input [(ngModel)]="new_file.title" matInput placeholder="Name" i18n-placeholder="Name" [disabled]="!editing">
<mat-label i18n="Name">Name</mat-label>
<input [(ngModel)]="new_file.title" matInput [disabled]="!editing">
</mat-form-field>
<mat-form-field class="info-field">
<input [(ngModel)]="new_file.url" matInput placeholder="URL" i18n-placeholder="URL" [disabled]="!editing">
<mat-label i18n="URL">URL</mat-label>
<input [(ngModel)]="new_file.url" matInput [disabled]="!editing">
<button mat-icon-button matSuffix (click)="window.open(new_file.url, '_blank')">
<mat-icon>link</mat-icon>
</button>
</mat-form-field>
<mat-form-field class="info-field">
<input [(ngModel)]="new_file.uploader" matInput placeholder="Uploader" i18n-placeholder="Uploader" [disabled]="!editing">
<mat-label i18n="Uploader">Uploader</mat-label>
<input [(ngModel)]="new_file.uploader" matInput [disabled]="!editing">
</mat-form-field>
<mat-form-field class="info-field">
<mat-label i18n="Upload date">Upload date</mat-label>
@@ -23,10 +26,12 @@
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
<mat-form-field class="info-field">
<input [(ngModel)]="new_file.thumbnailPath" matInput placeholder="Thumbnail path" i18n-placeholder="Thumbnail path" [disabled]="!editing">
<mat-label i18n="Thumbnail path">Thumbnail path</mat-label>
<input [(ngModel)]="new_file.thumbnailPath" matInput [disabled]="!editing">
</mat-form-field>
<mat-form-field class="info-field">
<input [(ngModel)]="new_file.thumbnailURL" matInput placeholder="Thumbnail URL" i18n-placeholder="Thumbnail URL" [disabled]="!editing || new_file.thumbnailPath">
<mat-label i18n="Thumbnail URL">Thumbnail URL</mat-label>
<input [(ngModel)]="new_file.thumbnailURL" matInput [disabled]="!editing || new_file.thumbnailPath">
</mat-form-field>
<mat-form-field *ngIf="initialized && postsService.categories" class="info-field">
<mat-select placeholder="Category" i18n-placeholder="Category" [value]="category" (selectionChange)="categoryChanged($event)" [compareWith]="categoryComparisonFunction" [disabled]="!editing">
@@ -39,10 +44,12 @@
</mat-select>
</mat-form-field>
<mat-form-field class="info-field">
<input type="number" [(ngModel)]="new_file.view_count" matInput placeholder="View count" i18n-placeholder="View count" [disabled]="!editing">
<mat-label i18n="View count">View count</mat-label>
<input type="number" [(ngModel)]="new_file.view_count" matInput [disabled]="!editing">
</mat-form-field>
<mat-form-field class="info-field">
<input type="number" [(ngModel)]="new_file.local_view_count" matInput placeholder="Local view count" i18n-placeholder="Local view count" [disabled]="!editing">
<mat-label i18n="Local view count">Local view count</mat-label>
<input type="number" [(ngModel)]="new_file.local_view_count" matInput [disabled]="!editing">
</mat-form-field>
<mat-divider style="margin-bottom: 16px;"></mat-divider>