chore(ui): clear eslint angular style guide bucket
Rename reader dialog outputs away from native DOM event names and convert the menu item component to an element selector so the remaining Angular style-guide lint rules are satisfied without changing behavior. Validation: just ui lint
This commit is contained in:
@@ -14,7 +14,7 @@ import {UrlHelperService} from '../../../../shared/service/url-helper.service';
|
||||
})
|
||||
export class ReaderBookMetadataDialogComponent {
|
||||
@Input() book: Book | null = null;
|
||||
@Output() close = new EventEmitter<void>();
|
||||
@Output() closed = new EventEmitter<void>();
|
||||
|
||||
private urlHelperService = inject(UrlHelperService);
|
||||
private readonly t = inject(TranslocoService);
|
||||
|
||||
@@ -27,8 +27,8 @@ export interface NoteDialogResult {
|
||||
})
|
||||
export class ReaderNoteDialogComponent implements OnChanges {
|
||||
@Input() data: NoteDialogData | null = null;
|
||||
@Output() save = new EventEmitter<NoteDialogResult>();
|
||||
@Output() cancel = new EventEmitter<void>();
|
||||
@Output() saved = new EventEmitter<NoteDialogResult>();
|
||||
@Output() cancelled = new EventEmitter<void>();
|
||||
|
||||
noteContent = '';
|
||||
selectedColor = '#FFC107';
|
||||
@@ -55,7 +55,7 @@ export class ReaderNoteDialogComponent implements OnChanges {
|
||||
|
||||
onSave(): void {
|
||||
if (this.noteContent.trim()) {
|
||||
this.save.emit({
|
||||
this.saved.emit({
|
||||
noteContent: this.noteContent.trim(),
|
||||
color: this.selectedColor
|
||||
});
|
||||
@@ -63,7 +63,7 @@ export class ReaderNoteDialogComponent implements OnChanges {
|
||||
}
|
||||
|
||||
onCancel(): void {
|
||||
this.cancel.emit();
|
||||
this.cancelled.emit();
|
||||
}
|
||||
|
||||
selectColor(color: string): void {
|
||||
|
||||
@@ -25,7 +25,7 @@ export class ReaderSettingsDialogComponent implements OnInit {
|
||||
@Input() viewManager!: ReaderViewManagerService;
|
||||
@Input() bookId!: number;
|
||||
|
||||
@Output() close = new EventEmitter<void>();
|
||||
@Output() closed = new EventEmitter<void>();
|
||||
|
||||
activeTab: 'theme' | 'typography' | 'layout' = 'theme';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ interface ShortcutGroup {
|
||||
styleUrls: ['./shortcuts-help.component.scss']
|
||||
})
|
||||
export class EbookShortcutsHelpComponent {
|
||||
@Output() close = new EventEmitter<void>();
|
||||
@Output() closed = new EventEmitter<void>();
|
||||
|
||||
private readonly t = inject(TranslocoService);
|
||||
|
||||
@@ -68,7 +68,7 @@ export class EbookShortcutsHelpComponent {
|
||||
isMobile = window.innerWidth < 768;
|
||||
|
||||
onClose(): void {
|
||||
this.close.emit();
|
||||
this.closed.emit();
|
||||
}
|
||||
|
||||
onOverlayClick(event: MouseEvent): void {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<app-reader-quick-settings
|
||||
[stateService]="stateService"
|
||||
[bookId]="bookId"
|
||||
(close)="showQuickSettings = false"
|
||||
(closed)="showQuickSettings = false"
|
||||
(openFullSettings)="showControls = true">
|
||||
</app-reader-quick-settings>
|
||||
}
|
||||
@@ -55,14 +55,14 @@
|
||||
[stateService]="stateService"
|
||||
[viewManager]="viewManager"
|
||||
[bookId]="bookId"
|
||||
(close)="showControls = false">
|
||||
(closed)="showControls = false">
|
||||
</app-settings-dialog>
|
||||
}
|
||||
|
||||
@if (showMetadata) {
|
||||
<app-reader-book-metadata-dialog
|
||||
[book]="book"
|
||||
(close)="showMetadata = false"
|
||||
(closed)="showMetadata = false"
|
||||
></app-reader-book-metadata-dialog>
|
||||
}
|
||||
|
||||
@@ -78,12 +78,12 @@
|
||||
@if (noteDialogState().visible) {
|
||||
<app-reader-note-dialog
|
||||
[data]="noteDialogState().data"
|
||||
(save)="onNoteSave($event)"
|
||||
(cancel)="onNoteCancel()"
|
||||
(saved)="onNoteSave($event)"
|
||||
(cancelled)="onNoteCancel()"
|
||||
></app-reader-note-dialog>
|
||||
}
|
||||
|
||||
@if (showShortcutsHelp) {
|
||||
<app-ebook-shortcuts-help (close)="showShortcutsHelp = false"></app-ebook-shortcuts-help>
|
||||
<app-ebook-shortcuts-help (closed)="showShortcutsHelp = false"></app-ebook-shortcuts-help>
|
||||
}
|
||||
</div>
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@ import {EbookViewerSetting} from '../../../../book/model/book.model';
|
||||
export class ReaderQuickSettingsComponent {
|
||||
@Input() stateService!: ReaderStateService;
|
||||
@Input() bookId!: number;
|
||||
@Output() close = new EventEmitter<void>();
|
||||
@Output() closed = new EventEmitter<void>();
|
||||
@Output() openFullSettings = new EventEmitter<void>();
|
||||
|
||||
constructor(private bookService: BookService) {}
|
||||
@@ -73,11 +73,11 @@ export class ReaderQuickSettingsComponent {
|
||||
}
|
||||
|
||||
onOpenFullSettings(): void {
|
||||
this.close.emit();
|
||||
this.closed.emit();
|
||||
this.openFullSettings.emit();
|
||||
}
|
||||
|
||||
onOverlayClick(): void {
|
||||
this.close.emit();
|
||||
this.closed.emit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user