mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-22 04:09:22 +00:00
Improve titles, headers and tooltips in Add Password and Change Permissions (#4210)
# Description of Changes Improve titles, headers and tooltips in Add Password and Change Permissions
This commit is contained in:
parent
ecf30d1028
commit
22db7bec76
@ -72,6 +72,9 @@
|
|||||||
"githubSubmit": "GitHub - Submit a ticket",
|
"githubSubmit": "GitHub - Submit a ticket",
|
||||||
"discordSubmit": "Discord - Submit Support post"
|
"discordSubmit": "Discord - Submit Support post"
|
||||||
},
|
},
|
||||||
|
"warning": {
|
||||||
|
"tooltipTitle": "Warning"
|
||||||
|
},
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
@ -1786,9 +1789,8 @@
|
|||||||
"error": {
|
"error": {
|
||||||
"failed": "An error occurred while encrypting the PDF."
|
"failed": "An error occurred while encrypting the PDF."
|
||||||
},
|
},
|
||||||
|
"title": "Passwords & Encryption",
|
||||||
"passwords": {
|
"passwords": {
|
||||||
"title": "Passwords",
|
|
||||||
"stepTitle": "Passwords & Encryption",
|
|
||||||
"completed": "Passwords configured",
|
"completed": "Passwords configured",
|
||||||
"user": {
|
"user": {
|
||||||
"label": "User Password",
|
"label": "User Password",
|
||||||
@ -1799,13 +1801,9 @@
|
|||||||
"placeholder": "Enter owner password"
|
"placeholder": "Enter owner password"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"permissions": {
|
|
||||||
"stepTitle": "Document Permissions"
|
|
||||||
},
|
|
||||||
"encryption": {
|
"encryption": {
|
||||||
"title": "Encryption",
|
|
||||||
"keyLength": {
|
"keyLength": {
|
||||||
"label": "Key Length",
|
"label": "Encryption Key Length",
|
||||||
"40bit": "40-bit (Low)",
|
"40bit": "40-bit (Low)",
|
||||||
"128bit": "128-bit (Standard)",
|
"128bit": "128-bit (Standard)",
|
||||||
"256bit": "256-bit (High)"
|
"256bit": "256-bit (High)"
|
||||||
@ -1831,20 +1829,19 @@
|
|||||||
"bullet2": "128-bit: Standard security, widely supported",
|
"bullet2": "128-bit: Standard security, widely supported",
|
||||||
"bullet3": "256-bit: Maximum security, requires modern viewers"
|
"bullet3": "256-bit: Maximum security, requires modern viewers"
|
||||||
},
|
},
|
||||||
"restrictions": {
|
"permissions": {
|
||||||
"title": "Document Restrictions",
|
"text": "These permissions control what users can do with the PDF. Most effective when combined with an owner password."
|
||||||
"text": "These restrictions control what users can do with the PDF. Most effective when combined with an owner password."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changePermissions": {
|
"changePermissions": {
|
||||||
"completed": "Permissions changed",
|
"completed": "Permissions changed",
|
||||||
"submit": "Change Permissions",
|
"submit": "Change Permissions",
|
||||||
|
"title": "Document Permissions",
|
||||||
"error": {
|
"error": {
|
||||||
"failed": "An error occurred while changing PDF permissions."
|
"failed": "An error occurred while changing PDF permissions."
|
||||||
},
|
},
|
||||||
"restrictions": {
|
"permissions": {
|
||||||
"title": "Document Restrictions",
|
|
||||||
"preventAssembly": {
|
"preventAssembly": {
|
||||||
"label": "Prevent assembly of document"
|
"label": "Prevent assembly of document"
|
||||||
},
|
},
|
||||||
@ -1878,8 +1875,10 @@
|
|||||||
"title": "Change Permissions"
|
"title": "Change Permissions"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"title": "Description",
|
"text": "Changes document permissions, allowing/disallowing access to different features in PDF readers."
|
||||||
"text": "Changes document permissions. Warning: To make these restrictions unchangeable, use the Add Password tool to set an owner password."
|
},
|
||||||
|
"warning": {
|
||||||
|
"text": "To make these permissions unchangeable, use the Add Password tool to set an owner password."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,9 @@
|
|||||||
"githubSubmit": "GitHub - Submit a ticket",
|
"githubSubmit": "GitHub - Submit a ticket",
|
||||||
"discordSubmit": "Discord - Submit Support post"
|
"discordSubmit": "Discord - Submit Support post"
|
||||||
},
|
},
|
||||||
|
"warning": {
|
||||||
|
"tooltipTitle": "Warning"
|
||||||
|
},
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
@ -1655,9 +1658,8 @@
|
|||||||
"stepTitle": "Document Permissions"
|
"stepTitle": "Document Permissions"
|
||||||
},
|
},
|
||||||
"encryption": {
|
"encryption": {
|
||||||
"title": "Encryption",
|
|
||||||
"keyLength": {
|
"keyLength": {
|
||||||
"label": "Key Length",
|
"label": "Encryption Key Length",
|
||||||
"40bit": "40-bit (Low)",
|
"40bit": "40-bit (Low)",
|
||||||
"128bit": "128-bit (Standard)",
|
"128bit": "128-bit (Standard)",
|
||||||
"256bit": "256-bit (High)"
|
"256bit": "256-bit (High)"
|
||||||
@ -1683,20 +1685,19 @@
|
|||||||
"bullet2": "128-bit: Standard security, widely supported",
|
"bullet2": "128-bit: Standard security, widely supported",
|
||||||
"bullet3": "256-bit: Maximum security, requires modern viewers"
|
"bullet3": "256-bit: Maximum security, requires modern viewers"
|
||||||
},
|
},
|
||||||
"restrictions": {
|
"permissions": {
|
||||||
"title": "Document Restrictions",
|
"text": "These permissions control what users can do with the PDF. Most effective when combined with an owner password."
|
||||||
"text": "These restrictions control what users can do with the PDF. Most effective when combined with an owner password."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changePermissions": {
|
"changePermissions": {
|
||||||
"completed": "Permissions changed",
|
"completed": "Permissions changed",
|
||||||
"submit": "Change Permissions",
|
"submit": "Change Permissions",
|
||||||
|
"title": "Document Permissions",
|
||||||
"error": {
|
"error": {
|
||||||
"failed": "An error occurred while changing PDF permissions."
|
"failed": "An error occurred while changing PDF permissions."
|
||||||
},
|
},
|
||||||
"restrictions": {
|
"permissions": {
|
||||||
"title": "Document Restrictions",
|
|
||||||
"preventAssembly": {
|
"preventAssembly": {
|
||||||
"label": "Prevent assembly of document"
|
"label": "Prevent assembly of document"
|
||||||
},
|
},
|
||||||
@ -1730,8 +1731,10 @@
|
|||||||
"title": "Change Permissions"
|
"title": "Change Permissions"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"title": "Description",
|
"text": "Changes document permissions, allowing/disallowing access to different features in PDF readers."
|
||||||
"text": "Changes document permissions. Warning: To make these restrictions unchangeable, use the Add Password tool to set an owner password."
|
},
|
||||||
|
"warning": {
|
||||||
|
"text": "To make these permissions unchangeable, use the Add Password tool to set an owner password."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,8 +63,8 @@ describe('AddPasswordSettings', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Check that main section titles are rendered
|
// Check that main section titles are rendered
|
||||||
expect(screen.getByText('mock-addPassword.passwords.title')).toBeInTheDocument();
|
expect(screen.getByText('mock-addPassword.passwords.user.label')).toBeInTheDocument();
|
||||||
expect(screen.getByText('mock-addPassword.encryption.title')).toBeInTheDocument();
|
expect(screen.getByText('mock-addPassword.encryption.keyLength.label')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should call onParameterChange when password fields are modified', () => {
|
test('should call onParameterChange when password fields are modified', () => {
|
||||||
@ -154,8 +154,6 @@ describe('AddPasswordSettings', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Verify that translation keys are being called
|
// Verify that translation keys are being called
|
||||||
expect(mockT).toHaveBeenCalledWith('addPassword.passwords.title', 'Passwords');
|
|
||||||
expect(mockT).toHaveBeenCalledWith('addPassword.encryption.title', 'Encryption');
|
|
||||||
expect(mockT).toHaveBeenCalledWith('addPassword.passwords.user.label', 'User Password');
|
expect(mockT).toHaveBeenCalledWith('addPassword.passwords.user.label', 'User Password');
|
||||||
expect(mockT).toHaveBeenCalledWith('addPassword.passwords.owner.label', 'Owner Password');
|
expect(mockT).toHaveBeenCalledWith('addPassword.passwords.owner.label', 'Owner Password');
|
||||||
});
|
});
|
||||||
|
@ -16,7 +16,6 @@ const AddPasswordSettings = ({ parameters, onParameterChange, disabled = false }
|
|||||||
<Stack gap="md">
|
<Stack gap="md">
|
||||||
{/* Password Settings */}
|
{/* Password Settings */}
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Text size="sm" fw={500}>{t('addPassword.passwords.title', 'Passwords')}</Text>
|
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
label={t('addPassword.passwords.user.label', 'User Password')}
|
label={t('addPassword.passwords.user.label', 'User Password')}
|
||||||
placeholder={t('addPassword.passwords.user.placeholder', 'Enter user password')}
|
placeholder={t('addPassword.passwords.user.placeholder', 'Enter user password')}
|
||||||
@ -35,9 +34,8 @@ const AddPasswordSettings = ({ parameters, onParameterChange, disabled = false }
|
|||||||
|
|
||||||
{/* Encryption Settings */}
|
{/* Encryption Settings */}
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Text size="sm" fw={500}>{t('addPassword.encryption.title', 'Encryption')}</Text>
|
|
||||||
<Select
|
<Select
|
||||||
label={t('addPassword.encryption.keyLength.label', 'Key Length')}
|
label={t('addPassword.encryption.keyLength.label', 'Encryption Key Length')}
|
||||||
value={parameters.keyLength.toString()}
|
value={parameters.keyLength.toString()}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
@ -23,19 +23,6 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
vi.clearAllMocks();
|
vi.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render section title', () => {
|
|
||||||
render(
|
|
||||||
<TestWrapper>
|
|
||||||
<ChangePermissionsSettings
|
|
||||||
parameters={defaultParameters}
|
|
||||||
onParameterChange={mockOnParameterChange}
|
|
||||||
/>
|
|
||||||
</TestWrapper>
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(screen.getByText('mock-changePermissions.restrictions.title')).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should render all permission checkboxes', () => {
|
test('should render all permission checkboxes', () => {
|
||||||
render(
|
render(
|
||||||
<TestWrapper>
|
<TestWrapper>
|
||||||
@ -52,10 +39,10 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
expect(checkboxes).toHaveLength(permissionKeys.length);
|
expect(checkboxes).toHaveLength(permissionKeys.length);
|
||||||
|
|
||||||
// Verify specific permission labels are rendered
|
// Verify specific permission labels are rendered
|
||||||
expect(screen.getByText('mock-changePermissions.restrictions.preventAssembly.label')).toBeInTheDocument();
|
expect(screen.getByText('mock-changePermissions.permissions.preventAssembly.label')).toBeInTheDocument();
|
||||||
expect(screen.getByText('mock-changePermissions.restrictions.preventPrinting.label')).toBeInTheDocument();
|
expect(screen.getByText('mock-changePermissions.permissions.preventPrinting.label')).toBeInTheDocument();
|
||||||
expect(screen.getByText('mock-changePermissions.restrictions.preventModify.label')).toBeInTheDocument();
|
expect(screen.getByText('mock-changePermissions.permissions.preventModify.label')).toBeInTheDocument();
|
||||||
expect(screen.getByText('mock-changePermissions.restrictions.preventExtractContent.label')).toBeInTheDocument();
|
expect(screen.getByText('mock-changePermissions.permissions.preventExtractContent.label')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render all permission types with correct labels', () => {
|
test('should render all permission types with correct labels', () => {
|
||||||
@ -71,7 +58,7 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
const permissionKeys = Object.keys(defaultParameters) as Array<keyof ChangePermissionsParameters>;
|
const permissionKeys = Object.keys(defaultParameters) as Array<keyof ChangePermissionsParameters>;
|
||||||
|
|
||||||
permissionKeys.forEach(permission => {
|
permissionKeys.forEach(permission => {
|
||||||
expect(screen.getByText(`mock-changePermissions.restrictions.${permission}.label`)).toBeInTheDocument();
|
expect(screen.getByText(`mock-changePermissions.permissions.${permission}.label`)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -109,10 +96,10 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Find specific checkboxes by their labels and verify they are checked
|
// Find specific checkboxes by their labels and verify they are checked
|
||||||
const assemblyCheckbox = screen.getByLabelText('mock-changePermissions.restrictions.preventAssembly.label') as HTMLInputElement;
|
const assemblyCheckbox = screen.getByLabelText('mock-changePermissions.permissions.preventAssembly.label') as HTMLInputElement;
|
||||||
const printingCheckbox = screen.getByLabelText('mock-changePermissions.restrictions.preventPrinting.label') as HTMLInputElement;
|
const printingCheckbox = screen.getByLabelText('mock-changePermissions.permissions.preventPrinting.label') as HTMLInputElement;
|
||||||
const modifyCheckbox = screen.getByLabelText('mock-changePermissions.restrictions.preventModify.label') as HTMLInputElement;
|
const modifyCheckbox = screen.getByLabelText('mock-changePermissions.permissions.preventModify.label') as HTMLInputElement;
|
||||||
const formCheckbox = screen.getByLabelText('mock-changePermissions.restrictions.preventFillInForm.label') as HTMLInputElement;
|
const formCheckbox = screen.getByLabelText('mock-changePermissions.permissions.preventFillInForm.label') as HTMLInputElement;
|
||||||
|
|
||||||
expect(assemblyCheckbox.checked).toBe(true);
|
expect(assemblyCheckbox.checked).toBe(true);
|
||||||
expect(printingCheckbox.checked).toBe(true);
|
expect(printingCheckbox.checked).toBe(true);
|
||||||
@ -138,7 +125,7 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
</TestWrapper>
|
</TestWrapper>
|
||||||
);
|
);
|
||||||
|
|
||||||
const assemblyCheckbox = screen.getByLabelText('mock-changePermissions.restrictions.preventAssembly.label');
|
const assemblyCheckbox = screen.getByLabelText('mock-changePermissions.permissions.preventAssembly.label');
|
||||||
fireEvent.click(assemblyCheckbox);
|
fireEvent.click(assemblyCheckbox);
|
||||||
|
|
||||||
expect(mockOnParameterChange).toHaveBeenCalledWith('preventAssembly', expectedValue);
|
expect(mockOnParameterChange).toHaveBeenCalledWith('preventAssembly', expectedValue);
|
||||||
@ -155,8 +142,8 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Click multiple checkboxes
|
// Click multiple checkboxes
|
||||||
const assemblyCheckbox = screen.getByLabelText('mock-changePermissions.restrictions.preventAssembly.label');
|
const assemblyCheckbox = screen.getByLabelText('mock-changePermissions.permissions.preventAssembly.label');
|
||||||
const printingCheckbox = screen.getByLabelText('mock-changePermissions.restrictions.preventPrinting.label');
|
const printingCheckbox = screen.getByLabelText('mock-changePermissions.permissions.preventPrinting.label');
|
||||||
|
|
||||||
fireEvent.click(assemblyCheckbox);
|
fireEvent.click(assemblyCheckbox);
|
||||||
fireEvent.click(printingCheckbox);
|
fireEvent.click(printingCheckbox);
|
||||||
@ -196,12 +183,9 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
</TestWrapper>
|
</TestWrapper>
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify that translation keys are being called
|
|
||||||
expect(mockT).toHaveBeenCalledWith('changePermissions.restrictions.title', 'Document Restrictions');
|
|
||||||
|
|
||||||
const permissionKeys = Object.keys(defaultParameters) as Array<keyof ChangePermissionsParameters>;
|
const permissionKeys = Object.keys(defaultParameters) as Array<keyof ChangePermissionsParameters>;
|
||||||
permissionKeys.forEach(permission => {
|
permissionKeys.forEach(permission => {
|
||||||
expect(mockT).toHaveBeenCalledWith(`changePermissions.restrictions.${permission}.label`, permission);
|
expect(mockT).toHaveBeenCalledWith(`changePermissions.permissions.${permission}.label`, permission);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -220,7 +204,7 @@ describe('ChangePermissionsSettings', () => {
|
|||||||
</TestWrapper>
|
</TestWrapper>
|
||||||
);
|
);
|
||||||
|
|
||||||
const checkbox = screen.getByLabelText(`mock-changePermissions.restrictions.${permission}.label`) as HTMLInputElement;
|
const checkbox = screen.getByLabelText(`mock-changePermissions.permissions.${permission}.label`) as HTMLInputElement;
|
||||||
expect(checkbox.checked).toBe(true);
|
expect(checkbox.checked).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -13,13 +13,11 @@ const ChangePermissionsSettings = ({ parameters, onParameterChange, disabled = f
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Text size="sm" fw={500}>{t('changePermissions.restrictions.title', 'Document Restrictions')}</Text>
|
|
||||||
|
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
{(Object.keys(parameters) as Array<keyof ChangePermissionsParameters>).map((key) => (
|
{(Object.keys(parameters) as Array<keyof ChangePermissionsParameters>).map((key) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
key={key}
|
key={key}
|
||||||
label={t(`changePermissions.restrictions.${key}.label`, key)}
|
label={t(`changePermissions.permissions.${key}.label`, key)}
|
||||||
checked={parameters[key]}
|
checked={parameters[key]}
|
||||||
onChange={(e) => onParameterChange(key, e.target.checked)}
|
onChange={(e) => onParameterChange(key, e.target.checked)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { TooltipContent } from '../../types/tips';
|
||||||
|
|
||||||
|
export const useAddPasswordPermissionsTips = (): TooltipContent => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return {
|
||||||
|
header: {
|
||||||
|
title: t("addPassword.tooltip.permissions.title", "Document Permissions")
|
||||||
|
},
|
||||||
|
tips: [
|
||||||
|
{
|
||||||
|
description: t("addPassword.tooltip.permissions.text", "These permissions control what users can do with the PDF. Most effective when combined with an owner password."),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
@ -26,10 +26,6 @@ export const useAddPasswordTips = (): TooltipContent => {
|
|||||||
t("addPassword.tooltip.encryption.bullet3", "256-bit: Maximum security, requires modern viewers")
|
t("addPassword.tooltip.encryption.bullet3", "256-bit: Maximum security, requires modern viewers")
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: t("addPassword.tooltip.restrictions.title", "Document Restrictions"),
|
|
||||||
description: t("addPassword.tooltip.restrictions.text", "These restrictions control what users can do with the PDF. Most effective when combined with an owner password."),
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -10,8 +10,11 @@ export const useChangePermissionsTips = (): TooltipContent => {
|
|||||||
},
|
},
|
||||||
tips: [
|
tips: [
|
||||||
{
|
{
|
||||||
title: t("changePermissions.tooltip.description.title", "Description"),
|
description: t("changePermissions.tooltip.description.text", "Changes document permissions, allowing/disallowing access to different features in PDF readers.")
|
||||||
description: t("changePermissions.tooltip.description.text", "Changes document permissions. Warning: To make these restrictions unchangeable, use the Add Password tool to set an owner password.")
|
},
|
||||||
|
{
|
||||||
|
title: t("warning.tooltipTitle", "Warning"),
|
||||||
|
description: t("changePermissions.tooltip.warning.text", "To make these permissions unchangeable, use the Add Password tool to set an owner password.")
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -18,6 +18,7 @@ import ChangePermissionsSettings from "../components/tools/changePermissions/Cha
|
|||||||
import { useAddPasswordParameters } from "../hooks/tools/addPassword/useAddPasswordParameters";
|
import { useAddPasswordParameters } from "../hooks/tools/addPassword/useAddPasswordParameters";
|
||||||
import { useAddPasswordOperation } from "../hooks/tools/addPassword/useAddPasswordOperation";
|
import { useAddPasswordOperation } from "../hooks/tools/addPassword/useAddPasswordOperation";
|
||||||
import { useAddPasswordTips } from "../components/tooltips/useAddPasswordTips";
|
import { useAddPasswordTips } from "../components/tooltips/useAddPasswordTips";
|
||||||
|
import { useAddPasswordPermissionsTips } from "../components/tooltips/useAddPasswordPermissionsTips";
|
||||||
import { BaseToolProps } from "../types/tool";
|
import { BaseToolProps } from "../types/tool";
|
||||||
|
|
||||||
const AddPassword = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {
|
const AddPassword = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {
|
||||||
@ -30,6 +31,7 @@ const AddPassword = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {
|
|||||||
const addPasswordParams = useAddPasswordParameters();
|
const addPasswordParams = useAddPasswordParameters();
|
||||||
const addPasswordOperation = useAddPasswordOperation();
|
const addPasswordOperation = useAddPasswordOperation();
|
||||||
const addPasswordTips = useAddPasswordTips();
|
const addPasswordTips = useAddPasswordTips();
|
||||||
|
const addPasswordPermissionsTips = useAddPasswordPermissionsTips();
|
||||||
|
|
||||||
// Endpoint validation
|
// Endpoint validation
|
||||||
const { enabled: endpointEnabled, loading: endpointLoading } = useEndpointEnabled(addPasswordParams.getEndpointName());
|
const { enabled: endpointEnabled, loading: endpointLoading } = useEndpointEnabled(addPasswordParams.getEndpointName());
|
||||||
@ -104,7 +106,7 @@ const AddPassword = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {
|
|||||||
|
|
||||||
{/* Passwords & Encryption Step */}
|
{/* Passwords & Encryption Step */}
|
||||||
<ToolStep
|
<ToolStep
|
||||||
title={t('addPassword.passwords.stepTitle', 'Passwords & Encryption')}
|
title={t('addPassword.title', 'Passwords & Encryption')}
|
||||||
isVisible={hasFiles}
|
isVisible={hasFiles}
|
||||||
isCollapsed={passwordsCollapsed}
|
isCollapsed={passwordsCollapsed}
|
||||||
isCompleted={passwordsCollapsed}
|
isCompleted={passwordsCollapsed}
|
||||||
@ -121,11 +123,12 @@ const AddPassword = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {
|
|||||||
|
|
||||||
{/* Permissions Step */}
|
{/* Permissions Step */}
|
||||||
<ToolStep
|
<ToolStep
|
||||||
title={t('addPassword.permissions.stepTitle', 'Document Permissions')}
|
title={t('changePermissions.title', 'Document Permissions')}
|
||||||
isVisible={hasFiles}
|
isVisible={hasFiles}
|
||||||
isCollapsed={permissionsCollapsed}
|
isCollapsed={permissionsCollapsed}
|
||||||
isCompleted={permissionsCollapsed}
|
isCompleted={permissionsCollapsed}
|
||||||
onCollapsedClick={hasResults ? handleSettingsReset : () => setCollapsedPermissions(!collapsedPermissions)}
|
onCollapsedClick={hasResults ? handleSettingsReset : () => setCollapsedPermissions(!collapsedPermissions)}
|
||||||
|
tooltip={addPasswordPermissionsTips}
|
||||||
>
|
>
|
||||||
<ChangePermissionsSettings
|
<ChangePermissionsSettings
|
||||||
parameters={addPasswordParams.permissions.parameters}
|
parameters={addPasswordParams.permissions.parameters}
|
||||||
|
@ -98,9 +98,9 @@ const ChangePermissions = ({ onPreviewFile, onComplete, onError }: BaseToolProps
|
|||||||
/>
|
/>
|
||||||
</ToolStep>
|
</ToolStep>
|
||||||
|
|
||||||
{/* Settings Step */}
|
{/* Permissions Step */}
|
||||||
<ToolStep
|
<ToolStep
|
||||||
title={t('settings.title', 'Settings')}
|
title={t('changePermissions.title', 'Document Permissions')}
|
||||||
isVisible={hasFiles}
|
isVisible={hasFiles}
|
||||||
isCollapsed={settingsCollapsed}
|
isCollapsed={settingsCollapsed}
|
||||||
isCompleted={settingsCollapsed}
|
isCompleted={settingsCollapsed}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user