diff --git a/src-ui/src/app/components/common/page-header/page-header.component.html b/src-ui/src/app/components/common/page-header/page-header.component.html
index 99e1d426b..05df7dcd5 100644
--- a/src-ui/src/app/components/common/page-header/page-header.component.html
+++ b/src-ui/src/app/components/common/page-header/page-header.component.html
@@ -1,7 +1,7 @@
- {{title}}
+ {{title()}}
@if (id()) {
@if (copied()) {
diff --git a/src-ui/src/app/components/common/page-header/page-header.component.ts b/src-ui/src/app/components/common/page-header/page-header.component.ts
index 66cef548f..ec209bf2e 100644
--- a/src-ui/src/app/components/common/page-header/page-header.component.ts
+++ b/src-ui/src/app/components/common/page-header/page-header.component.ts
@@ -1,5 +1,5 @@
import { Clipboard } from '@angular/cdk/clipboard'
-import { Component, Input, inject, input, signal } from '@angular/core'
+import { Component, effect, inject, input, signal } from '@angular/core'
import { Title } from '@angular/platform-browser'
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -21,19 +21,14 @@ export class PageHeaderComponent {
readonly info = input(undefined)
readonly infoLink = input(undefined)
readonly loading = input(false)
+ readonly title = input('')
readonly copied = signal(false)
private copyTimeout: any
- private readonly titleSignal = signal('')
-
- @Input()
- set title(title: string) {
- this.titleSignal.set(title)
- this.titleService.setTitle(`${title} - ${environment.appTitle}`)
- }
-
- get title() {
- return this.titleSignal()
+ constructor() {
+ effect(() => {
+ this.titleService.setTitle(`${this.title()} - ${environment.appTitle}`)
+ })
}
public copyID() {
diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts
index 101406990..e97cfd37a 100644
--- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts
@@ -229,9 +229,9 @@ describe('ProfileEditDialogComponent', () => {
const copySpy = jest.spyOn(clipboard, 'copy')
component.copyAuthToken()
expect(copySpy).toHaveBeenCalledWith(profile.auth_token)
- expect(component.copied).toBeTruthy()
+ expect(component.copied()).toBeTruthy()
tick(3000)
- expect(component.copied).toBeFalsy()
+ expect(component.copied()).toBeFalsy()
}))
it('should support generate token, display error if needed', () => {
diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts
index f8bd68cbc..812ae34f6 100644
--- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts
+++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts
@@ -140,7 +140,7 @@ export class ProfileEditDialogComponent
onEmailChange(): void {
this.showEmailConfirm.set(this.currentEmail !== this.newEmail)
- if (this.showEmailConfirm) {
+ if (this.showEmailConfirm()) {
this.form.get('email_confirm').enable()
if (this.newEmail !== this.emailConfirm) {
this.setFieldError('email_confirm', $localize`Emails must match`)
@@ -167,7 +167,7 @@ export class ProfileEditDialogComponent
onPasswordChange(): void {
this.showPasswordConfirm.set(this.currentPassword !== this.newPassword)
- if (this.showPasswordConfirm) {
+ if (this.showPasswordConfirm()) {
this.form.get('password_confirm').enable()
if (this.newPassword !== this.passwordConfirm) {
this.setFieldError('password_confirm', $localize`Passwords must match`)
diff --git a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts
index 113cd65a3..991d79a8d 100644
--- a/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts
+++ b/src-ui/src/app/components/common/share-link-bundle-manage-dialog/share-link-bundle-manage-dialog.component.spec.ts
@@ -97,7 +97,7 @@ describe('ShareLinkBundleManageDialogComponent', () => {
expect(service.listAllBundles).toHaveBeenCalledTimes(1)
expect(component.bundles).toEqual(bundles)
- expect(component.loading).toBe(false)
+ expect(component.loading()).toBe(false)
expect(component.error).toBeNull()
tick(5000)
@@ -115,7 +115,7 @@ describe('ShareLinkBundleManageDialogComponent', () => {
expect(component.error).toContain('Failed to load share link bundles.')
expect(toastService.showError).toHaveBeenCalled()
- expect(component.loading).toBe(false)
+ expect(component.loading()).toBe(false)
tick(5000)
expect(service.listAllBundles).toHaveBeenCalledTimes(2)
@@ -165,7 +165,7 @@ describe('ShareLinkBundleManageDialogComponent', () => {
expect.stringContaining('deleted.')
)
expect(service.listAllBundles).toHaveBeenCalledTimes(2)
- expect(component.loading).toBe(false)
+ expect(component.loading()).toBe(false)
}))
it('handles delete errors gracefully', fakeAsync(() => {
@@ -179,7 +179,7 @@ describe('ShareLinkBundleManageDialogComponent', () => {
tick()
expect(toastService.showError).toHaveBeenCalled()
- expect(component.loading).toBe(false)
+ expect(component.loading()).toBe(false)
}))
it('retries bundle build and replaces existing entry', fakeAsync(() => {
diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
index 5422c875e..badd44b5d 100644
--- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
+++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
@@ -3,7 +3,7 @@
- @if (!status) {
+ @if (!status()) {
@@ -21,25 +21,25 @@
- Paperless-ngx Version
-
- {{status.pngx_version}}
- @if (versionMismatch) {
+ {{status().pngx_version}}
+ @if (versionMismatch()) {
}
Frontend version: {{frontendVersion}}
- Backend version: {{status.pngx_version}}
+ Backend version: {{status().pngx_version}}
- Install Type
- - {{status.install_type}}
+ - {{status().install_type}}
- Server OS
- - {{status.server_os}}
+ - {{status().server_os}}
- Media Storage
-
-
- {{status.storage.available | fileSize}} available ({{status.storage.total | fileSize}} total)
+
+ {{status().storage.available | fileSize}} available ({{status().storage.total | fileSize}} total)
@@ -54,39 +54,39 @@
- Type
- - {{status.database.type}}
+ - {{status().database.type}}
- Status
-
- @if (status.database.status === 'OK') {
- {{status.database.url}}
+ @if (status().database.status === 'OK') {
+ {{status().database.url}}
} @else {
- {{status.database.url}}: {{status.database.error}}
+ {{status().database.url}}: {{status().database.error}}
}
- Migration Status
-