mostly formatting, dependency fix

This commit is contained in:
2026-05-17 02:39:32 +02:00
parent a5dc70aabf
commit cf9a0dd0b7
32 changed files with 837 additions and 836 deletions

View File

@@ -1,4 +1,4 @@
import React, { useEffect } from "react";
import React, { useEffect } from 'react';
interface HelpDialogProps {
open: boolean;
@@ -6,55 +6,55 @@ interface HelpDialogProps {
}
const shortcuts = [
{ keys: "F1 / ?", description: "Open this help and tutorial dialog" },
{ keys: 'F1 / ?', description: 'Open this help and tutorial dialog' },
{
keys: "Ctrl/⌘ + A",
description: "Select all pages in the current workspace",
keys: 'Ctrl/⌘ + A',
description: 'Select all pages in the current workspace',
},
{
keys: "Delete / Backspace",
description: "Delete the selected pages after confirmation",
keys: 'Delete / Backspace',
description: 'Delete the selected pages after confirmation',
},
{
keys: "Esc",
description: "Clear the page selection or close an open dialog",
keys: 'Esc',
description: 'Clear the page selection or close an open dialog',
},
{ keys: "Ctrl/⌘ + Z", description: "Undo the latest workspace command" },
{ keys: 'Ctrl/⌘ + Z', description: 'Undo the latest workspace command' },
{
keys: "Ctrl/⌘ + Shift + Z",
description: "Redo the next workspace command",
keys: 'Ctrl/⌘ + Shift + Z',
description: 'Redo the next workspace command',
},
{ keys: "Ctrl/⌘ + Y", description: "Redo the next workspace command" },
{ keys: 'Ctrl/⌘ + Y', description: 'Redo the next workspace command' },
{
keys: "← / → in preview",
description: "Move to the previous or next page in the preview overlay",
keys: '← / → in preview',
description: 'Move to the previous or next page in the preview overlay',
},
];
const tutorialSteps = [
{
title: "1. Open a PDF or load a workspace",
body: "Start by selecting a local PDF file. If you saved workspaces before, you can restore one from browser storage instead.",
title: '1. Open a PDF or load a workspace',
body: 'Start by selecting a local PDF file. If you saved workspaces before, you can restore one from browser storage instead.',
},
{
title: "2. Arrange pages visually",
body: "Drag page cards to reorder them. Rotate single pages, open the large preview with a click, or remove pages you do not want in the export.",
title: '2. Arrange pages visually',
body: 'Drag page cards to reorder them. Rotate single pages, open the large preview with a click, or remove pages you do not want in the export.',
},
{
title: "3. Select, copy, and delete pages",
body: "Use the checkbox on a page card to select it. Shift-click extends a range. Dragging a selected page moves the whole selection; the copy controls duplicate selected pages into a chosen slot.",
title: '3. Select, copy, and delete pages',
body: 'Use the checkbox on a page card to select it. Shift-click extends a range. Dragging a selected page moves the whole selection; the copy controls duplicate selected pages into a chosen slot.',
},
{
title: "4. Extract selected pages or branch into a new workspace",
body: "Extract selected pages when you only need a download. Open the selection as a new workspace when you want to continue working on that subset.",
title: '4. Extract selected pages or branch into a new workspace',
body: 'Extract selected pages when you only need a download. Open the selection as a new workspace when you want to continue working on that subset.',
},
{
title: "5. Save your workspace or export a PDF",
body: "Saving a workspace keeps the current working state in this browser. Exporting creates a new PDF file for download.",
title: '5. Save your workspace or export a PDF',
body: 'Saving a workspace keeps the current working state in this browser. Exporting creates a new PDF file for download.',
},
{
title: "6. Use history deliberately",
body: "Each workspace operation is stored as a command with label and timestamp. Undo and redo walk through that command history.",
title: '6. Use history deliberately',
body: 'Each workspace operation is stored as a command with label and timestamp. Undo and redo walk through that command history.',
},
];
@@ -63,7 +63,7 @@ const HelpDialog: React.FC<HelpDialogProps> = ({ open, onClose }) => {
if (!open) return;
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key !== "Escape") return;
if (e.key !== 'Escape') return;
e.preventDefault();
e.stopPropagation();
@@ -71,10 +71,10 @@ const HelpDialog: React.FC<HelpDialogProps> = ({ open, onClose }) => {
onClose();
};
window.addEventListener("keydown", handleKeyDown, { capture: true });
window.addEventListener('keydown', handleKeyDown, { capture: true });
return () => {
window.removeEventListener("keydown", handleKeyDown, { capture: true });
window.removeEventListener('keydown', handleKeyDown, { capture: true });
};
}, [open, onClose]);