Archived
fix: pdf bookmark
for pdfs only select pages not text
This commit is contained in:
@@ -12,6 +12,7 @@ interface BookMarkersPanelProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
onGoToPassage: (marker: MarkerEntry) => void;
|
||||
emptyHintKey?: string;
|
||||
}
|
||||
|
||||
export function BookMarkersPanel({
|
||||
@@ -19,6 +20,7 @@ export function BookMarkersPanel({
|
||||
isOpen,
|
||||
onClose,
|
||||
onGoToPassage,
|
||||
emptyHintKey = "annotations.selectTextHint",
|
||||
}: BookMarkersPanelProps) {
|
||||
const { t } = useTranslation();
|
||||
const { markers, loadBookmarks, removeBookmark, state } = useAnnotations();
|
||||
@@ -43,7 +45,7 @@ export function BookMarkersPanel({
|
||||
{state.bookmarksLoading ? (
|
||||
<p className="annotations-loading">{t("annotations.loading")}</p>
|
||||
) : markers.length === 0 ? (
|
||||
<p className="annotations-empty">{t("annotations.selectTextHint")}</p>
|
||||
<p className="annotations-empty">{t(emptyHintKey)}</p>
|
||||
) : (
|
||||
<ul className="marker-thread-list">
|
||||
{markers.map((m) => (
|
||||
@@ -51,13 +53,15 @@ export function BookMarkersPanel({
|
||||
{m.chapter_title && (
|
||||
<span className="marker-thread-chapter">{m.chapter_title}</span>
|
||||
)}
|
||||
{m.location_text && (
|
||||
{m.location_text ? (
|
||||
<CollapsibleMarkerPassage
|
||||
text={m.location_text}
|
||||
highlightColor={m.highlight_color}
|
||||
className="annotation-quote"
|
||||
/>
|
||||
)}
|
||||
) : m.chapter_title ? (
|
||||
<span className="annotation-quote marker-page-label">{m.chapter_title}</span>
|
||||
) : null}
|
||||
{m.content ? (
|
||||
<CollapsibleMarkerThought text={m.content} />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user