chore(ui): clear eslint interaction accessibility bucket
Add keyboard handlers and focus support to clickable UI affordances across reader dialogs, metadata views, cards, and layout controls. Keep the existing click behavior intact while making non-button elements operable from the keyboard and clearing the remaining template interaction accessibility backlog. Validation: just ui lint
This commit is contained in:
+4
-1
@@ -215,7 +215,10 @@
|
||||
@if (testConnectionResult) {
|
||||
<div class="test-results-toggle"
|
||||
[style.border-radius]="showTestDetails ? '6px 6px 0 0' : '6px'"
|
||||
(click)="showTestDetails = !showTestDetails">
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="showTestDetails = !showTestDetails"
|
||||
(keydown.enter)="showTestDetails = !showTestDetails">
|
||||
@if (testConnectionResult.success) {
|
||||
<i class="pi pi-check-circle" style="color: var(--p-green-500);"></i>
|
||||
<span>{{ t('testConnection.passed') }}</span>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="author-card" [class.selected]="isSelected" (click)="onCardClick($event)">
|
||||
<div class="author-card" [class.selected]="isSelected" role="button" tabindex="0" (click)="onCardClick($event)" (keydown.enter)="onCardClick($event)">
|
||||
<div class="cover-container" [ngClass]="{'loaded': isImageLoaded}">
|
||||
@if (hasPhoto) {
|
||||
<img
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="toolbar-actions">
|
||||
<div class="toolbar-icons">
|
||||
@if (isFilterActive) {
|
||||
<a class="topbar-items topbar-item" (click)="clearFilter()">
|
||||
<a class="topbar-items topbar-item" role="button" tabindex="0" (click)="clearFilter()" (keydown.enter)="clearFilter()">
|
||||
<i
|
||||
class="pi pi-filter-slash filter-clear-icon"
|
||||
[pTooltip]="t('tooltip.clearFilters')"
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
@if (currentViewMode === 'table') {
|
||||
<div>
|
||||
<a class="topbar-items topbar-item" (click)="columnPopover.toggle($event)">
|
||||
<a class="topbar-items topbar-item" role="button" tabindex="0" (click)="columnPopover.toggle($event)" (keydown.enter)="columnPopover.toggle($event)">
|
||||
<i
|
||||
class="pi pi-eye"
|
||||
[pTooltip]="t('tooltip.visibleColumns')"
|
||||
@@ -94,7 +94,10 @@
|
||||
<div>
|
||||
<a
|
||||
class="topbar-items topbar-item"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="seriesCollapseOverlay.toggle($event)"
|
||||
(keydown.enter)="seriesCollapseOverlay.toggle($event)"
|
||||
[pTooltip]="t('tooltip.displaySettings')"
|
||||
tooltipPosition="top">
|
||||
<i class="pi pi-cog"></i>
|
||||
@@ -165,7 +168,7 @@
|
||||
</div>
|
||||
|
||||
<div class="sort-button-wrapper">
|
||||
<a class="topbar-items topbar-item" (click)="sortPopover.toggle($event)">
|
||||
<a class="topbar-items topbar-item" role="button" tabindex="0" (click)="sortPopover.toggle($event)" (keydown.enter)="sortPopover.toggle($event)">
|
||||
<i
|
||||
class="pi pi-sort"
|
||||
[pTooltip]="t('tooltip.selectSorting')"
|
||||
@@ -186,7 +189,7 @@
|
||||
</p-popover>
|
||||
</div>
|
||||
|
||||
<a class="topbar-items topbar-item" (click)="toggleTableGrid()">
|
||||
<a class="topbar-items topbar-item" role="button" tabindex="0" (click)="toggleTableGrid()" (keydown.enter)="toggleTableGrid()">
|
||||
<i
|
||||
[ngClass]="viewIcon"
|
||||
[pTooltip]="t('tooltip.toggleView')"
|
||||
@@ -251,7 +254,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<a class="topbar-items topbar-item" (click)="toggleSidebar()">
|
||||
<a class="topbar-items topbar-item" role="button" tabindex="0" (click)="toggleSidebar()" (keydown.enter)="toggleSidebar()">
|
||||
<i
|
||||
[ngClass]="showFilter() ? 'pi pi-angle-double-right' : 'pi pi-angle-double-left'"
|
||||
[pTooltip]="t('tooltip.toggleSidebar')"
|
||||
@@ -449,7 +452,10 @@
|
||||
@if (showFilter()) {
|
||||
<div
|
||||
class="mobile-filter-mask"
|
||||
(click)="toggleSidebar()">
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="toggleSidebar()"
|
||||
(keydown.enter)="toggleSidebar()">
|
||||
</div>
|
||||
<app-book-filter
|
||||
[showFilter]="showFilter()"
|
||||
|
||||
+7
-1
@@ -1,6 +1,9 @@
|
||||
<div class="book-card"
|
||||
[class.selected]="isSelected"
|
||||
(click)="onCardClick($event)">
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onCardClick($event)"
|
||||
(keydown.enter)="onCardClick($event)">
|
||||
|
||||
<div class="cover-container" [ngClass]="{ 'center-info-btn': _isSeriesViewActive || !hasDigitalFile(), 'loaded': isImageLoaded, 'audiobook-cover': _isAudiobook, 'square-library-cover': useSquareCovers }">
|
||||
<img
|
||||
@@ -92,6 +95,9 @@
|
||||
[pTooltip]="readStatusTooltip"
|
||||
tooltipPosition="bottom"
|
||||
(click)="toggleReadStatusMenu($event, readStatusMenu)"
|
||||
(keydown.enter)="toggleReadStatusMenu($event, readStatusMenu)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
[attr.aria-label]="'book.card.alt.readStatusMenu' | transloco">
|
||||
<i [class]="_readStatusIcon" style="font-size: 0.9rem"></i>
|
||||
</div>
|
||||
|
||||
+4
-1
@@ -41,11 +41,14 @@
|
||||
<div
|
||||
*cdkVirtualFor="let filter of filters; trackBy: trackByFilter"
|
||||
class="filter-row"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
[ngClass]="{
|
||||
'active': activeFilters[filterType]?.includes(getFilterValueId(filter)),
|
||||
'active-not': activeFilters[filterType]?.includes(getFilterValueId(filter)) && selectedFilterMode === 'not'
|
||||
}"
|
||||
(click)="handleFilterClick(filterType, getFilterValueId(filter))">
|
||||
(click)="handleFilterClick(filterType, getFilterValueId(filter))"
|
||||
(keydown.enter)="handleFilterClick(filterType, getFilterValueId(filter))">
|
||||
<span class="filter-value-text">{{ getFilterValueDisplay(filter) }}</span>
|
||||
<p-badge class="filter-value-badge" [value]="filter.bookCount"></p-badge>
|
||||
</div>
|
||||
|
||||
+7
-1
@@ -41,7 +41,13 @@
|
||||
}
|
||||
} @else if (books.length > 0) {
|
||||
@for (book of books; track book; let idx = $index) {
|
||||
<div class="search-dropdown-item" [class.active]="activeIndex === idx" (click)="onBookClick(book)">
|
||||
<div
|
||||
class="search-dropdown-item"
|
||||
[class.active]="activeIndex === idx"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onBookClick(book)"
|
||||
(keydown.enter)="onBookClick(book)">
|
||||
<div class="search-item-content">
|
||||
<img
|
||||
[attr.src]="urlHelper.getThumbnailUrl(book.id, book.metadata?.coverUpdatedOn)"
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@
|
||||
{{ t('validCount', { count: entries.length }) }}
|
||||
</div>
|
||||
@if (skipped.length > 0) {
|
||||
<div class="summary-stat warn" (click)="showSkipped = !showSkipped">
|
||||
<div class="summary-stat warn" role="button" tabindex="0" (click)="showSkipped = !showSkipped" (keydown.enter)="showSkipped = !showSkipped">
|
||||
<i class="pi pi-exclamation-triangle"></i>
|
||||
{{ t('skippedCount', { count: skipped.length }) }}
|
||||
<i class="pi" [class.pi-chevron-down]="!showSkipped" [class.pi-chevron-up]="showSkipped"></i>
|
||||
|
||||
@@ -47,7 +47,12 @@
|
||||
@if (allAuthors(); as authors) {
|
||||
<p class="series-authors">
|
||||
@for (author of authors; track $index; let isLast = $last) {
|
||||
<a class="author-link" (click)="goToAuthorBooks(author)">{{ author }}</a>
|
||||
<a
|
||||
class="author-link"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="goToAuthorBooks(author)"
|
||||
(keydown.enter)="goToAuthorBooks(author)">{{ author }}</a>
|
||||
@if (!isLast) {<span>, </span>}
|
||||
}
|
||||
</p>
|
||||
@@ -58,7 +63,12 @@
|
||||
<div class="categories-scroll">
|
||||
<div class="categories-list">
|
||||
@for (category of categories; track category) {
|
||||
<a (click)="goToCategory(category)" class="category-link">
|
||||
<a
|
||||
class="category-link"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="goToCategory(category)"
|
||||
(keydown.enter)="goToCategory(category)">
|
||||
<app-tag color="red" size="xs">{{ category }}</app-tag>
|
||||
</a>
|
||||
}
|
||||
@@ -70,7 +80,12 @@
|
||||
<div class="metadata-cards">
|
||||
@if (allPublishers(); as publishers) {
|
||||
@if (publishers.length) {
|
||||
<span class="meta-card meta-card-publisher" (click)="goToPublisher(publishers[0])">
|
||||
<span
|
||||
class="meta-card meta-card-publisher"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="goToPublisher(publishers[0])"
|
||||
(keydown.enter)="goToPublisher(publishers[0])">
|
||||
<i class="pi pi-building"></i>
|
||||
@for (pub of publishers; track pub; let isLast = $last) {
|
||||
{{ pub }}{{ isLast ? '' : ', ' }}
|
||||
@@ -165,7 +180,12 @@
|
||||
<!-- Next Up + Progress (pushed to bottom, aligned with cover) -->
|
||||
<div class="hero-status">
|
||||
@if (nextUp(); as nextUp) {
|
||||
<div class="next-up-card" (click)="readBook(nextUp.book.id)">
|
||||
<div
|
||||
class="next-up-card"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="readBook(nextUp.book.id)"
|
||||
(keydown.enter)="readBook(nextUp.book.id)">
|
||||
<img [src]="nextUp.thumbnailUrl"
|
||||
[alt]="nextUp.book.metadata?.title || ''"
|
||||
class="next-up-thumb"
|
||||
|
||||
+12
-2
@@ -191,7 +191,12 @@
|
||||
<span class="author-chip" [class.main-author]="$index === 0" cdkDrag>
|
||||
@if ($index === 0) { <span class="main-author-badge">m</span> }
|
||||
{{ author }}
|
||||
<i class="pi pi-times author-chip-remove" (click)="removeAuthor($index)"></i>
|
||||
<i
|
||||
class="pi pi-times author-chip-remove"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="removeAuthor($index)"
|
||||
(keydown.enter)="removeAuthor($index)"></i>
|
||||
</span>
|
||||
}
|
||||
<p-autoComplete
|
||||
@@ -441,7 +446,12 @@
|
||||
<span class="author-chip" [class.main-author]="$index === 0" cdkDrag>
|
||||
@if ($index === 0) { <span class="main-author-badge">m</span> }
|
||||
{{ author }}
|
||||
<i class="pi pi-times author-chip-remove" (click)="removeAuthor($index)"></i>
|
||||
<i
|
||||
class="pi pi-times author-chip-remove"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="removeAuthor($index)"
|
||||
(keydown.enter)="removeAuthor($index)"></i>
|
||||
</span>
|
||||
}
|
||||
<p-autoComplete
|
||||
|
||||
+14
-3
@@ -165,7 +165,10 @@
|
||||
alt="Cover"
|
||||
[title]="t('originalCoverTitle')"
|
||||
class="cover-image"
|
||||
(click)="file.showDetails = !file.showDetails"/>
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="file.showDetails = !file.showDetails"
|
||||
(keydown.enter)="file.showDetails = !file.showDetails"/>
|
||||
} @else {
|
||||
<div [title]="t('noCoverFoundTitle')" class="cover-image cover-placeholder">?</div>
|
||||
}
|
||||
@@ -176,12 +179,20 @@
|
||||
alt="Fetched Cover"
|
||||
[title]="t('fetchedCoverTitle')"
|
||||
class="cover-image"
|
||||
(click)="file.showDetails = !file.showDetails"/>
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="file.showDetails = !file.showDetails"
|
||||
(keydown.enter)="file.showDetails = !file.showDetails"/>
|
||||
} @else {
|
||||
<div [title]="t('noCoverFetchedTitle')" class="cover-image cover-placeholder">?</div>
|
||||
}
|
||||
|
||||
<div class="file-name" (click)="file.showDetails = !file.showDetails">
|
||||
<div
|
||||
class="file-name"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="file.showDetails = !file.showDetails"
|
||||
(keydown.enter)="file.showDetails = !file.showDetails">
|
||||
{{ file.file.fileName }}
|
||||
</div>
|
||||
|
||||
|
||||
+24
-4
@@ -220,7 +220,12 @@
|
||||
@if ($first) { <span class="main-author-badge">m</span> }
|
||||
{{ author }}
|
||||
@if (!metadataForm.get('authors')?.disabled) {
|
||||
<i class="pi pi-times author-chip-remove" (click)="removeAuthor($index)"></i>
|
||||
<i
|
||||
class="pi pi-times author-chip-remove"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="removeAuthor($index)"
|
||||
(keydown.enter)="removeAuthor($index)"></i>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
@@ -521,7 +526,12 @@
|
||||
<!-- Audiobook Metadata Section -->
|
||||
@if (isAudiobook(book)) {
|
||||
<div class="collapsible-section" [class.expanded]="audiobookSectionExpanded">
|
||||
<div class="collapsible-header" (click)="audiobookSectionExpanded = !audiobookSectionExpanded">
|
||||
<div
|
||||
class="collapsible-header"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="audiobookSectionExpanded = !audiobookSectionExpanded"
|
||||
(keydown.enter)="audiobookSectionExpanded = !audiobookSectionExpanded">
|
||||
<i class="pi pi-headphones"></i>
|
||||
<span>{{ t('audiobookDetails') }}</span>
|
||||
<i [class]="audiobookSectionExpanded ? 'pi pi-chevron-up' : 'pi pi-chevron-down'" class="section-toggle"></i>
|
||||
@@ -556,7 +566,12 @@
|
||||
<!-- Comic Book Metadata Section -->
|
||||
@if (isCBX(book)) {
|
||||
<div class="collapsible-section" [class.expanded]="comicSectionExpanded">
|
||||
<div class="collapsible-header" (click)="comicSectionExpanded = !comicSectionExpanded">
|
||||
<div
|
||||
class="collapsible-header"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="comicSectionExpanded = !comicSectionExpanded"
|
||||
(keydown.enter)="comicSectionExpanded = !comicSectionExpanded">
|
||||
<i class="pi pi-bolt"></i>
|
||||
<span>{{ t('comicBookDetails') }}</span>
|
||||
<i [class]="comicSectionExpanded ? 'pi pi-chevron-up' : 'pi pi-chevron-down'" class="section-toggle"></i>
|
||||
@@ -638,7 +653,12 @@
|
||||
|
||||
<!-- Provider Metadata Section (collapsible) -->
|
||||
<div class="collapsible-section" [class.expanded]="providerSectionExpanded">
|
||||
<div class="collapsible-header" (click)="providerSectionExpanded = !providerSectionExpanded">
|
||||
<div
|
||||
class="collapsible-header"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="providerSectionExpanded = !providerSectionExpanded"
|
||||
(keydown.enter)="providerSectionExpanded = !providerSectionExpanded">
|
||||
<i class="pi pi-database"></i>
|
||||
<span>{{ t('providerMetadata') }}</span>
|
||||
<i [class]="providerSectionExpanded ? 'pi pi-chevron-up' : 'pi pi-chevron-down'" class="section-toggle"></i>
|
||||
|
||||
+12
-2
@@ -268,7 +268,12 @@
|
||||
@if ($index === 0) { <span class="main-author-badge">m</span> }
|
||||
{{ author }}
|
||||
@if (!metadataForm.get('authors')?.disabled) {
|
||||
<i class="pi pi-times author-chip-remove" (click)="removeAuthor($index)"></i>
|
||||
<i
|
||||
class="pi pi-times author-chip-remove"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="removeAuthor($index)"
|
||||
(keydown.enter)="removeAuthor($index)"></i>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
@@ -475,7 +480,12 @@
|
||||
<!-- Comic Book Details Section -->
|
||||
@if (shouldShowComicSection()) {
|
||||
<section class="form-section">
|
||||
<div class="section-header collapsible-header" (click)="comicSectionExpanded = !comicSectionExpanded">
|
||||
<div
|
||||
class="section-header collapsible-header"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="comicSectionExpanded = !comicSectionExpanded"
|
||||
(keydown.enter)="comicSectionExpanded = !comicSectionExpanded">
|
||||
<i class="pi pi-bolt"></i>
|
||||
<span>{{ t('sectionComicDetails') }}</span>
|
||||
@if (!hasAnyFetchedComicData() && !hasAnyCurrentComicData()) {
|
||||
|
||||
+13
-2
@@ -107,7 +107,10 @@
|
||||
[class.has-results]="tab.count > 0"
|
||||
[class.active]="isProviderPillActive(tab.provider)"
|
||||
[class]="'provider-pill provider-' + tab.provider.toLowerCase() + (tab.count > 0 ? ' has-results' : '') + (isProviderPillActive(tab.provider) ? ' active' : '')"
|
||||
[attr.role]="tab.count > 0 ? 'button' : null"
|
||||
[attr.tabindex]="tab.count > 0 ? '0' : null"
|
||||
(click)="tab.count > 0 && onProviderPillClick(tab.provider, $event)"
|
||||
(keydown.enter)="tab.count > 0 && onProviderPillClick(tab.provider, $event)"
|
||||
[style.cursor]="tab.count > 0 ? 'pointer' : 'default'">
|
||||
<div class="pill-icon">
|
||||
<i class="pi pi-database"></i>
|
||||
@@ -150,7 +153,12 @@
|
||||
<div class="results-section">
|
||||
<div class="results-grid">
|
||||
@for (metadata of filteredMetadata; track trackByMetadata($index, metadata)) {
|
||||
<div class="metadata-card" (click)="onBookClick(metadata)">
|
||||
<div
|
||||
class="metadata-card"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onBookClick(metadata)"
|
||||
(keydown.enter)="onBookClick(metadata)">
|
||||
<div class="card-image">
|
||||
<img
|
||||
[src]="metadata.thumbnailUrl || 'assets/images/missing-cover.jpg'"
|
||||
@@ -169,7 +177,10 @@
|
||||
class="card-provider"
|
||||
[class]="'card-provider provider-' + getProviderClass(metadata)"
|
||||
[innerHTML]="buildProviderLink(metadata)"
|
||||
(click)="onProviderClick($event)">
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onProviderClick($event)"
|
||||
(keydown.enter)="onProviderClick($event)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+2
-2
@@ -314,7 +314,7 @@ export class MetadataSearcherComponent implements OnDestroy, OnChanges {
|
||||
];
|
||||
}
|
||||
|
||||
onProviderPillClick(provider: string, event: MouseEvent): void {
|
||||
onProviderPillClick(provider: string, event: MouseEvent | KeyboardEvent): void {
|
||||
const providerLower = provider.toLowerCase();
|
||||
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
@@ -474,7 +474,7 @@ export class MetadataSearcherComponent implements OnDestroy, OnChanges {
|
||||
metadata.hardcoverId || metadata.comicvineId || metadata.audibleId || index.toString();
|
||||
}
|
||||
|
||||
onProviderClick(event: MouseEvent) {
|
||||
onProviderClick(event: Event) {
|
||||
const target = event.target as HTMLElement;
|
||||
if (target.tagName === 'A' || target.closest('a')) {
|
||||
event.stopPropagation();
|
||||
|
||||
+32
-32
@@ -96,7 +96,7 @@
|
||||
|
||||
<div class="title-group">
|
||||
@if (book?.metadata?.seriesName) {
|
||||
<div class="series-link" (click)="goToSeries(book?.metadata?.seriesName!)">
|
||||
<div class="series-link" role="button" tabindex="0" (click)="goToSeries(book?.metadata?.seriesName!)" (keydown.enter)="goToSeries(book?.metadata?.seriesName!)">
|
||||
{{ book?.metadata?.seriesName }}
|
||||
@if (book?.metadata?.seriesNumber) {
|
||||
#{{ book?.metadata?.seriesNumber }}
|
||||
@@ -122,10 +122,10 @@
|
||||
<p class="authors">
|
||||
@for (author of book?.metadata!.authors; track $index; let isLast = $last; let isFirst = $first) {
|
||||
@if (isFirst && book!.metadata!.authors!.length > 1) {
|
||||
<a class="author-link" (click)="goToAuthorBooks(author)">{{ author }}</a>
|
||||
<a class="author-link" role="button" tabindex="0" (click)="goToAuthorBooks(author)" (keydown.enter)="goToAuthorBooks(author)">{{ author }}</a>
|
||||
<span class="first-author-badge">{{ t('firstAuthorBadge') }}</span>
|
||||
} @else {
|
||||
<a class="author-link" (click)="goToAuthorBooks(author)">{{ author }}</a>
|
||||
<a class="author-link" role="button" tabindex="0" (click)="goToAuthorBooks(author)" (keydown.enter)="goToAuthorBooks(author)">{{ author }}</a>
|
||||
}
|
||||
@if (!isLast) {
|
||||
<span class="author-separator">, </span>
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
<div class="formats-inline">
|
||||
@if (getDisplayFormat(book?.primaryFile); as displayFormat) {
|
||||
<span class="format-tag-wrapper primary-format" (click)="goToFileType(book?.primaryFile?.filePath)" [pTooltip]="book?.primaryFile?.fileName ?? ''" tooltipPosition="top">
|
||||
<span class="format-tag-wrapper primary-format" role="button" tabindex="0" (click)="goToFileType(book?.primaryFile?.filePath)" (keydown.enter)="goToFileType(book?.primaryFile?.filePath)" [pTooltip]="book?.primaryFile?.fileName ?? ''" tooltipPosition="top">
|
||||
<app-tag size="3xs" variant="pill" [customBgColor]="getFileTypeBgColor(displayFormat)" customTextColor="#fff">
|
||||
{{ displayFormat }}
|
||||
</app-tag>
|
||||
@@ -147,7 +147,7 @@
|
||||
<span class="format-pipe">|</span>
|
||||
}
|
||||
@for (formatExt of getUniqueAlternativeFormats(book); track formatExt) {
|
||||
<span class="format-tag-wrapper" (click)="goToFileType('.' + formatExt)" [pTooltip]="formatExt" tooltipPosition="top">
|
||||
<span class="format-tag-wrapper" role="button" tabindex="0" (click)="goToFileType('.' + formatExt)" (keydown.enter)="goToFileType('.' + formatExt)" [pTooltip]="formatExt" tooltipPosition="top">
|
||||
<app-tag size="3xs" variant="pill" [customBgColor]="getFileTypeBgColor(formatExt)" customTextColor="#fff">
|
||||
{{ formatExt }}
|
||||
</app-tag>
|
||||
@@ -315,7 +315,7 @@
|
||||
<div class="tag-scroll">
|
||||
<div class="tag-container">
|
||||
@for (category of book.metadata!.categories; track category) {
|
||||
<a (click)="goToCategory(category)" class="tag-clickable">
|
||||
<a role="button" tabindex="0" (click)="goToCategory(category)" (keydown.enter)="goToCategory(category)" class="tag-clickable">
|
||||
<app-tag color="red" size="xs">{{ category }}</app-tag>
|
||||
</a>
|
||||
}
|
||||
@@ -330,7 +330,7 @@
|
||||
<div class="tag-scroll">
|
||||
<div class="tag-container">
|
||||
@for (mood of book.metadata!.moods; track mood) {
|
||||
<a (click)="goToMood(mood)" class="tag-clickable">
|
||||
<a role="button" tabindex="0" (click)="goToMood(mood)" (keydown.enter)="goToMood(mood)" class="tag-clickable">
|
||||
<app-tag color="indigo" size="xs">{{ mood }}</app-tag>
|
||||
</a>
|
||||
}
|
||||
@@ -345,7 +345,7 @@
|
||||
<div class="tag-scroll">
|
||||
<div class="tag-container">
|
||||
@for (tag of book.metadata!.tags; track tag) {
|
||||
<a (click)="goToTag(tag)" class="tag-clickable">
|
||||
<a role="button" tabindex="0" (click)="goToTag(tag)" (keydown.enter)="goToTag(tag)" class="tag-clickable">
|
||||
<app-tag color="green" size="xs">{{ tag }}</app-tag>
|
||||
</a>
|
||||
}
|
||||
@@ -359,7 +359,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('libraryLabel') }}</span>
|
||||
@if (book?.libraryName) {
|
||||
<span class="metadata-value metadata-link" (click)="goToLibrary(book.libraryId!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToLibrary(book.libraryId!)" (keydown.enter)="goToLibrary(book.libraryId!)">
|
||||
{{ book?.libraryName }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -370,7 +370,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('publisherLabel') }}</span>
|
||||
@if (book?.metadata?.publisher) {
|
||||
<span class="metadata-value metadata-link" (click)="goToPublisher(book?.metadata?.publisher!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToPublisher(book?.metadata?.publisher!)" (keydown.enter)="goToPublisher(book?.metadata?.publisher!)">
|
||||
{{ book?.metadata?.publisher }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -381,7 +381,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('publishedLabel') }}</span>
|
||||
@if (book?.metadata!.publishedDate) {
|
||||
<span class="metadata-value metadata-link" (click)="goToPublishedYear(book?.metadata!.publishedDate!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToPublishedYear(book?.metadata!.publishedDate!)" (keydown.enter)="goToPublishedYear(book?.metadata!.publishedDate!)">
|
||||
{{ book?.metadata!.publishedDate }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -392,7 +392,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('languageLabel') }}</span>
|
||||
@if (book?.metadata!.language) {
|
||||
<span class="metadata-value metadata-link" (click)="goToLanguage(book?.metadata!.language!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToLanguage(book?.metadata!.language!)" (keydown.enter)="goToLanguage(book?.metadata!.language!)">
|
||||
{{ book?.metadata!.language }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -424,7 +424,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('metadataMatchLabel') }}</span>
|
||||
@if (book?.metadataMatchScore != null) {
|
||||
<span (click)="goToMatchScoreRange(book?.metadataMatchScore!)" style="cursor: pointer;">
|
||||
<span role="button" tabindex="0" (click)="goToMatchScoreRange(book?.metadataMatchScore!)" (keydown.enter)="goToMatchScoreRange(book?.metadataMatchScore!)" style="cursor: pointer;">
|
||||
<app-tag size="3xs" variant="pill" [color]="getMatchScoreColor(book?.metadataMatchScore!)">
|
||||
{{ (book?.metadataMatchScore!) | number:'1.0-0' }}%
|
||||
</app-tag>
|
||||
@@ -452,12 +452,12 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('readStatusLabel') }}</span>
|
||||
<span class="metadata-value-group">
|
||||
<span (click)="goToReadStatus(selectedReadStatus)" style="cursor: pointer;">
|
||||
<span role="button" tabindex="0" (click)="goToReadStatus(selectedReadStatus)" (keydown.enter)="goToReadStatus(selectedReadStatus)" style="cursor: pointer;">
|
||||
<app-tag size="3xs" variant="pill" [color]="getStatusColor(selectedReadStatus)">
|
||||
{{ getStatusLabel(selectedReadStatus) }}
|
||||
</app-tag>
|
||||
</span>
|
||||
<i class="pi pi-pencil edit-icon" (click)="menu.toggle($event)"></i>
|
||||
<i class="pi pi-pencil edit-icon" role="button" tabindex="0" (click)="menu.toggle($event)" (keydown.enter)="menu.toggle($event)"></i>
|
||||
<p-menu #menu [popup]="true" [model]="readStatusMenuItems"></p-menu>
|
||||
</span>
|
||||
</div>
|
||||
@@ -511,7 +511,7 @@
|
||||
@if (!isEditingDateFinished) {
|
||||
<span class="metadata-value-group">
|
||||
<span class="metadata-value">{{ formatDate(book.dateFinished) }}</span>
|
||||
<i class="pi pi-pencil edit-icon" (click)="toggleDateFinishedEdit(book)"></i>
|
||||
<i class="pi pi-pencil edit-icon" role="button" tabindex="0" (click)="toggleDateFinishedEdit(book)" (keydown.enter)="toggleDateFinishedEdit(book)"></i>
|
||||
</span>
|
||||
} @else {
|
||||
<span class="metadata-value-group">
|
||||
@@ -535,7 +535,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('pageCountLabel') }}</span>
|
||||
@if (book?.metadata!.pageCount) {
|
||||
<span class="metadata-value metadata-link" (click)="goToPageCountRange(book?.metadata!.pageCount!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToPageCountRange(book?.metadata!.pageCount!)" (keydown.enter)="goToPageCountRange(book?.metadata!.pageCount!)">
|
||||
{{ book?.metadata!.pageCount }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -546,7 +546,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('ageRatingLabel') }}</span>
|
||||
@if (book?.metadata?.ageRating != null) {
|
||||
<span class="metadata-value metadata-link" (click)="goToAgeRating(book?.metadata?.ageRating!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToAgeRating(book?.metadata?.ageRating!)" (keydown.enter)="goToAgeRating(book?.metadata?.ageRating!)">
|
||||
{{ getAgeRatingLabel(book?.metadata?.ageRating) }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -557,7 +557,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('contentRatingLabel') }}</span>
|
||||
@if (book?.metadata?.contentRating) {
|
||||
<span class="metadata-value metadata-link" (click)="goToContentRating(book?.metadata?.contentRating!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToContentRating(book?.metadata?.contentRating!)" (keydown.enter)="goToContentRating(book?.metadata?.contentRating!)">
|
||||
{{ getContentRatingLabel(book?.metadata?.contentRating) }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -570,7 +570,7 @@
|
||||
@if (book.metadata?.narrator) {
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('audiobookNarrator') }}</span>
|
||||
<a class="metadata-value metadata-link" (click)="goToNarrator(book.metadata!.narrator!)">
|
||||
<a class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToNarrator(book.metadata!.narrator!)" (keydown.enter)="goToNarrator(book.metadata!.narrator!)">
|
||||
{{ book.metadata?.narrator }}
|
||||
</a>
|
||||
</div>
|
||||
@@ -599,7 +599,7 @@
|
||||
<div class="metadata-item">
|
||||
<span class="metadata-key">{{ t('fileSizeLabel') }}</span>
|
||||
@if (book?.primaryFile?.fileSizeKb) {
|
||||
<span class="metadata-value metadata-link" (click)="goToFileSizeRange(book?.primaryFile?.fileSizeKb!)">
|
||||
<span class="metadata-value metadata-link" role="button" tabindex="0" (click)="goToFileSizeRange(book?.primaryFile?.fileSizeKb!)" (keydown.enter)="goToFileSizeRange(book?.primaryFile?.fileSizeKb!)">
|
||||
{{ formatFileSize(book?.primaryFile) }}
|
||||
</span>
|
||||
} @else {
|
||||
@@ -612,7 +612,7 @@
|
||||
@if (hasDigitalFile(book)) {
|
||||
<div class="file-path-section">
|
||||
<span class="metadata-key">{{ t('filePathLabel') }}</span>
|
||||
<i class="pi eye-icon" [ngClass]="showFilePath ? 'pi-eye-slash' : 'pi-eye'" (click)="showFilePath = !showFilePath"></i>
|
||||
<i class="pi eye-icon" role="button" tabindex="0" [ngClass]="showFilePath ? 'pi-eye-slash' : 'pi-eye'" (click)="showFilePath = !showFilePath" (keydown.enter)="showFilePath = !showFilePath"></i>
|
||||
@if (showFilePath) {
|
||||
<code class="file-path-code">{{ book?.primaryFile?.filePath }}</code>
|
||||
}
|
||||
@@ -710,7 +710,7 @@
|
||||
|
||||
@if (isComicBook(book) && hasComicMetadata(book)) {
|
||||
<div class="comic-metadata-section">
|
||||
<div class="section-header clickable" (click)="isComicSectionExpanded = !isComicSectionExpanded">
|
||||
<div class="section-header clickable" role="button" tabindex="0" (click)="isComicSectionExpanded = !isComicSectionExpanded" (keydown.enter)="isComicSectionExpanded = !isComicSectionExpanded">
|
||||
<div class="section-header-left">
|
||||
<i class="pi pi-images"></i>
|
||||
<span>{{ t('comicDetailsTitle') }}</span>
|
||||
@@ -787,7 +787,7 @@
|
||||
<span class="comic-creator-role">{{ t('pencillers') }}</span>
|
||||
<div class="comic-creator-names">
|
||||
@for (name of comic.pencillers; track name) {
|
||||
<a class="comic-creator-link" (click)="goToCreator(name, 'penciller')">{{ name }}</a>
|
||||
<a class="comic-creator-link" role="button" tabindex="0" (click)="goToCreator(name, 'penciller')" (keydown.enter)="goToCreator(name, 'penciller')">{{ name }}</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -797,7 +797,7 @@
|
||||
<span class="comic-creator-role">{{ t('inkers') }}</span>
|
||||
<div class="comic-creator-names">
|
||||
@for (name of comic.inkers; track name) {
|
||||
<a class="comic-creator-link" (click)="goToCreator(name, 'inker')">{{ name }}</a>
|
||||
<a class="comic-creator-link" role="button" tabindex="0" (click)="goToCreator(name, 'inker')" (keydown.enter)="goToCreator(name, 'inker')">{{ name }}</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -807,7 +807,7 @@
|
||||
<span class="comic-creator-role">{{ t('colorists') }}</span>
|
||||
<div class="comic-creator-names">
|
||||
@for (name of comic.colorists; track name) {
|
||||
<a class="comic-creator-link" (click)="goToCreator(name, 'colorist')">{{ name }}</a>
|
||||
<a class="comic-creator-link" role="button" tabindex="0" (click)="goToCreator(name, 'colorist')" (keydown.enter)="goToCreator(name, 'colorist')">{{ name }}</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -817,7 +817,7 @@
|
||||
<span class="comic-creator-role">{{ t('letterers') }}</span>
|
||||
<div class="comic-creator-names">
|
||||
@for (name of comic.letterers; track name) {
|
||||
<a class="comic-creator-link" (click)="goToCreator(name, 'letterer')">{{ name }}</a>
|
||||
<a class="comic-creator-link" role="button" tabindex="0" (click)="goToCreator(name, 'letterer')" (keydown.enter)="goToCreator(name, 'letterer')">{{ name }}</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -827,7 +827,7 @@
|
||||
<span class="comic-creator-role">{{ t('coverArtists') }}</span>
|
||||
<div class="comic-creator-names">
|
||||
@for (name of comic.coverArtists; track name) {
|
||||
<a class="comic-creator-link" (click)="goToCreator(name, 'coverArtist')">{{ name }}</a>
|
||||
<a class="comic-creator-link" role="button" tabindex="0" (click)="goToCreator(name, 'coverArtist')" (keydown.enter)="goToCreator(name, 'coverArtist')">{{ name }}</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -837,7 +837,7 @@
|
||||
<span class="comic-creator-role">{{ t('editors') }}</span>
|
||||
<div class="comic-creator-names">
|
||||
@for (name of comic.editors; track name) {
|
||||
<a class="comic-creator-link" (click)="goToCreator(name, 'editor')">{{ name }}</a>
|
||||
<a class="comic-creator-link" role="button" tabindex="0" (click)="goToCreator(name, 'editor')" (keydown.enter)="goToCreator(name, 'editor')">{{ name }}</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -858,7 +858,7 @@
|
||||
<span class="comic-tag-label">{{ t('characters') }}</span>
|
||||
<div class="comic-tag-list">
|
||||
@for (character of comic.characters; track character) {
|
||||
<a class="comic-tag-clickable" (click)="goToCharacter(character)">
|
||||
<a class="comic-tag-clickable" role="button" tabindex="0" (click)="goToCharacter(character)" (keydown.enter)="goToCharacter(character)">
|
||||
<app-tag color="cyan" size="xs">{{ character }}</app-tag>
|
||||
</a>
|
||||
}
|
||||
@@ -870,7 +870,7 @@
|
||||
<span class="comic-tag-label">{{ t('teams') }}</span>
|
||||
<div class="comic-tag-list">
|
||||
@for (team of comic.teams; track team) {
|
||||
<a class="comic-tag-clickable" (click)="goToTeam(team)">
|
||||
<a class="comic-tag-clickable" role="button" tabindex="0" (click)="goToTeam(team)" (keydown.enter)="goToTeam(team)">
|
||||
<app-tag color="violet" size="xs">{{ team }}</app-tag>
|
||||
</a>
|
||||
}
|
||||
@@ -882,7 +882,7 @@
|
||||
<span class="comic-tag-label">{{ t('locations') }}</span>
|
||||
<div class="comic-tag-list">
|
||||
@for (location of comic.locations; track location) {
|
||||
<a class="comic-tag-clickable" (click)="goToLocation(location)">
|
||||
<a class="comic-tag-clickable" role="button" tabindex="0" (click)="goToLocation(location)" (keydown.enter)="goToLocation(location)">
|
||||
<app-tag color="amber" size="xs">{{ location }}</app-tag>
|
||||
</a>
|
||||
}
|
||||
|
||||
+6
-1
@@ -118,7 +118,12 @@
|
||||
(ngModelChange)="onRowSelect(tab.type)"></p-checkbox>
|
||||
</td>
|
||||
<td>
|
||||
<span class="clickable-cell" (click)="onMetadataClick(tab.type, item.value)">
|
||||
<span
|
||||
class="clickable-cell"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onMetadataClick(tab.type, item.value)"
|
||||
(keydown.enter)="onMetadataClick(tab.type, item.value)">
|
||||
{{ item.value }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
@for (group of filteredGroups; track group.bookId) {
|
||||
<div class="settings-card book-group-card">
|
||||
<!-- Book Header -->
|
||||
<div class="book-group-header" (click)="toggleGroup(group.bookId)">
|
||||
<div class="book-group-header" role="button" tabindex="0" (click)="toggleGroup(group.bookId)" (keydown.enter)="toggleGroup(group.bookId)">
|
||||
<img [src]="group.thumbnailUrl" [alt]="group.bookTitle" class="book-thumbnail" />
|
||||
<div class="book-info">
|
||||
<span class="book-title">{{ group.bookTitle }}</span>
|
||||
|
||||
@@ -309,6 +309,9 @@
|
||||
class="track-item"
|
||||
[class.active]="track.index === currentTrackIndex"
|
||||
(click)="selectTrack(track)"
|
||||
(keydown.enter)="selectTrack(track)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<span class="track-index">{{ track.index + 1 }}</span>
|
||||
<div class="track-details">
|
||||
@@ -328,6 +331,9 @@
|
||||
class="track-item"
|
||||
[class.active]="getCurrentChapter()?.index === chapter.index"
|
||||
(click)="selectChapter(chapter)"
|
||||
(keydown.enter)="selectChapter(chapter)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<span class="track-index">{{ chapter.index + 1 }}</span>
|
||||
<div class="track-details">
|
||||
@@ -371,6 +377,9 @@
|
||||
<li
|
||||
class="track-item bookmark-item"
|
||||
(click)="goToBookmark(bookmark)"
|
||||
(keydown.enter)="goToBookmark(bookmark)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<i class="pi pi-bookmark-fill bookmark-icon"></i>
|
||||
<div class="track-details">
|
||||
|
||||
@@ -55,7 +55,13 @@
|
||||
@if (!isLoading) {
|
||||
@if (pages.length > 0) {
|
||||
@if (scrollMode === CbxScrollMode.PAGINATED) {
|
||||
<div class="pages-wrapper" (click)="onImageClick()" (dblclick)="onImageDoubleClick()">
|
||||
<div
|
||||
class="pages-wrapper"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onImageClick()"
|
||||
(keydown.enter)="onImageClick()"
|
||||
(dblclick)="onImageDoubleClick()">
|
||||
@if (isPageTransitioning && previousImageUrls.length > 0) {
|
||||
<div class="previous-page-layer">
|
||||
@for (url of previousImageUrls; track url) {
|
||||
@@ -81,7 +87,16 @@
|
||||
} @else {
|
||||
<div class="infinite-scroll-wrapper" [class.long-strip-wrapper]="scrollMode === CbxScrollMode.LONG_STRIP">
|
||||
@for (pageIdx of infiniteScrollPages; track pageIdx; let i = $index) {
|
||||
<img [src]="getPageImageUrl(pageIdx)" alt="Page {{ pageIdx + 1 }}" class="page-image" (click)="onImageClick()" (dblclick)="onImageDoubleClick()" (load)="onPageImageLoad($event, pageIdx)"/>
|
||||
<img
|
||||
[src]="getPageImageUrl(pageIdx)"
|
||||
alt="Page {{ pageIdx + 1 }}"
|
||||
class="page-image"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onImageClick()"
|
||||
(keydown.enter)="onImageClick()"
|
||||
(dblclick)="onImageDoubleClick()"
|
||||
(load)="onPageImageLoad($event, pageIdx)"/>
|
||||
}
|
||||
@if (isLoadingMore) {
|
||||
<div class="loading-more">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="dialog-overlay" (click)="onOverlayClick($event)">
|
||||
<div class="dialog-overlay" role="button" tabindex="0" (click)="onOverlayClick($event)" (keydown.enter)="onOverlayClick($event)">
|
||||
<div class="dialog">
|
||||
<div class="dialog-header">
|
||||
<h2>{{ isEditing ? ('readerCbx.noteDialog.editNote' | transloco) : ('readerCbx.noteDialog.addNote' | transloco) }}</h2>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="dialog-overlay" (click)="onOverlayClick($event)">
|
||||
<div class="dialog-overlay" role="button" tabindex="0" (click)="onOverlayClick($event)" (keydown.enter)="onOverlayClick($event)">
|
||||
<div class="dialog">
|
||||
<div class="dialog-header">
|
||||
<h2>{{ 'readerCbx.shortcutsHelp.title' | transloco }}</h2>
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
<app-reader-icon name="dots-vertical" [size]="20" />
|
||||
</button>
|
||||
@if (overflowOpen) {
|
||||
<div class="overflow-backdrop" (click)="overflowOpen = false"></div>
|
||||
<div class="overflow-backdrop" role="button" tabindex="0" (click)="overflowOpen = false" (keydown.enter)="overflowOpen = false"></div>
|
||||
<div class="overflow-dropdown">
|
||||
<button class="overflow-item" (click)="onToggleSlideshow(); overflowOpen = false" [class.active]="state().isSlideshowActive">
|
||||
<app-reader-icon [name]="state().isSlideshowActive ? 'pause' : 'play'" [size]="18" />
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<div class="quick-settings-overlay" (click)="onOverlayClick()">
|
||||
<div class="quick-settings-panel" (click)="$event.stopPropagation()">
|
||||
<div class="quick-settings-overlay" role="button" tabindex="0" (click)="onOverlayClick()" (keydown.enter)="onOverlayClick()">
|
||||
<div class="quick-settings-panel" tabindex="0" (click)="$event.stopPropagation()" (keydown.enter)="$event.stopPropagation()">
|
||||
<div class="pointer"></div>
|
||||
<div class="panel-body">
|
||||
<!-- Fit Mode -->
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
@if (isOpen()) {
|
||||
<div class="sidebar-overlay" (click)="onOverlayClick()" [class.closing]="closing()">
|
||||
<aside class="sidebar" (click)="$event.stopPropagation()" [class.closing]="closing()">
|
||||
<div class="sidebar-overlay" role="button" tabindex="0" (click)="onOverlayClick()" (keydown.enter)="onOverlayClick()" [class.closing]="closing()">
|
||||
<aside class="sidebar" role="button" tabindex="0" (click)="$event.stopPropagation()" (keydown.enter)="$event.stopPropagation()" [class.closing]="closing()">
|
||||
<header class="sidebar-header">
|
||||
@if (bookInfo().coverUrl) {
|
||||
<img
|
||||
@@ -74,7 +74,7 @@
|
||||
@if (bookmarks().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (bookmark of bookmarks(); track bookmark.id) {
|
||||
<li class="list-item" (click)="onBookmarkClick(bookmark.cfi!)">
|
||||
<li class="list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark.cfi!)" (keydown.enter)="onBookmarkClick(bookmark.cfi!)">
|
||||
<div class="item-content">
|
||||
<span class="item-title">{{ bookmark.title }}</span>
|
||||
<span class="item-meta">{{ bookmark.createdAt | date: 'MMM d, y' }}</span>
|
||||
@@ -116,7 +116,7 @@
|
||||
@if (filteredNotes().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (note of filteredNotes(); track note.id) {
|
||||
<li class="list-item note-item" (click)="onNoteClick(note.cfi)">
|
||||
<li class="list-item note-item" role="button" tabindex="0" (click)="onNoteClick(note.cfi)" (keydown.enter)="onNoteClick(note.cfi)">
|
||||
<div class="note-bar" [style.background-color]="note.color"></div>
|
||||
<div class="item-content">
|
||||
<span class="note-text">{{ note.noteContent }}</span>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.metadataDialog'">
|
||||
<div class="dialog-overlay" (click)="close.emit()">
|
||||
<div class="dialog" (click)="$event.stopPropagation()">
|
||||
<div class="dialog-overlay" role="button" tabindex="0" (click)="close.emit()" (keydown.enter)="close.emit()">
|
||||
<div class="dialog" tabindex="0" (click)="$event.stopPropagation()" (keydown.enter)="$event.stopPropagation()">
|
||||
<div class="dialog-header">
|
||||
<h2>{{ t('title') }}</h2>
|
||||
<button class="close-btn" (click)="close.emit()">✕</button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.noteDialog'">
|
||||
<div class="dialog-overlay" (click)="onOverlayClick($event)">
|
||||
<div class="dialog-overlay" role="button" tabindex="0" (click)="onOverlayClick($event)" (keydown.enter)="onOverlayClick($event)">
|
||||
<div class="dialog">
|
||||
<div class="dialog-header">
|
||||
<h2>{{ isEditing ? t('editNote') : t('addNote') }}</h2>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.settingsDialog'">
|
||||
<div class="dialog-overlay" (click)="close.emit()">
|
||||
<div class="dialog" (click)="$event.stopPropagation()">
|
||||
<div class="dialog-overlay" role="button" tabindex="0" (click)="close.emit()" (keydown.enter)="close.emit()">
|
||||
<div class="dialog" tabindex="0" (click)="$event.stopPropagation()" (keydown.enter)="$event.stopPropagation()">
|
||||
<div class="tabs-row">
|
||||
<div class="tabs">
|
||||
<button
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="dialog-overlay" (click)="onOverlayClick($event)">
|
||||
<div class="dialog-overlay" role="button" tabindex="0" (click)="onOverlayClick($event)" (keydown.enter)="onOverlayClick($event)">
|
||||
<div class="dialog">
|
||||
<div class="dialog-header">
|
||||
<h2>{{ 'readerEbook.shortcutsHelp.title' | transloco }}</h2>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<app-reader-icon name="dots-vertical" [size]="20"></app-reader-icon>
|
||||
</button>
|
||||
@if (overflowOpen) {
|
||||
<div class="overflow-backdrop" (click)="overflowOpen = false"></div>
|
||||
<div class="overflow-backdrop" role="button" tabindex="0" (click)="overflowOpen = false" (keydown.enter)="overflowOpen = false"></div>
|
||||
<div class="overflow-dropdown" [style.background]="theme().bg" [style.color]="theme().fg">
|
||||
<button class="overflow-item" (click)="onOpenNotes(); overflowOpen = false">
|
||||
<app-reader-icon name="note" [size]="18"></app-reader-icon>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.quickSettings'">
|
||||
<div class="quick-settings-overlay" (click)="onOverlayClick()">
|
||||
<div class="quick-settings-panel" (click)="$event.stopPropagation()">
|
||||
<div class="quick-settings-overlay" role="button" tabindex="0" (click)="onOverlayClick()" (keydown.enter)="onOverlayClick()">
|
||||
<div class="quick-settings-panel" tabindex="0" (click)="$event.stopPropagation()" (keydown.enter)="$event.stopPropagation()">
|
||||
<div class="pointer"></div>
|
||||
<div class="panel-body">
|
||||
<!-- Dark Mode -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.panel'">
|
||||
@if (isOpen()) {
|
||||
<div class="sidebar-overlay" (click)="onOverlayClick()" [class.closing]="closing()">
|
||||
<aside class="sidebar" (click)="$event.stopPropagation()" [class.closing]="closing()">
|
||||
<div class="sidebar-overlay" role="button" tabindex="0" (click)="onOverlayClick()" (keydown.enter)="onOverlayClick()" [class.closing]="closing()">
|
||||
<aside class="sidebar" role="button" tabindex="0" (click)="$event.stopPropagation()" (keydown.enter)="$event.stopPropagation()" [class.closing]="closing()">
|
||||
<!-- Header -->
|
||||
<header class="sidebar-header">
|
||||
<h2 class="sidebar-title">
|
||||
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
<ul class="item-list search-results">
|
||||
@for (result of searchState().results; track result.cfi) {
|
||||
<li class="list-item search-result-item" (click)="onSearchResultClick(result.cfi)">
|
||||
<li class="list-item search-result-item" role="button" tabindex="0" (click)="onSearchResultClick(result.cfi)" (keydown.enter)="onSearchResultClick(result.cfi)">
|
||||
<div class="item-content">
|
||||
<span class="search-excerpt">
|
||||
<span class="excerpt-context">{{ result.excerpt.pre }}</span>
|
||||
@@ -132,7 +132,7 @@
|
||||
@if (filteredNotes().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (note of filteredNotes(); track note.id) {
|
||||
<li class="list-item note-item" (click)="onNoteClick(note.cfi)">
|
||||
<li class="list-item note-item" role="button" tabindex="0" (click)="onNoteClick(note.cfi)" (keydown.enter)="onNoteClick(note.cfi)">
|
||||
<div class="note-bar" [style.background-color]="note.color"></div>
|
||||
<div class="item-content">
|
||||
<span class="note-text">{{ note.noteContent }}</span>
|
||||
|
||||
+7
-5
@@ -1,7 +1,7 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.sidebar'">
|
||||
@if (isOpen()) {
|
||||
<div class="sidebar-overlay" (click)="onOverlayClick()" [class.closing]="closing()">
|
||||
<aside class="sidebar" (click)="$event.stopPropagation()" [class.closing]="closing()">
|
||||
<div class="sidebar-overlay" role="button" tabindex="0" (click)="onOverlayClick()" (keydown.enter)="onOverlayClick()" [class.closing]="closing()">
|
||||
<aside class="sidebar" role="button" tabindex="0" (click)="$event.stopPropagation()" (keydown.enter)="$event.stopPropagation()" [class.closing]="closing()">
|
||||
<!-- Header with book info -->
|
||||
<header class="sidebar-header">
|
||||
@if (bookInfo().coverUrl) {
|
||||
@@ -65,7 +65,9 @@
|
||||
</ul>
|
||||
|
||||
<ng-template #chapterItem let-chapter let-depth="depth">
|
||||
<li role="treeitem">
|
||||
<li
|
||||
role="treeitem"
|
||||
[attr.aria-selected]="isChapterActive(chapter.href)">
|
||||
<button
|
||||
class="chapter-row"
|
||||
[class.active]="isChapterActive(chapter.href)"
|
||||
@@ -97,7 +99,7 @@
|
||||
@if (bookmarks().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (bookmark of bookmarks(); track bookmark.id) {
|
||||
<li class="list-item" (click)="onBookmarkClick(bookmark.cfi!)">
|
||||
<li class="list-item" role="button" tabindex="0" (click)="onBookmarkClick(bookmark.cfi!)" (keydown.enter)="onBookmarkClick(bookmark.cfi!)">
|
||||
<div class="item-content">
|
||||
<span class="item-title">{{ bookmark.title }}</span>
|
||||
<span class="item-meta">{{ bookmark.createdAt | date: 'MMM d, y' }}</span>
|
||||
@@ -121,7 +123,7 @@
|
||||
@if (annotations().length > 0) {
|
||||
<ul class="item-list">
|
||||
@for (annotation of annotations(); track annotation.id) {
|
||||
<li class="list-item highlight-item" (click)="onAnnotationClick(annotation.cfi)">
|
||||
<li class="list-item highlight-item" role="button" tabindex="0" (click)="onAnnotationClick(annotation.cfi)" (keydown.enter)="onAnnotationClick(annotation.cfi)">
|
||||
<div class="highlight-bar" [style.background-color]="annotation.color"></div>
|
||||
<div class="item-content">
|
||||
<span class="highlight-text">"{{ annotation.text }}"</span>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<ng-container *transloco="let t; prefix: 'readerEbook.selectionPopup'">
|
||||
@if (visible) {
|
||||
<div class="popup-backdrop" (click)="onDismiss($event)"></div>
|
||||
<div class="popup-backdrop" role="button" tabindex="0" (click)="onDismiss($event)" (keydown.enter)="onDismiss($event)"></div>
|
||||
<div class="text-selection-popup"
|
||||
[class.show-below]="showBelow"
|
||||
[style.left.px]="position.x"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="series-card" (click)="onCardClick($event)">
|
||||
<div class="series-card" role="button" tabindex="0" (click)="onCardClick($event)" (keydown.enter)="onCardClick($event)">
|
||||
<div class="stacked-covers" [ngClass]="'covers-' + series.coverBooks.length">
|
||||
@for (book of series.coverBooks; track book.id; let i = $index) {
|
||||
<img
|
||||
|
||||
+3
@@ -32,7 +32,10 @@
|
||||
@if (!selectedFile) {
|
||||
<div class="upload-zone"
|
||||
[class.drag-over]="isDragOver"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="onUploadZoneClick()"
|
||||
(keydown.enter)="onUploadZoneClick()"
|
||||
(drop)="onDrop($event)"
|
||||
(dragover)="onDragOver($event)"
|
||||
(dragleave)="onDragLeave($event)">
|
||||
|
||||
+11
-2
@@ -65,8 +65,17 @@
|
||||
</div>
|
||||
|
||||
@if (showConfigPanel) {
|
||||
<div class="config-modal-overlay" (click)="closeConfigPanel()">
|
||||
<div class="config-modal" (click)="$event.stopPropagation()">
|
||||
<div
|
||||
class="config-modal-overlay"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="closeConfigPanel()"
|
||||
(keydown.enter)="closeConfigPanel()">
|
||||
<div
|
||||
class="config-modal"
|
||||
tabindex="0"
|
||||
(click)="$event.stopPropagation()"
|
||||
(keydown.enter)="$event.stopPropagation()">
|
||||
<div class="config-modal-header">
|
||||
<h3><i class="pi pi-cog"></i> {{ t('config.title') }}</h3>
|
||||
<button type="button" class="close-btn" (click)="closeConfigPanel()" [title]="t('config.close')">
|
||||
|
||||
+12
-2
@@ -33,7 +33,12 @@
|
||||
[placeholder]="t('searchPlaceholder')"
|
||||
/>
|
||||
@if (searchQuery) {
|
||||
<i class="pi pi-times clear-icon" (click)="searchQuery = ''; onSearch()"></i>
|
||||
<i
|
||||
class="pi pi-times clear-icon"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="searchQuery = ''; onSearch()"
|
||||
(keydown.enter)="searchQuery = ''; onSearch()"></i>
|
||||
}
|
||||
</p-iconfield>
|
||||
<p-button
|
||||
@@ -143,7 +148,12 @@
|
||||
(click)="$event.stopPropagation()"
|
||||
/>
|
||||
</div>
|
||||
<label [for]="'folder-' + folder" class="directory-label" (click)="onRowClick(folder)">
|
||||
<label
|
||||
[for]="'folder-' + folder"
|
||||
class="directory-label"
|
||||
tabindex="0"
|
||||
(click)="onRowClick(folder)"
|
||||
(keydown.enter)="onRowClick(folder)">
|
||||
<div class="directory-icon-wrapper">
|
||||
<i class="pi pi-folder directory-icon"></i>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,9 @@ export type DocType = 'kobo' | 'opds' | 'metadataManager' | 'koReader' | 'email'
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[style.font-size]="size"
|
||||
(click)="openLink()"
|
||||
(keydown.enter)="openLink()"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
`,
|
||||
|
||||
@@ -56,7 +56,10 @@
|
||||
@for (icon of filteredIcons(); track icon) {
|
||||
<div
|
||||
class="icon-item"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="selectIcon(icon)"
|
||||
(keydown.enter)="selectIcon(icon)"
|
||||
[class.selected]="icon === selectedIcon"
|
||||
[title]="icon"
|
||||
>
|
||||
@@ -96,7 +99,10 @@
|
||||
@for (iconName of filteredSvgIcons(); track iconName) {
|
||||
<div
|
||||
class="icon-item svg-icon-item"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="selectSvgIcon(iconName)"
|
||||
(keydown.enter)="selectSvgIcon(iconName)"
|
||||
[class.selected]="iconName === selectedSvgIcon"
|
||||
[title]="iconName"
|
||||
draggable="true"
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
}
|
||||
</ul>
|
||||
<i class="pi pi-objects-column sidebar-width-btn"
|
||||
(click)="widthPanel.toggle($event)"></i>
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(click)="widthPanel.toggle($event)"
|
||||
(keydown.enter)="widthPanel.toggle($event)"></i>
|
||||
<p-popover #widthPanel appendTo="body">
|
||||
<div class="sidebar-width-popover">
|
||||
<span class="sidebar-width-popover-label">{{ sidebarWidth }}px</span>
|
||||
@@ -80,6 +83,9 @@
|
||||
<a
|
||||
(click)="openChangelogDialog()"
|
||||
class="update-link"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
(keydown.enter)="openChangelogDialog()"
|
||||
>
|
||||
{{ t('update') }}
|
||||
</a>
|
||||
|
||||
@@ -8,17 +8,23 @@
|
||||
<i
|
||||
class="pi pi-plus plus-icon"
|
||||
(click)="openDialog(item)"
|
||||
(keydown.enter)="openDialog(item)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
></i>
|
||||
}
|
||||
</div>
|
||||
<i
|
||||
(click)="toggleExpand(key)"
|
||||
(keydown.enter)="toggleExpand(key)"
|
||||
[ngClass]="{
|
||||
'pi': true,
|
||||
'pi-angle-up': isExpanded(key),
|
||||
'pi-angle-down': !isExpanded(key)
|
||||
}"
|
||||
class="expand-icon"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
></i>
|
||||
</div>
|
||||
} @else {
|
||||
@@ -33,6 +39,9 @@
|
||||
class="menu-item-container"
|
||||
[class.active-route-container]="isRouteActive"
|
||||
(click)="triggerLink()"
|
||||
(keydown.enter)="triggerLink()"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
@if ((item.routerLink && !item.items)) {
|
||||
<a
|
||||
@@ -78,13 +87,17 @@
|
||||
<p-button
|
||||
(click)="entitymenu.toggle($event); $event.stopPropagation()"
|
||||
(mouseover)="hovered = true"
|
||||
(focus)="hovered = true"
|
||||
(mouseleave)="hovered = false"
|
||||
(blur)="hovered = false"
|
||||
(keydown.enter)="entitymenu.toggle($event); $event.stopPropagation()"
|
||||
[text]="true"
|
||||
[outlined]="false"
|
||||
[rounded]="true"
|
||||
[label]="hovered ? '' : item.bookCount?.toString() || ''"
|
||||
[icon]="hovered ? 'pi pi-ellipsis-v' : ''"
|
||||
class="entity-menu-button"
|
||||
tabindex="0"
|
||||
></p-button>
|
||||
}
|
||||
<p-menu #entitymenu [model]="item.menu" [popup]="true" appendTo="body"></p-menu>
|
||||
|
||||
@@ -32,21 +32,21 @@
|
||||
@if (user(); as currentUser) {
|
||||
@if (currentUser.permissions?.canAccessBookdrop || currentUser.permissions?.admin) {
|
||||
<li>
|
||||
<a class="topbar-item" (click)="navigateToBookdrop()" [pTooltip]="t('bookdrop')" tooltipPosition="bottom">
|
||||
<a class="topbar-item" role="button" tabindex="0" (click)="navigateToBookdrop()" (keydown.enter)="navigateToBookdrop()" [pTooltip]="t('bookdrop')" tooltipPosition="bottom">
|
||||
<i class="pi pi-inbox topbar-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
@if (currentUser.permissions?.canManageLibrary || currentUser.permissions?.admin) {
|
||||
<li>
|
||||
<a class="topbar-item" (click)="openLibraryCreatorDialog()" [pTooltip]="t('createNewLibrary')" tooltipPosition="bottom">
|
||||
<a class="topbar-item" role="button" tabindex="0" (click)="openLibraryCreatorDialog()" (keydown.enter)="openLibraryCreatorDialog()" [pTooltip]="t('createNewLibrary')" tooltipPosition="bottom">
|
||||
<i class="pi pi-plus-circle topbar-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
@if (currentUser.permissions?.canUpload || currentUser.permissions?.admin) {
|
||||
<li>
|
||||
<a class="topbar-item" (click)="openFileUploadDialog()" [pTooltip]="t('uploadBook')" tooltipPosition="bottom">
|
||||
<a class="topbar-item" role="button" tabindex="0" (click)="openFileUploadDialog()" (keydown.enter)="openFileUploadDialog()" [pTooltip]="t('uploadBook')" tooltipPosition="bottom">
|
||||
<i class="pi pi-upload topbar-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
@@ -74,14 +74,14 @@
|
||||
@if (user(); as currentUser) {
|
||||
@if (currentUser.permissions?.canManageLibrary || currentUser.permissions?.admin) {
|
||||
<li>
|
||||
<a class="topbar-item" (click)="navigateToMetadataManager()" [pTooltip]="t('metadataManager')" tooltipPosition="bottom">
|
||||
<a class="topbar-item" role="button" tabindex="0" (click)="navigateToMetadataManager()" (keydown.enter)="navigateToMetadataManager()" [pTooltip]="t('metadataManager')" tooltipPosition="bottom">
|
||||
<i class="pi pi-sparkles topbar-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
<li>
|
||||
<a class="topbar-item" (click)="navigateToSettings()" [pTooltip]="t('settings')" tooltipPosition="bottom">
|
||||
<a class="topbar-item" role="button" tabindex="0" (click)="navigateToSettings()" (keydown.enter)="navigateToSettings()" [pTooltip]="t('settings')" tooltipPosition="bottom">
|
||||
<i class="pi pi-cog topbar-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user