fix: add visual cue to SSH key regeneration (#13625)

This commit is contained in:
f0c1s 2022-05-06 15:30:48 +05:30 committed by GitHub
parent ddc95fae53
commit 1de19956e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,15 +53,25 @@ const FlexRow = styled.div`
width: 100%;
`;
const KeyType = styled.span`
width: 30%;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
color: var(--appsmith-color-black-900);
`;
const KeyText = styled.span`
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: calc(100% - 35px);
width: 60%;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
color: ${Colors.COD_GRAY};
color: var(--appsmith-color-black-900);
direction: rtl;
margin-right: 8px;
`;
const MoreMenuWrapper = styled.div`
@ -127,6 +137,8 @@ function DeployedKeyUI(props: DeployedKeyUIProps) {
const [showConfirmation, setShowConfirmation] = useState(false);
const [showKeyGeneratedMessage, setShowKeyGeneratedMessage] = useState(true);
const [keyType, keyVal, keyName] = SSHKeyPair.split(" ");
const keyText = `${keyVal} ${keyName}`;
const learnMoreClickHandler = () => {
AnalyticsUtil.logEvent("GS_GIT_DOCUMENTATION_LINK_CLICK", {
source: "SSH_KEY_ON_GIT_CONNECTION_TAB",
@ -158,7 +170,8 @@ function DeployedKeyUI(props: DeployedKeyUIProps) {
size={20}
style={{ marginTop: -1, marginRight: 4 }}
/>
<KeyText>{SSHKeyPair}</KeyText>
<KeyType>{keyType}</KeyType>
<KeyText>{keyText}</KeyText>
{CopySSHKey(showCopied, copyToClipboard)}
</FlexRow>
</DeployedKeyContainer>