diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html index ebd5b1fa8..8f8ecf1f1 100644 --- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html +++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.html @@ -11,8 +11,8 @@
- @if (documentID) { - + @if (documentID()) { + }
@@ -21,7 +21,7 @@
- @if (showPDFNote) { + @if (showPDFNote()) {

Note that only PDFs will be rotated.

} diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts index f33f2638c..6e0bca287 100644 --- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts @@ -28,7 +28,7 @@ describe('RotateConfirmDialogComponent', () => { }) it('should support rotating the image', () => { - component.documentID = 1 + component.documentID.set(1) fixture.detectChanges() component.rotate() fixture.detectChanges() diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts index 97030e4ae..18d844ef9 100644 --- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts +++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts @@ -13,33 +13,12 @@ import { ConfirmDialogComponent } from '../confirm-dialog.component' export class RotateConfirmDialogComponent extends ConfirmDialogComponent { documentService = inject(DocumentService) - private documentIDSignal = signal(undefined) - private showPDFNoteSignal = signal(true) - private rotationSignal = signal(0) - - public get documentID(): number { - return this.documentIDSignal() - } - - public set documentID(documentID: number) { - this.documentIDSignal.set(documentID) - } - - public get showPDFNote(): boolean { - return this.showPDFNoteSignal() - } - - public set showPDFNote(showPDFNote: boolean) { - this.showPDFNoteSignal.set(showPDFNote) - } - - // animation is better if we dont normalize yet - public get rotation(): number { - return this.rotationSignal() - } + readonly documentID = signal(undefined) + readonly showPDFNote = signal(true) + readonly rotation = signal(0) public get degrees(): number { - let degrees = this.rotation % 360 + let degrees = this.rotation() % 360 if (degrees < 0) degrees += 360 return degrees } @@ -49,6 +28,6 @@ export class RotateConfirmDialogComponent extends ConfirmDialogComponent { } rotate(clockwise: boolean = true) { - this.rotationSignal.update((rotation) => rotation + (clockwise ? 90 : -90)) + this.rotation.update((rotation) => rotation + (clockwise ? 90 : -90)) } } diff --git a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html index feb834035..af99a5f91 100644 --- a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html +++ b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html @@ -25,8 +25,8 @@ @@ -23,10 +23,10 @@