* feat(pdf): move ebook reader to embedpdf, add bookmarks, remove old pdf.js stuff * feat(pdf): add page number support for bookmarks and enhance mobile navigation * feat(pdf): implement document ID tracking for search functionality * feat(pdf): add page number column to book marks and update unique index * feat(pdf): enhance annotation handling and improve search result scrolling * feat(pdf): improve layout handling and enhance resize observer functionality * feat(pdf): improve document viewer initialization and improve close button styling * fix(pdf): remove 'form' from disabled categories * feat(pdf): add pan mode functionality and enhance sidebar layout * feat(pdf): improve book viewer initialization with enhanced element detection * feat(pdf): add link handling to text selection and improve popup actions * feat(pdf): enhance link detection and improve selection handling in event service * feat(pdf): improve accessibility and improve resource management in PDF viewer * feat(pdf): add resize observer for improved layout handling * feat(pdf): error handling and improve navigation in PDF reader
81 lines
3.0 KiB
HTML
81 lines
3.0 KiB
HTML
<ng-container *transloco="let t; prefix: 'readerEbook.selectionPopup'">
|
|
@if (visible) {
|
|
<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"
|
|
[style.top.px]="position.y">
|
|
|
|
<button class="action-btn" (click)="onSelect()" [title]="t('copyText')">
|
|
<app-reader-icon name="copy" [size]="16"></app-reader-icon>
|
|
</button>
|
|
|
|
@if (linkUrl) {
|
|
<div class="divider"></div>
|
|
<button class="action-btn" (click)="onGoToLink()" [title]="t('goToLink')">
|
|
<app-reader-icon name="link" [size]="16"></app-reader-icon>
|
|
</button>
|
|
}
|
|
|
|
<div class="divider"></div>
|
|
|
|
<button class="action-btn" (click)="onSearch()" [title]="t('searchInBook')">
|
|
<app-reader-icon name="search" [size]="16"></app-reader-icon>
|
|
</button>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="annotation-container">
|
|
<button class="action-btn" [class.active]="showAnnotationOptions" (click)="toggleAnnotationOptions()" [title]="t('annotate')">
|
|
<app-reader-icon name="edit" [size]="16"></app-reader-icon>
|
|
<app-reader-icon name="chevron-down" class="chevron" [class.open]="showAnnotationOptions" [size]="10"></app-reader-icon>
|
|
</button>
|
|
|
|
@if (showAnnotationOptions) {
|
|
<div class="annotation-options" [class.above]="!showBelow" [class.below]="showBelow">
|
|
<div class="style-buttons">
|
|
@for (style of styles; track style.value) {
|
|
<button
|
|
class="style-btn"
|
|
[class.selected]="selectedStyle === style.value"
|
|
[class.highlight-style]="style.value === 'highlight'"
|
|
[class.underline-style]="style.value === 'underline'"
|
|
[class.squiggly-style]="style.value === 'squiggly'"
|
|
[class.strikethrough-style]="style.value === 'strikethrough'"
|
|
[title]="style.label"
|
|
(click)="selectStyle(style.value)">
|
|
<span class="style-text">{{ style.icon }}</span>
|
|
</button>
|
|
}
|
|
</div>
|
|
<div class="color-buttons">
|
|
@for (color of colors; track color.value) {
|
|
<button
|
|
class="color-btn"
|
|
[style.--color]="color.value"
|
|
[class.selected]="selectedColor === color.value"
|
|
[title]="color.label"
|
|
(click)="selectColor(color.value)">
|
|
</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<button class="action-btn" (click)="onNote()" [title]="t('addNote')">
|
|
<app-reader-icon name="note" [size]="16"></app-reader-icon>
|
|
</button>
|
|
|
|
@if (overlappingAnnotationId) {
|
|
<div class="divider"></div>
|
|
<button class="action-btn delete-btn" (click)="onDelete()" [title]="t('deleteAnnotation')">
|
|
<app-reader-icon name="trash" [size]="16"></app-reader-icon>
|
|
</button>
|
|
}
|
|
</div>
|
|
}
|
|
</ng-container>
|