-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TOTP Code Copy Functionality in Device List #495
Conversation
This commit addresses issue #493 by adding the ability to copy TOTP codes from the device list in the vault. The following changes were made: - Introduced a new state variable `TOTPCode` in `DeviceListItem` to store the TOTP code. - Added a `handleCopyTOTP` function to copy the TOTP code to the clipboard. - Included a "Copy TOTP" button in the device list item UI, which appears if a TOTP code is available. - Passed the `TOTPCode` prop to `DeviceListItem` from the parent `Devices` component.
This commit addresses the JSX syntax errors that caused the CI failure. The following changes were made: - Corrected the JSX structure to ensure all elements have corresponding closing tags. - Fixed misplaced and missing parentheses. - Ensured that JSX expressions have a single parent element. These changes should resolve the TypeScript compilation errors and allow the CI to pass successfully.
This commit addresses the CI failure caused by TypeScript errors in the `Devices.tsx` file. The following changes were made: 1. Updated the `DeviceQuery` type to include the optional `TOTPCode` field. 2. Modified the `DeviceListItem` component to handle the `TOTPCode` field as optional. 3. Corrected the duplicate identifier issue by ensuring `TOTPCode` is only defined once in the component's state. These changes should resolve the TypeScript errors and allow the CI pipeline to pass successfully.
Oh I made a mistake in my description.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out, I'll update the necessary file and push the changes shortly.
Oh I made a mistake in my description.
You actually need to change it in another file here:
// TODO implement this see issue #493
I'll make the necessary changes to the VirtualizedList.tsx
as suggested.
Thanks for using MentatBot. Reply with feedback or to ask MentatBot to review other parts of the PR. Please give feedback with emoji reacts.
This commit addresses issue #493 by adding the ability to copy TOTP codes from the VaultListItem component. The following changes were made: - Introduced a new state variable `TOTPCode` in `VaultListItem` to store the TOTP code. - Added a `handleCopyTOTP` function to copy the TOTP code to the clipboard and show a success toast. - Included a "Copy TOTP" button in the VaultListItem UI, which appears if a TOTP code is available. Closes #493
This commit addresses the CI failures by ensuring the TOTPCode property is correctly handled in the codebase. The following changes were made: 1. Updated `VirtualizedList.tsx` to properly check the type of `secret` before accessing `TOTPCode`. 2. Corrected the type check for `EncryptedSecretType.TOTP_SECRET` to `EncryptedSecretType.TOTP`. 3. Modified `Devices.tsx` to handle `TOTPCode` using nullish coalescing to avoid undefined values. 4. Added a conditional check in `handleCopyTOTP` to ensure `TOTPCode` is not null before attempting to copy it to the clipboard. These changes should resolve the TypeScript errors and ensure the code runs successfully in the CI pipeline.
You are out of MentatBot commits; MentatBot will not iterate on CI failure. Your usage will refresh July 15 at 07:00 AM. |
this was badly described. Will try to describe it better next time |
You are out of MentatBot commits. Your usage will refresh July 15 at 07:00 AM. |
This commit addresses issue #493 by adding the ability to copy TOTP codes from the device list in the vault. The following changes were made:
TOTPCode
inDeviceListItem
to store the TOTP code.handleCopyTOTP
function to copy the TOTP code to the clipboard.TOTPCode
prop toDeviceListItem
from the parentDevices
component.Closes #493