mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-10-28 02:38:55 -04:00
114 lines
5.3 KiB
HTML
114 lines
5.3 KiB
HTML
<app-page-header
|
|
title="Malware Blocker"
|
|
subtitle="Protect against malicious files in downloads"
|
|
/>
|
|
|
|
@if (loadError()) {
|
|
<app-empty-state
|
|
icon="tablerPlugConnectedX"
|
|
heading="Could not connect to server"
|
|
description="Failed to load settings. Please check that the server is running and try again."
|
|
>
|
|
<app-button variant="primary" size="sm" (clicked)="retry()">
|
|
Retry
|
|
</app-button>
|
|
</app-empty-state>
|
|
} @else if (loader.showSpinner()) {
|
|
<app-loading-state message="Loading settings..." />
|
|
} @else if (!loader.loading()) {
|
|
<div class="settings-form">
|
|
<app-card header="General">
|
|
<div class="form-stack">
|
|
<app-toggle label="Enabled" [formField]="mbForm.enabled"
|
|
hint="When enabled, the Malware blocker will run according to the schedule"
|
|
helpKey="malware-blocker:enabled" />
|
|
@if (mbForm.enabled().value()) {
|
|
<app-toggle label="Ignore Private Torrents" [formField]="mbForm.ignorePrivate"
|
|
hint="When enabled, private torrents will not be processed"
|
|
helpKey="malware-blocker:ignorePrivate" />
|
|
<app-toggle label="Delete Private from Client" [formField]="mbForm.deletePrivate" [forceDisabled]="mbForm.deletePrivate().disabled()"
|
|
hint="Disable this if you want to keep private torrents in the download client even if they are removed from the arrs"
|
|
helpKey="malware-blocker:deletePrivate" />
|
|
<app-toggle label="Process downloads with no content ID" [formField]="mbForm.processNoContentId"
|
|
hint="Process downloads from the queue that are not linked to any content in the arr app. Cleanuparr will not be able to trigger a search for a replacement when this happens."
|
|
helpKey="malware-blocker:processNoContentId" />
|
|
<app-toggle label="Delete if any file is blocked" featureId="delete-if-any-malware" [formField]="mbForm.deleteIfAnyFileBlocked"
|
|
hint="When enabled, the entire download will be removed if any file in it matches the blocklist. When disabled, the download is only removed when all of its files match."
|
|
helpKey="malware-blocker:deleteIfAnyFileBlocked" />
|
|
|
|
<div class="form-divider"></div>
|
|
|
|
<app-toggle label="Advanced Scheduling" [formField]="mbForm.useAdvancedScheduling"
|
|
hint="Choose between basic scheduling or advanced cron expression"
|
|
helpKey="malware-blocker:useAdvancedScheduling" />
|
|
@if (mbForm.useAdvancedScheduling().value()) {
|
|
<app-input label="Cron Expression" placeholder="0 0/5 * ? * * *" [formField]="mbForm.cronExpression"
|
|
hint="Enter a valid Quartz cron expression (e.g., "0 0/5 * ? * * *" runs every 5 minutes)"
|
|
[error]="mbForm.cronExpression().errors()[0]?.message"
|
|
helpKey="malware-blocker:cronExpression" />
|
|
} @else {
|
|
<div class="form-row">
|
|
<app-select label="Schedule Unit" [options]="scheduleUnitOptions" [formField]="mbForm.scheduleUnit"
|
|
hint="Choose the time unit for the schedule"
|
|
helpKey="malware-blocker:scheduleUnit" />
|
|
<app-select label="Every" [options]="scheduleIntervalOptions()" [formField]="mbForm.scheduleEvery"
|
|
hint="How often the job should run"
|
|
[error]="mbForm.scheduleEvery().errors()[0]?.message"
|
|
helpKey="malware-blocker:scheduleEvery" />
|
|
</div>
|
|
}
|
|
|
|
<div class="form-divider"></div>
|
|
|
|
<app-chip-input
|
|
label="Ignored Downloads"
|
|
placeholder="Add download pattern..."
|
|
hint="Downloads matching these patterns will be ignored (e.g. hash, tag, category, label, tracker)"
|
|
[formField]="mbForm.ignoredDownloads"
|
|
helpKey="malware-blocker:ignoredDownloads"
|
|
/>
|
|
}
|
|
</div>
|
|
</app-card>
|
|
|
|
@if (mbForm.enabled().value()) {
|
|
<app-accordion header="Arr Blocklists" subtitle="Per-application blocklist configuration" [(expanded)]="arrExpanded" [error]="noBlocklistError()">
|
|
@for (arr of arrFields; track arr.label) {
|
|
<div class="arr-blocklist">
|
|
<h4 class="arr-blocklist__title">{{ arr.label }}</h4>
|
|
<div class="form-stack">
|
|
<app-toggle
|
|
label="Enabled"
|
|
[formField]="arr.field.enabled"
|
|
[hint]="'When enabled, the ' + arr.label + ' blocklist will be used for content filtering'"
|
|
/>
|
|
@if (arr.field.enabled().value()) {
|
|
<app-input
|
|
label="Blocklist Path"
|
|
[formField]="arr.field.blocklistPath"
|
|
placeholder="Local file path or URL"
|
|
hint="Path to the blocklist file or URL"
|
|
[error]="arr.field.blocklistPath().errors()[0]?.message"
|
|
/>
|
|
<app-select
|
|
label="Blocklist Type"
|
|
[options]="blocklistTypeOptions"
|
|
[formField]="arr.field.blocklistType"
|
|
hint="Type of blocklist: Blacklist (block matches) or Whitelist (only allow matches)"
|
|
/>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</app-accordion>
|
|
|
|
}
|
|
|
|
<div class="form-actions">
|
|
<app-button variant="primary" [glowing]="dirty()" [loading]="saving()" [disabled]="saving() || saved() || hasErrors()" (clicked)="save()">
|
|
{{ saved() ? 'Saved!' : 'Save Settings' }}
|
|
</app-button>
|
|
</div>
|
|
</div>
|
|
}
|