Add app status setting to general settings (#433)

This commit is contained in:
Flaminel
2026-02-12 23:12:26 +02:00
committed by GitHub
parent 6570f74b7e
commit 40f108d7ca
12 changed files with 1381 additions and 6 deletions

View File

@@ -49,6 +49,7 @@ export class DocumentationService {
'httpCertificateValidation': 'http-certificate-validation',
'searchEnabled': 'search-enabled',
'searchDelay': 'search-delay',
'statusCheckEnabled': 'status-check',
'log.level': 'log-level',
'log.rollingSizeMB': 'rolling-size-mb',
'log.retainedFileCount': 'retained-file-count',

View File

@@ -25,6 +25,9 @@
<app-toggle label="Display Support Banner" [(checked)]="displaySupportBanner"
hint="Show the support section on the dashboard with links to GitHub and sponsors"
helpKey="general:displaySupportBanner" />
<app-toggle label="Status Check" [(checked)]="statusCheckEnabled"
hint="When enabled, Cleanuparr will periodically check for new versions. Disable this if your environment has restricted outbound network access."
helpKey="general:statusCheckEnabled" />
<div class="form-divider"></div>

View File

@@ -62,6 +62,7 @@ export class GeneralSettingsComponent implements OnInit, HasPendingChanges {
readonly httpCertificateValidation = signal<unknown>(CertificateValidationType.Enabled);
readonly searchEnabled = signal(true);
readonly searchDelay = signal<number | null>(5);
readonly statusCheckEnabled = signal(true);
readonly ignoredDownloads = signal<string[]>([]);
// Logging
@@ -165,6 +166,7 @@ export class GeneralSettingsComponent implements OnInit, HasPendingChanges {
this.httpCertificateValidation.set(config.httpCertificateValidation);
this.searchEnabled.set(config.searchEnabled);
this.searchDelay.set(config.searchDelay);
this.statusCheckEnabled.set(config.statusCheckEnabled);
this.ignoredDownloads.set(config.ignoredDownloads ?? []);
if (config.log) {
this.logLevel.set(config.log.level);
@@ -200,6 +202,7 @@ export class GeneralSettingsComponent implements OnInit, HasPendingChanges {
httpCertificateValidation: this.httpCertificateValidation() as CertificateValidationType,
searchEnabled: this.searchEnabled(),
searchDelay: this.searchDelay() ?? 5,
statusCheckEnabled: this.statusCheckEnabled(),
ignoredDownloads: this.ignoredDownloads(),
log: {
level: this.logLevel() as LogEventLevel,
@@ -237,6 +240,7 @@ export class GeneralSettingsComponent implements OnInit, HasPendingChanges {
httpCertificateValidation: this.httpCertificateValidation(),
searchEnabled: this.searchEnabled(),
searchDelay: this.searchDelay(),
statusCheckEnabled: this.statusCheckEnabled(),
ignoredDownloads: this.ignoredDownloads(),
logLevel: this.logLevel(),
logRollingSizeMB: this.logRollingSizeMB(),

View File

@@ -18,6 +18,7 @@ export interface GeneralConfig {
httpCertificateValidation: CertificateValidationType;
searchEnabled: boolean;
searchDelay: number;
statusCheckEnabled: boolean;
log?: LoggingConfig;
ignoredDownloads: string[];
}