mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 01:19:24 +00:00
Rems
This commit is contained in:
parent
18e4e03220
commit
1709ca9049
@ -230,7 +230,7 @@ export default function RightRail() {
|
|||||||
</div>
|
</div>
|
||||||
</Popover.Target>
|
</Popover.Target>
|
||||||
<Popover.Dropdown>
|
<Popover.Dropdown>
|
||||||
<div style={{ minWidth: 320 }}>
|
<div style={{ minWidth: '20rem' }}>
|
||||||
<SearchInterface
|
<SearchInterface
|
||||||
visible={true}
|
visible={true}
|
||||||
onClose={() => {}}
|
onClose={() => {}}
|
||||||
@ -343,7 +343,7 @@ export default function RightRail() {
|
|||||||
</div>
|
</div>
|
||||||
</Popover.Target>
|
</Popover.Target>
|
||||||
<Popover.Dropdown>
|
<Popover.Dropdown>
|
||||||
<div style={{ minWidth: 280 }}>
|
<div style={{ minWidth: '17.5rem' }}>
|
||||||
<BulkSelectionPanel
|
<BulkSelectionPanel
|
||||||
csvInput={csvInput}
|
csvInput={csvInput}
|
||||||
setCsvInput={setCsvInput}
|
setCsvInput={setCsvInput}
|
||||||
|
@ -140,7 +140,7 @@ export function PdfViewerToolbar({
|
|||||||
borderBottomRightRadius: 0,
|
borderBottomRightRadius: 0,
|
||||||
boxShadow: "0 -2px 8px rgba(0,0,0,0.04)",
|
boxShadow: "0 -2px 8px rgba(0,0,0,0.04)",
|
||||||
pointerEvents: "auto",
|
pointerEvents: "auto",
|
||||||
minWidth: 420,
|
minWidth: '26.5rem',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* First Page Button */}
|
{/* First Page Button */}
|
||||||
@ -152,7 +152,7 @@ export function PdfViewerToolbar({
|
|||||||
radius="xl"
|
radius="xl"
|
||||||
onClick={handleFirstPage}
|
onClick={handleFirstPage}
|
||||||
disabled={dynamicPage === 1}
|
disabled={dynamicPage === 1}
|
||||||
style={{ minWidth: 36 }}
|
style={{ minWidth: '2.5rem' }}
|
||||||
title={t("viewer.firstPage", "First Page")}
|
title={t("viewer.firstPage", "First Page")}
|
||||||
>
|
>
|
||||||
<FirstPageIcon fontSize="small" />
|
<FirstPageIcon fontSize="small" />
|
||||||
@ -167,7 +167,7 @@ export function PdfViewerToolbar({
|
|||||||
radius="xl"
|
radius="xl"
|
||||||
onClick={handlePreviousPage}
|
onClick={handlePreviousPage}
|
||||||
disabled={dynamicPage === 1}
|
disabled={dynamicPage === 1}
|
||||||
style={{ minWidth: 36 }}
|
style={{ minWidth: '2.5rem' }}
|
||||||
title={t("viewer.previousPage", "Previous Page")}
|
title={t("viewer.previousPage", "Previous Page")}
|
||||||
>
|
>
|
||||||
<ArrowBackIosIcon fontSize="small" />
|
<ArrowBackIosIcon fontSize="small" />
|
||||||
@ -204,7 +204,7 @@ export function PdfViewerToolbar({
|
|||||||
radius="xl"
|
radius="xl"
|
||||||
onClick={handleNextPage}
|
onClick={handleNextPage}
|
||||||
disabled={dynamicPage === dynamicTotalPages}
|
disabled={dynamicPage === dynamicTotalPages}
|
||||||
style={{ minWidth: 36 }}
|
style={{ minWidth: '2.5rem' }}
|
||||||
title={t("viewer.nextPage", "Next Page")}
|
title={t("viewer.nextPage", "Next Page")}
|
||||||
>
|
>
|
||||||
<ArrowForwardIosIcon fontSize="small" />
|
<ArrowForwardIosIcon fontSize="small" />
|
||||||
@ -219,7 +219,7 @@ export function PdfViewerToolbar({
|
|||||||
radius="xl"
|
radius="xl"
|
||||||
onClick={handleLastPage}
|
onClick={handleLastPage}
|
||||||
disabled={dynamicPage === dynamicTotalPages}
|
disabled={dynamicPage === dynamicTotalPages}
|
||||||
style={{ minWidth: 36 }}
|
style={{ minWidth: '2.5rem' }}
|
||||||
title={t("viewer.lastPage", "Last Page")}
|
title={t("viewer.lastPage", "Last Page")}
|
||||||
>
|
>
|
||||||
<LastPageIcon fontSize="small" />
|
<LastPageIcon fontSize="small" />
|
||||||
@ -232,7 +232,7 @@ export function PdfViewerToolbar({
|
|||||||
size="md"
|
size="md"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
onClick={onDualPageToggle}
|
onClick={onDualPageToggle}
|
||||||
style={{ minWidth: 36 }}
|
style={{ minWidth: '2.5rem' }}
|
||||||
title={dualPage ? t("viewer.singlePageView", "Single Page View") : t("viewer.dualPageView", "Dual Page View")}
|
title={dualPage ? t("viewer.singlePageView", "Single Page View") : t("viewer.dualPageView", "Dual Page View")}
|
||||||
>
|
>
|
||||||
{dualPage ? <DescriptionIcon fontSize="small" /> : <ViewWeekIcon fontSize="small" />}
|
{dualPage ? <DescriptionIcon fontSize="small" /> : <ViewWeekIcon fontSize="small" />}
|
||||||
@ -246,12 +246,12 @@ export function PdfViewerToolbar({
|
|||||||
size="md"
|
size="md"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
onClick={handleZoomOut}
|
onClick={handleZoomOut}
|
||||||
style={{ minWidth: 32, padding: 0 }}
|
style={{ minWidth: '2rem', padding: 0 }}
|
||||||
title={t("viewer.zoomOut", "Zoom out")}
|
title={t("viewer.zoomOut", "Zoom out")}
|
||||||
>
|
>
|
||||||
−
|
−
|
||||||
</Button>
|
</Button>
|
||||||
<span style={{ minWidth: 40, textAlign: "center" }}>
|
<span style={{ minWidth: '2.5rem', textAlign: "center" }}>
|
||||||
{dynamicZoom}%
|
{dynamicZoom}%
|
||||||
</span>
|
</span>
|
||||||
<Button
|
<Button
|
||||||
@ -260,7 +260,7 @@ export function PdfViewerToolbar({
|
|||||||
size="md"
|
size="md"
|
||||||
radius="xl"
|
radius="xl"
|
||||||
onClick={handleZoomIn}
|
onClick={handleZoomIn}
|
||||||
style={{ minWidth: 32, padding: 0 }}
|
style={{ minWidth: '2rem', padding: 0 }}
|
||||||
title={t("viewer.zoomIn", "Zoom in")}
|
title={t("viewer.zoomIn", "Zoom in")}
|
||||||
>
|
>
|
||||||
+
|
+
|
||||||
|
@ -120,7 +120,8 @@ export function SearchInterface({ visible, onClose }: SearchInterfaceProps) {
|
|||||||
const handleJumpToResult = (index: number) => {
|
const handleJumpToResult = (index: number) => {
|
||||||
const searchAPI = (window as any).embedPdfSearch;
|
const searchAPI = (window as any).embedPdfSearch;
|
||||||
if (searchAPI && resultInfo && index >= 1 && index <= resultInfo.totalResults) {
|
if (searchAPI && resultInfo && index >= 1 && index <= resultInfo.totalResults) {
|
||||||
searchAPI.goToResult(index);
|
// Convert 1-based user input to 0-based API index
|
||||||
|
searchAPI.goToResult(index - 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -200,7 +201,7 @@ export function SearchInterface({ visible, onClose }: SearchInterfaceProps) {
|
|||||||
onKeyDown={handleJumpToKeyDown}
|
onKeyDown={handleJumpToKeyDown}
|
||||||
onBlur={handleJumpToSubmit}
|
onBlur={handleJumpToSubmit}
|
||||||
placeholder={resultInfo.currentIndex.toString()}
|
placeholder={resultInfo.currentIndex.toString()}
|
||||||
style={{ width: '50px' }}
|
style={{ width: '3rem' }}
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
max={resultInfo.totalResults}
|
max={resultInfo.totalResults}
|
||||||
|
@ -111,7 +111,7 @@ export function ThumbnailSidebar({ visible, onToggle, colorScheme }: ThumbnailSi
|
|||||||
right: 0,
|
right: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
width: '240px',
|
width: '15rem',
|
||||||
backgroundColor: actualColorScheme === 'dark' ? '#1a1b1e' : '#f8f9fa',
|
backgroundColor: actualColorScheme === 'dark' ? '#1a1b1e' : '#f8f9fa',
|
||||||
borderLeft: `1px solid ${actualColorScheme === 'dark' ? '#373A40' : '#e9ecef'}`,
|
borderLeft: `1px solid ${actualColorScheme === 'dark' ? '#373A40' : '#e9ecef'}`,
|
||||||
zIndex: 998,
|
zIndex: 998,
|
||||||
@ -174,8 +174,8 @@ export function ThumbnailSidebar({ visible, onToggle, colorScheme }: ThumbnailSi
|
|||||||
/>
|
/>
|
||||||
) : thumbnails[pageIndex] === 'error' ? (
|
) : thumbnails[pageIndex] === 'error' ? (
|
||||||
<div style={{
|
<div style={{
|
||||||
width: '180px',
|
width: '11.5rem',
|
||||||
height: '240px',
|
height: '15rem',
|
||||||
backgroundColor: actualColorScheme === 'dark' ? '#2d1b1b' : '#ffebee',
|
backgroundColor: actualColorScheme === 'dark' ? '#2d1b1b' : '#ffebee',
|
||||||
border: `1px solid ${actualColorScheme === 'dark' ? '#5d3737' : '#ffcdd2'}`,
|
border: `1px solid ${actualColorScheme === 'dark' ? '#5d3737' : '#ffcdd2'}`,
|
||||||
borderRadius: '4px',
|
borderRadius: '4px',
|
||||||
@ -189,8 +189,8 @@ export function ThumbnailSidebar({ visible, onToggle, colorScheme }: ThumbnailSi
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div style={{
|
<div style={{
|
||||||
width: '180px',
|
width: '11.5rem',
|
||||||
height: '240px',
|
height: '15rem',
|
||||||
backgroundColor: actualColorScheme === 'dark' ? '#25262b' : '#f8f9fa',
|
backgroundColor: actualColorScheme === 'dark' ? '#25262b' : '#f8f9fa',
|
||||||
border: `1px solid ${actualColorScheme === 'dark' ? '#373A40' : '#e9ecef'}`,
|
border: `1px solid ${actualColorScheme === 'dark' ? '#373A40' : '#e9ecef'}`,
|
||||||
borderRadius: '4px',
|
borderRadius: '4px',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user