82 lines
3.3 KiB
HTML
82 lines
3.3 KiB
HTML
<ng-container *transloco="let t; prefix: 'settingsMeta.publicReviews'">
|
|
<div class="settings-card">
|
|
<div class="section-header">
|
|
<h3 class="section-title">
|
|
<i class="pi pi-star"></i>
|
|
{{ t('sectionTitle') }}
|
|
</h3>
|
|
<p class="section-description">
|
|
{{ t('sectionDesc') }}
|
|
</p>
|
|
</div>
|
|
|
|
<div class="section-body">
|
|
<div class="setting-item">
|
|
<div class="setting-header">
|
|
<p-toggleswitch
|
|
[formControl]="form.controls.downloadEnabled"
|
|
(onChange)="onPublicReviewsToggle($event.checked)">
|
|
</p-toggleswitch>
|
|
<span class="setting-label">{{ t('downloadLabel') }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
@if (form.controls.downloadEnabled.value) {
|
|
<div class="setting-item">
|
|
<div class="setting-header">
|
|
<p-toggleswitch
|
|
[formControl]="form.controls.autoDownloadEnabled"
|
|
(onChange)="onAutoDownloadToggle($event.checked)">
|
|
</p-toggleswitch>
|
|
<span class="setting-label">{{ t('autoDownloadLabel') }}</span>
|
|
</div>
|
|
<p class="setting-description">{{ t('autoDownloadDesc') }}</p>
|
|
</div>
|
|
|
|
<div class="setting-item">
|
|
<div class="setting-header-standalone">
|
|
<span class="setting-label">{{ t('reviewSources') }}</span>
|
|
</div>
|
|
<p class="setting-description">{{ t('reviewSourcesDesc') }}</p>
|
|
@if (providerControls.length > 0) {
|
|
<div class="setting-options">
|
|
<div class="providers-grid">
|
|
@for (provider of providerControls; track provider.controls.provider.value) {
|
|
<div class="provider-item">
|
|
<div class="provider-row">
|
|
<p-toggleswitch
|
|
[formControl]="provider.controls.enabled"
|
|
(onChange)="onProviderToggle(provider.controls.provider.value, $event.checked)">
|
|
</p-toggleswitch>
|
|
<span class="provider-label">{{ provider.controls.provider.value }}</span>
|
|
</div>
|
|
@if (provider.controls.enabled.value) {
|
|
<div class="max-reviews-control">
|
|
<label class="max-reviews-label" [for]="'public-review-max-reviews-' + provider.controls.provider.value">{{ t('maxLabel') }}</label>
|
|
<input
|
|
[id]="'public-review-max-reviews-' + provider.controls.provider.value"
|
|
type="number"
|
|
class="max-reviews-input"
|
|
min="1"
|
|
max="10"
|
|
[formControl]="provider.controls.maxReviews"
|
|
(blur)="onMaxReviewsChange(provider.controls.provider.value, provider.controls.maxReviews.value)"
|
|
[title]="t('maxTooltip')">
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
} @else {
|
|
<div class="no-providers-message">
|
|
<i class="pi pi-exclamation-triangle"></i>
|
|
<span>{{ t('noProviders') }}</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</ng-container>
|