Skip to content

Commit

Permalink
WPCOM SSH: Clarify SSH key is detached from sites on removal (#69219)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber authored Oct 19, 2022
1 parent be01f4a commit 00497c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 9 additions & 4 deletions client/me/security-ssh-key/manage-ssh-keys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ const SSHKeyAddedDate = styled.span( {
const SSHKey = ( { sshKey, onDelete, keyBeingDeleted }: SSHKeyProps ) => {
const { __ } = useI18n();
const handleDeleteClick = () => {
accept( __( 'Are you sure you want to remove this SSH key?' ), ( accepted: boolean ) => {
if ( accepted ) {
onDelete( sshKey.name );
accept(
__(
'Are you sure you want to remove this SSH key? It will be removed from all attached sites.'
),
( accepted: boolean ) => {
if ( accepted ) {
onDelete( sshKey.name );
}
}
} );
);
};

return (
Expand Down
7 changes: 6 additions & 1 deletion client/me/security-ssh-key/security-ssh-key.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,15 @@ export const SecuritySSHKey = () => {
'Add a SSH key to your WordPress.com account to make it available for SFTP and SSH authentication.'
) }
</p>
<p>
{ __(
'Once added, attach the SSH key to a site with a Business or eCommerce plan to enable SSH key authentication for that site.'
) }
</p>
<p style={ hasKeys ? { marginBlockEnd: 0 } : undefined }>
{ createInterpolateElement(
__(
'Once added, attach the SSH key to a site with a Business or eCommerce plan to enable SSH key authentication for that site. <a>Read more.</a>'
'If the SSH key is removed from your WordPress.com account, it will also be removed from all attached sites. <a>Read more.</a>'
),
{
br: <br />,
Expand Down

0 comments on commit 00497c0

Please sign in to comment.