53 lines
2.5 KiB
HTML
53 lines
2.5 KiB
HTML
<app-navigation [activeLink]="'settings'"></app-navigation>
|
|
<div class="content">
|
|
<div class="text-center">
|
|
<p class="font-weight-bold">RSS-Feed erstellen</p>
|
|
<form [formGroup]="feedForm" enctype="multipart/form-data">
|
|
<div class=" input-row">
|
|
<mat-form-field appearance="standard" class="input">
|
|
<mat-label>Vollständige URL des RSS-Feeds</mat-label>
|
|
<input matInput type="url" formControlName="url" placeholder="https://rss.orf.at/news.xml" required>
|
|
<mat-error *ngIf="feedForm.get('url').hasError('invalidURLFormat')">Geben Sie eine valide URL ein.</mat-error>
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="input-row text-left">
|
|
<mat-form-field appearance="standard" class="input">
|
|
<mat-label>Gesuchte Stichworte</mat-label>
|
|
<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-form-field>
|
|
<mat-checkbox formControlName="match_all_keywords">Alle Stichworte müssen enthalten sein</mat-checkbox>
|
|
</div>
|
|
<div class="row" style="padding: 10px 0">
|
|
<div class="col-auto" *ngIf="this.id">
|
|
<img class="feed-icon" src="{{this.icon}}" alt="Feed-Icon">
|
|
</div>
|
|
<div class="col">
|
|
<mat-form-field class="col">
|
|
<ngx-mat-file-input accept=".png,.svg" formControlName="icon" placeholder="Optionales Icon"
|
|
></ngx-mat-file-input>
|
|
<mat-icon matSuffix>folder</mat-icon>
|
|
<mat-error *ngIf="feedForm.get('icon').hasError('maxContentSize')">
|
|
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 class="input-row text-left">
|
|
<mat-slide-toggle color="primary" formControlName="active">Feed als aktiv markieren</mat-slide-toggle>
|
|
</div>
|
|
<div class="input-row margin-auto einstellungen_buttons_wrapper">
|
|
<button routerLink="/einstellungen" mat-raised-button>Abbrechen</button>
|
|
<button mat-raised-button (click)="saveFeed(feedForm.value)" [disabled]="feedForm.invalid">
|
|
<mat-icon>save</mat-icon>
|
|
Speichern
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|