mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
Merge 7f450ba070 into 5c9e590856
This commit is contained in:
commit
a8d1378ba3
@ -849,6 +849,11 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"failed": "An error occurred while merging the PDFs."
|
"failed": "An error occurred while merging the PDFs."
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"header": {
|
||||||
|
"title": "Merge Settings Overview"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"split": {
|
"split": {
|
||||||
@ -2163,6 +2168,14 @@
|
|||||||
"title": "About Remove Annotations",
|
"title": "About Remove Annotations",
|
||||||
"description": "This tool will remove all annotations (comments, highlights, notes, etc.) from your PDF documents."
|
"description": "This tool will remove all annotations (comments, highlights, notes, etc.) from your PDF documents."
|
||||||
},
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"header": {
|
||||||
|
"title": "About Remove Annotations"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"title": "What it does"
|
||||||
|
}
|
||||||
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"failed": "An error occurred while removing annotations from the PDF."
|
"failed": "An error occurred while removing annotations from the PDF."
|
||||||
}
|
}
|
||||||
@ -2625,6 +2638,9 @@
|
|||||||
"header": {
|
"header": {
|
||||||
"title": "How Auto-Rename Works"
|
"title": "How Auto-Rename Works"
|
||||||
},
|
},
|
||||||
|
"description": {
|
||||||
|
"title": "What it does"
|
||||||
|
},
|
||||||
"howItWorks": {
|
"howItWorks": {
|
||||||
"title": "Smart Renaming",
|
"title": "Smart Renaming",
|
||||||
"text": "Automatically finds the title from your PDF content and uses it as the filename.",
|
"text": "Automatically finds the title from your PDF content and uses it as the filename.",
|
||||||
@ -2632,6 +2648,9 @@
|
|||||||
"bullet2": "Creates a clean, valid filename from the detected title",
|
"bullet2": "Creates a clean, valid filename from the detected title",
|
||||||
"bullet3": "Keeps the original name if no suitable title is found"
|
"bullet3": "Keeps the original name if no suitable title is found"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"title": "About"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"adjust-contrast": {
|
"adjust-contrast": {
|
||||||
@ -4703,6 +4722,14 @@
|
|||||||
"addMoreFiles": "Add more files...",
|
"addMoreFiles": "Add more files...",
|
||||||
"selectedFiles": "Selected Files",
|
"selectedFiles": "Selected Files",
|
||||||
"submit": "Add Attachments",
|
"submit": "Add Attachments",
|
||||||
|
"tooltip": {
|
||||||
|
"header": {
|
||||||
|
"title": "About Add Attachments"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"title": "What it does"
|
||||||
|
}
|
||||||
|
},
|
||||||
"results": {
|
"results": {
|
||||||
"title": "Attachment Results"
|
"title": "Attachment Results"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Allows selecting files to attach to PDFs.
|
* Allows selecting files to attach to PDFs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Stack, Text, Group, ActionIcon, Alert, ScrollArea, Button } from "@mantine/core";
|
import { Stack, Text, Group, ActionIcon, ScrollArea, Button } from "@mantine/core";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { AddAttachmentsParameters } from "@app/hooks/tools/addAttachments/useAddAttachmentsParameters";
|
import { AddAttachmentsParameters } from "@app/hooks/tools/addAttachments/useAddAttachmentsParameters";
|
||||||
import LocalIcon from "@app/components/shared/LocalIcon";
|
import LocalIcon from "@app/components/shared/LocalIcon";
|
||||||
@ -20,16 +20,7 @@ const AddAttachmentsSettings = ({ parameters, onParameterChange, disabled = fals
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
<Alert color="blue" variant="light">
|
|
||||||
<Text size="sm">
|
|
||||||
{t("AddAttachmentsRequest.info", "Select files to attach to your PDF. These files will be embedded and accessible through the PDF's attachment panel.")}
|
|
||||||
</Text>
|
|
||||||
</Alert>
|
|
||||||
|
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<Text size="sm" fw={500}>
|
|
||||||
{t("AddAttachmentsRequest.selectFiles", "Select Files to Attach")}
|
|
||||||
</Text>
|
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
multiple
|
multiple
|
||||||
|
|||||||
@ -1,24 +1,9 @@
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { Stack } from '@mantine/core';
|
||||||
import { Stack, Text, Alert } from '@mantine/core';
|
|
||||||
import LocalIcon from '@app/components/shared/LocalIcon';
|
|
||||||
|
|
||||||
const RemoveAnnotationsSettings = () => {
|
const RemoveAnnotationsSettings = () => {
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
<Alert
|
{/* No settings needed for this tool - description is in tooltip */}
|
||||||
icon={<LocalIcon icon="info-rounded" width="1.2rem" height="1.2rem" />}
|
|
||||||
title={t('removeAnnotations.info.title', 'About Remove Annotations')}
|
|
||||||
color="blue"
|
|
||||||
variant="light"
|
|
||||||
>
|
|
||||||
<Text size="sm">
|
|
||||||
{t('removeAnnotations.info.description',
|
|
||||||
'This tool will remove all annotations (comments, highlights, notes, etc.) from your PDF documents.'
|
|
||||||
)}
|
|
||||||
</Text>
|
|
||||||
</Alert>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { TooltipContent } from '@app/types/tips';
|
||||||
|
|
||||||
|
export const useAddAttachmentsTips = (): TooltipContent => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return {
|
||||||
|
header: {
|
||||||
|
title: t("AddAttachmentsRequest.tooltip.header.title", "About Add Attachments")
|
||||||
|
},
|
||||||
|
tips: [
|
||||||
|
{
|
||||||
|
title: t("AddAttachmentsRequest.tooltip.description.title", "What it does"),
|
||||||
|
description: t("AddAttachmentsRequest.info", "Select files to attach to your PDF. These files will be embedded and accessible through the PDF's attachment panel."),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
@ -9,6 +9,10 @@ export const useAutoRenameTips = (): TooltipContent => {
|
|||||||
title: t("auto-rename.tooltip.header.title", "How Auto-Rename Works")
|
title: t("auto-rename.tooltip.header.title", "How Auto-Rename Works")
|
||||||
},
|
},
|
||||||
tips: [
|
tips: [
|
||||||
|
{
|
||||||
|
title: t("auto-rename.tooltip.description.title", "What it does"),
|
||||||
|
description: t("auto-rename.description", "Automatically finds the title from your PDF content and uses it as the filename."),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("auto-rename.tooltip.howItWorks.title", "Smart Renaming"),
|
title: t("auto-rename.tooltip.howItWorks.title", "Smart Renaming"),
|
||||||
bullets: [
|
bullets: [
|
||||||
|
|||||||
@ -5,6 +5,9 @@ export const useMergeTips = (): TooltipContent => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
header: {
|
||||||
|
title: t('merge.tooltip.header.title', 'Merge Settings Overview')
|
||||||
|
},
|
||||||
tips: [
|
tips: [
|
||||||
{
|
{
|
||||||
title: t('merge.removeDigitalSignature.tooltip.title', 'Remove Digital Signature'),
|
title: t('merge.removeDigitalSignature.tooltip.title', 'Remove Digital Signature'),
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { TooltipContent } from '@app/types/tips';
|
||||||
|
|
||||||
|
export const useRemoveAnnotationsTips = (): TooltipContent => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return {
|
||||||
|
header: {
|
||||||
|
title: t("removeAnnotations.tooltip.header.title", "About Remove Annotations")
|
||||||
|
},
|
||||||
|
tips: [
|
||||||
|
{
|
||||||
|
title: t("removeAnnotations.tooltip.description.title", "What it does"),
|
||||||
|
description: t('removeAnnotations.info.description',
|
||||||
|
'This tool will remove all annotations (comments, highlights, notes, etc.) from your PDF documents.'
|
||||||
|
),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
@ -8,10 +8,12 @@ import { useAddAttachmentsParameters } from "@app/hooks/tools/addAttachments/use
|
|||||||
import { useAddAttachmentsOperation } from "@app/hooks/tools/addAttachments/useAddAttachmentsOperation";
|
import { useAddAttachmentsOperation } from "@app/hooks/tools/addAttachments/useAddAttachmentsOperation";
|
||||||
import { useAccordionSteps } from "@app/hooks/tools/shared/useAccordionSteps";
|
import { useAccordionSteps } from "@app/hooks/tools/shared/useAccordionSteps";
|
||||||
import AddAttachmentsSettings from "@app/components/tools/addAttachments/AddAttachmentsSettings";
|
import AddAttachmentsSettings from "@app/components/tools/addAttachments/AddAttachmentsSettings";
|
||||||
|
import { useAddAttachmentsTips } from "@app/components/tooltips/useAddAttachmentsTips";
|
||||||
|
|
||||||
const AddAttachments = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {
|
const AddAttachments = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { selectedFiles } = useFileSelection();
|
const { selectedFiles } = useFileSelection();
|
||||||
|
const addAttachmentsTips = useAddAttachmentsTips();
|
||||||
|
|
||||||
const params = useAddAttachmentsParameters();
|
const params = useAddAttachmentsParameters();
|
||||||
const operation = useAddAttachmentsOperation();
|
const operation = useAddAttachmentsOperation();
|
||||||
@ -64,6 +66,7 @@ const AddAttachments = ({ onPreviewFile, onComplete, onError }: BaseToolProps) =
|
|||||||
isCollapsed: accordion.getCollapsedState(AddAttachmentsStep.ATTACHMENTS),
|
isCollapsed: accordion.getCollapsedState(AddAttachmentsStep.ATTACHMENTS),
|
||||||
onCollapsedClick: () => accordion.handleStepToggle(AddAttachmentsStep.ATTACHMENTS),
|
onCollapsedClick: () => accordion.handleStepToggle(AddAttachmentsStep.ATTACHMENTS),
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
|
tooltip: addAttachmentsTips,
|
||||||
content: (
|
content: (
|
||||||
<AddAttachmentsSettings
|
<AddAttachmentsSettings
|
||||||
parameters={params.parameters}
|
parameters={params.parameters}
|
||||||
|
|||||||
@ -9,21 +9,28 @@ import { useAutoRenameTips } from "@app/components/tooltips/useAutoRenameTips";
|
|||||||
|
|
||||||
const AutoRename =(props: BaseToolProps) => {
|
const AutoRename =(props: BaseToolProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const autoRenameTips = useAutoRenameTips();
|
||||||
|
|
||||||
const base = useBaseTool(
|
const base = useBaseTool(
|
||||||
'"auto-rename-pdf-file',
|
'auto-rename-pdf-file',
|
||||||
useAutoRenameParameters,
|
useAutoRenameParameters,
|
||||||
useAutoRenameOperation,
|
useAutoRenameOperation,
|
||||||
props
|
props
|
||||||
);
|
);
|
||||||
|
|
||||||
return createToolFlow({
|
return createToolFlow({
|
||||||
title: { title:t("auto-rename.title", "Auto Rename PDF"), description: t("auto-rename.description", "Auto Rename PDF"), tooltip: useAutoRenameTips()},
|
|
||||||
files: {
|
files: {
|
||||||
selectedFiles: base.selectedFiles,
|
selectedFiles: base.selectedFiles,
|
||||||
isCollapsed: base.hasResults,
|
isCollapsed: base.hasResults,
|
||||||
},
|
},
|
||||||
steps: [],
|
steps: [
|
||||||
|
{
|
||||||
|
title: t("auto-rename.settings.title", "About"),
|
||||||
|
isCollapsed: false,
|
||||||
|
tooltip: autoRenameTips,
|
||||||
|
content: null,
|
||||||
|
},
|
||||||
|
],
|
||||||
executeButton: {
|
executeButton: {
|
||||||
text: t("auto-rename.submit", "Auto Rename"),
|
text: t("auto-rename.submit", "Auto Rename"),
|
||||||
isVisible: !base.hasResults,
|
isVisible: !base.hasResults,
|
||||||
|
|||||||
@ -5,9 +5,11 @@ import { useRemoveAnnotationsParameters } from "@app/hooks/tools/removeAnnotatio
|
|||||||
import { useRemoveAnnotationsOperation } from "@app/hooks/tools/removeAnnotations/useRemoveAnnotationsOperation";
|
import { useRemoveAnnotationsOperation } from "@app/hooks/tools/removeAnnotations/useRemoveAnnotationsOperation";
|
||||||
import { useBaseTool } from "@app/hooks/tools/shared/useBaseTool";
|
import { useBaseTool } from "@app/hooks/tools/shared/useBaseTool";
|
||||||
import { BaseToolProps, ToolComponent } from "@app/types/tool";
|
import { BaseToolProps, ToolComponent } from "@app/types/tool";
|
||||||
|
import { useRemoveAnnotationsTips } from "@app/components/tooltips/useRemoveAnnotationsTips";
|
||||||
|
|
||||||
const RemoveAnnotations = (props: BaseToolProps) => {
|
const RemoveAnnotations = (props: BaseToolProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const removeAnnotationsTips = useRemoveAnnotationsTips();
|
||||||
|
|
||||||
const base = useBaseTool(
|
const base = useBaseTool(
|
||||||
'removeAnnotations',
|
'removeAnnotations',
|
||||||
@ -26,6 +28,7 @@ const RemoveAnnotations = (props: BaseToolProps) => {
|
|||||||
title: t("removeAnnotations.settings.title", "Settings"),
|
title: t("removeAnnotations.settings.title", "Settings"),
|
||||||
isCollapsed: base.settingsCollapsed,
|
isCollapsed: base.settingsCollapsed,
|
||||||
onCollapsedClick: base.settingsCollapsed ? base.handleSettingsReset : undefined,
|
onCollapsedClick: base.settingsCollapsed ? base.handleSettingsReset : undefined,
|
||||||
|
tooltip: removeAnnotationsTips,
|
||||||
content: <RemoveAnnotationsSettings />,
|
content: <RemoveAnnotationsSettings />,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user