mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
ph-no-capture tags (#4579)
added no capture tags to stop posthog capturing recordings of pdf content --------- Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
This commit is contained in:
parent
25154e4dbe
commit
06b4c147bd
@ -324,7 +324,7 @@ const FileEditorThumbnail = ({
|
|||||||
marginTop: '0.5rem',
|
marginTop: '0.5rem',
|
||||||
marginBottom: '0.5rem',
|
marginBottom: '0.5rem',
|
||||||
}}>
|
}}>
|
||||||
<Text size="lg" fw={700} className={styles.title} lineClamp={2}>
|
<Text size="lg" fw={700} className={`${styles.title} ph-no-capture `} lineClamp={2}>
|
||||||
{file.name}
|
{file.name}
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
@ -350,6 +350,7 @@ const FileEditorThumbnail = ({
|
|||||||
<div className={styles.previewPaper}>
|
<div className={styles.previewPaper}>
|
||||||
{file.thumbnailUrl && (
|
{file.thumbnailUrl && (
|
||||||
<img
|
<img
|
||||||
|
className="ph-no-capture"
|
||||||
src={file.thumbnailUrl}
|
src={file.thumbnailUrl}
|
||||||
alt={file.name}
|
alt={file.name}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ const FileInfoCard: React.FC<FileInfoCardProps> = ({
|
|||||||
<ScrollArea style={{ flex: 1 }} p="md">
|
<ScrollArea style={{ flex: 1 }} p="md">
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Group justify="space-between" py="xs">
|
<Group justify="space-between" py="xs">
|
||||||
<Text size="sm" c="dimmed">{t('fileManager.fileName', 'Name')}</Text>
|
<Text className='ph-no-capture' size="sm" c="dimmed">{t('fileManager.fileName', 'Name')}</Text>
|
||||||
<Text size="sm" fw={500} style={{ maxWidth: '60%', textAlign: 'right' }} truncate>
|
<Text size="sm" fw={500} style={{ maxWidth: '60%', textAlign: 'right' }} truncate>
|
||||||
{currentFile ? currentFile.name : ''}
|
{currentFile ? currentFile.name : ''}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@ -93,7 +93,7 @@ const FileListItem: React.FC<FileListItemProps> = ({
|
|||||||
|
|
||||||
<Box style={{ flex: 1, minWidth: 0 }}>
|
<Box style={{ flex: 1, minWidth: 0 }}>
|
||||||
<Group gap="xs" align="center">
|
<Group gap="xs" align="center">
|
||||||
<Text size="sm" fw={500} truncate style={{ flex: 1 }}>{file.name}</Text>
|
<Text size="sm" fw={500} className='ph-no-capture' truncate style={{ flex: 1 }}>{file.name}</Text>
|
||||||
<Badge size="xs" variant="light" color={"blue"}>
|
<Badge size="xs" variant="light" color={"blue"}>
|
||||||
v{currentVersion}
|
v{currentVersion}
|
||||||
</Badge>
|
</Badge>
|
||||||
|
|||||||
@ -317,6 +317,7 @@ const FileThumbnail = ({
|
|||||||
>
|
>
|
||||||
{file.thumbnail && (
|
{file.thumbnail && (
|
||||||
<img
|
<img
|
||||||
|
className="ph-no-capture"
|
||||||
src={file.thumbnail}
|
src={file.thumbnail}
|
||||||
alt={file.name}
|
alt={file.name}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
|
|||||||
@ -371,6 +371,7 @@ const PageThumbnail: React.FC<PageThumbnailProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
) : thumbnailUrl ? (
|
) : thumbnailUrl ? (
|
||||||
<img
|
<img
|
||||||
|
className="ph-no-capture"
|
||||||
src={thumbnailUrl}
|
src={thumbnailUrl}
|
||||||
alt={`Page ${page.pageNumber}`}
|
alt={`Page ${page.pageNumber}`}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ const DocumentThumbnail: React.FC<DocumentThumbnailProps> = ({
|
|||||||
children
|
children
|
||||||
}) => {
|
}) => {
|
||||||
if (!file) return null;
|
if (!file) return null;
|
||||||
|
|
||||||
const containerStyle = {
|
const containerStyle = {
|
||||||
position: 'relative' as const,
|
position: 'relative' as const,
|
||||||
cursor: onClick ? 'pointer' : 'default',
|
cursor: onClick ? 'pointer' : 'default',
|
||||||
@ -36,6 +36,7 @@ const DocumentThumbnail: React.FC<DocumentThumbnailProps> = ({
|
|||||||
return (
|
return (
|
||||||
<Box style={containerStyle} onClick={onClick}>
|
<Box style={containerStyle} onClick={onClick}>
|
||||||
<Image
|
<Image
|
||||||
|
className='ph-no-capture'
|
||||||
src={thumbnail}
|
src={thumbnail}
|
||||||
alt={`Preview of ${file.name}`}
|
alt={`Preview of ${file.name}`}
|
||||||
fit="contain"
|
fit="contain"
|
||||||
@ -49,11 +50,12 @@ const DocumentThumbnail: React.FC<DocumentThumbnailProps> = ({
|
|||||||
return (
|
return (
|
||||||
<Box style={containerStyle} onClick={onClick}>
|
<Box style={containerStyle} onClick={onClick}>
|
||||||
<Center style={{ width: '100%', height: '100%', backgroundColor: 'var(--mantine-color-gray-1)', borderRadius: '0.25rem' }}>
|
<Center style={{ width: '100%', height: '100%', backgroundColor: 'var(--mantine-color-gray-1)', borderRadius: '0.25rem' }}>
|
||||||
<PictureAsPdfIcon
|
<PictureAsPdfIcon
|
||||||
style={{
|
className='ph-no-capture'
|
||||||
fontSize: '2rem',
|
style={{
|
||||||
color: 'var(--mantine-color-gray-6)'
|
fontSize: '2rem',
|
||||||
}}
|
color: 'var(--mantine-color-gray-6)'
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Center>
|
</Center>
|
||||||
{children}
|
{children}
|
||||||
@ -61,4 +63,4 @@ const DocumentThumbnail: React.FC<DocumentThumbnailProps> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default DocumentThumbnail;
|
export default DocumentThumbnail;
|
||||||
|
|||||||
@ -200,7 +200,7 @@ export default function PageNumberPreview({ parameters, onParameterChange, file,
|
|||||||
<img
|
<img
|
||||||
src={pageThumbnail}
|
src={pageThumbnail}
|
||||||
alt="page preview"
|
alt="page preview"
|
||||||
className={styles.pageThumbnail}
|
className={`${styles.pageThumbnail} ph-no-capture`}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -238,4 +238,4 @@ export default function PageNumberPreview({ parameters, onParameterChange, file,
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,6 +62,7 @@ const ResultsPreview = ({
|
|||||||
{/* File name at the top */}
|
{/* File name at the top */}
|
||||||
<Box mb="sm" style={{ minHeight: '3rem', display: 'flex', alignItems: 'flex-start' }}>
|
<Box mb="sm" style={{ minHeight: '3rem', display: 'flex', alignItems: 'flex-start' }}>
|
||||||
<Text
|
<Text
|
||||||
|
className='ph-no-capture'
|
||||||
size="sm"
|
size="sm"
|
||||||
fw={500}
|
fw={500}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@ -182,14 +182,17 @@ export function LocalEmbedPDF({ file, url, enableAnnotations = false, onSignatur
|
|||||||
|
|
||||||
// Wrap your UI with the <EmbedPDF> provider
|
// Wrap your UI with the <EmbedPDF> provider
|
||||||
return (
|
return (
|
||||||
<div style={{
|
<div
|
||||||
height: '100%',
|
className='ph-no-capture'
|
||||||
width: '100%',
|
|
||||||
position: 'relative',
|
style={{
|
||||||
overflow: 'hidden',
|
height: '100%',
|
||||||
flex: 1,
|
width: '100%',
|
||||||
minHeight: 0,
|
position: 'relative',
|
||||||
minWidth: 0
|
overflow: 'hidden',
|
||||||
|
flex: 1,
|
||||||
|
minHeight: 0,
|
||||||
|
minWidth: 0,
|
||||||
}}>
|
}}>
|
||||||
<EmbedPDF
|
<EmbedPDF
|
||||||
engine={engine}
|
engine={engine}
|
||||||
@ -310,7 +313,7 @@ export function LocalEmbedPDF({ file, url, enableAnnotations = false, onSignatur
|
|||||||
<CustomSearchLayer pageIndex={pageIndex} scale={scale} />
|
<CustomSearchLayer pageIndex={pageIndex} scale={scale} />
|
||||||
|
|
||||||
{/* Selection layer for text interaction */}
|
{/* Selection layer for text interaction */}
|
||||||
<SelectionLayer pageIndex={pageIndex} scale={scale} />
|
<SelectionLayer pageIndex={pageIndex} scale={scale} />
|
||||||
{/* Annotation layer for signatures (only when enabled) */}
|
{/* Annotation layer for signatures (only when enabled) */}
|
||||||
{enableAnnotations && (
|
{enableAnnotations && (
|
||||||
<AnnotationLayer
|
<AnnotationLayer
|
||||||
|
|||||||
@ -134,6 +134,7 @@ export function ThumbnailSidebar({ visible, onToggle: _onToggle }: ThumbnailSide
|
|||||||
{/* Thumbnail Image */}
|
{/* Thumbnail Image */}
|
||||||
{thumbnails[pageIndex] && thumbnails[pageIndex] !== 'error' ? (
|
{thumbnails[pageIndex] && thumbnails[pageIndex] !== 'error' ? (
|
||||||
<img
|
<img
|
||||||
|
className='ph-no-capture'
|
||||||
src={thumbnails[pageIndex]}
|
src={thumbnails[pageIndex]}
|
||||||
alt={`Page ${pageIndex + 1} thumbnail`}
|
alt={`Page ${pageIndex + 1} thumbnail`}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user