Show current icon on edit feed
This commit is contained in:
parent
19caa801b3
commit
80f1a4d99e
@ -14,21 +14,28 @@
|
|||||||
<mat-form-field appearance="standard" class="input">
|
<mat-form-field appearance="standard" class="input">
|
||||||
<mat-label>Gesuchte Stichworte</mat-label>
|
<mat-label>Gesuchte Stichworte</mat-label>
|
||||||
<input matInput formControlName="keywords" placeholder="Spiel,Spaß,Schokolade" required>
|
<input matInput formControlName="keywords" placeholder="Spiel,Spaß,Schokolade" required>
|
||||||
<mat-error *ngIf="feedForm.get('keywords').hasError('invalidKeywords')">Maximal 3 Wörter und jedes Wort mindestens 3 Zeichen</mat-error>
|
<mat-error *ngIf="feedForm.get('keywords').hasError('invalidKeywords')">Maximal 3 Wörter und jedes Wort
|
||||||
|
mindestens 3 Zeichen
|
||||||
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-checkbox formControlName="match_all_keywords">Alle Stichworte müssen enthalten sein</mat-checkbox>
|
<mat-checkbox formControlName="match_all_keywords">Alle Stichworte müssen enthalten sein</mat-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-row text-left">
|
<div class="row" style="padding: 10px 0">
|
||||||
<mat-form-field class="col">
|
<div class="col-auto" *ngIf="this.id">
|
||||||
<ngx-mat-file-input accept=".png,.svg" formControlName="icon" placeholder="Optionales Icon"
|
<img class="feed-icon" src="{{this.icon}}" alt="Feed-Icon">
|
||||||
></ngx-mat-file-input>
|
</div>
|
||||||
<mat-icon matSuffix>folder</mat-icon>
|
<div class="col">
|
||||||
<mat-error *ngIf="feedForm.get('icon').hasError('maxContentSize')">
|
<mat-form-field class="col">
|
||||||
Die maximale Dateigröße ist {{feedForm.get('icon')?.getError('maxContentSize').maxSize | byteFormat}}
|
<ngx-mat-file-input accept=".png,.svg" formControlName="icon" placeholder="Optionales Icon"
|
||||||
({{feedForm.get('icon')?.getError('maxContentSize').actualSize
|
></ngx-mat-file-input>
|
||||||
| byteFormat}})
|
<mat-icon matSuffix>folder</mat-icon>
|
||||||
</mat-error>
|
<mat-error *ngIf="feedForm.get('icon').hasError('maxContentSize')">
|
||||||
</mat-form-field>
|
Die maximale Dateigröße ist {{feedForm.get('icon')?.getError('maxContentSize').maxSize | byteFormat}}
|
||||||
|
({{feedForm.get('icon')?.getError('maxContentSize').actualSize
|
||||||
|
| byteFormat}})
|
||||||
|
</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-row text-left">
|
<div class="input-row text-left">
|
||||||
<mat-slide-toggle color="primary" formControlName="active">Feed als aktiv markieren</mat-slide-toggle>
|
<mat-slide-toggle color="primary" formControlName="active">Feed als aktiv markieren</mat-slide-toggle>
|
||||||
|
|||||||
@ -59,6 +59,7 @@ export class EditierenComponent implements OnInit {
|
|||||||
(data: any) => {
|
(data: any) => {
|
||||||
this.url = data.url;
|
this.url = data.url;
|
||||||
this.active = data.active;
|
this.active = data.active;
|
||||||
|
this.icon = data.icon;
|
||||||
this.keywords = data.keywords;
|
this.keywords = data.keywords;
|
||||||
this.match_all_keywords = data.match_all_keywords;
|
this.match_all_keywords = data.match_all_keywords;
|
||||||
this.feedForm.patchValue({
|
this.feedForm.patchValue({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user