From b3f0985ed4795dbfd417bb5bc9b5919acf64b7d7 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 8 Jul 2026 19:28:46 -0700 Subject: [PATCH] More --- .../rotate-confirm-dialog.component.html | 6 +-- .../rotate-confirm-dialog.component.spec.ts | 2 +- .../rotate-confirm-dialog.component.ts | 31 +++---------- .../mail-account-edit-dialog.component.html | 4 +- .../mail-account-edit-dialog.component.ts | 18 +++----- .../email-document-dialog.component.html | 8 ++-- .../email-document-dialog.component.spec.ts | 17 +++---- .../email-document-dialog.component.ts | 44 +++++-------------- .../page-header/page-header.component.spec.ts | 1 + .../share-links-dialog.component.spec.ts | 10 ++--- .../share-links-dialog.component.ts | 4 +- .../common/tag/tag.component.spec.ts | 11 ++--- .../document-detail.component.ts | 10 +++-- .../bulk-editor/bulk-editor.component.ts | 6 +-- .../document-card-large.component.spec.ts | 44 ++++++++++--------- .../document-card-small.component.spec.ts | 21 ++++++--- .../manage/mail/mail.component.spec.ts | 2 +- .../components/manage/mail/mail.component.ts | 2 +- .../processed-mail-dialog.component.html | 2 +- .../processed-mail-dialog.component.spec.ts | 2 +- .../processed-mail-dialog.component.ts | 15 ++----- 21 files changed, 108 insertions(+), 152 deletions(-) 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 @@