From eb56783a3cad0aa87b508043b5d60615d0220d50 Mon Sep 17 00:00:00 2001 From: ikhomyn <89014675+ikhomyn@users.noreply.github.com> Date: Tue, 16 Aug 2022 15:18:08 +0200 Subject: [PATCH] Fixes identity provider section (#3116) --- public/resources/en/users.json | 5 +++++ src/user/UserIdentityProviderLinks.tsx | 14 ++++++++++---- src/user/user-section.css | 20 +++++++++++++++++++- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/public/resources/en/users.json b/public/resources/en/users.json index da02eaad6b..e6316bdb54 100644 --- a/public/resources/en/users.json +++ b/public/resources/en/users.json @@ -71,6 +71,11 @@ "link": "Link", "linkAccountTitle": "Link account to {{provider}}", "idpLinkSuccess": "Identity provider has been linked", + "idpUnlinkSuccess" : "The provider link has been removed", + "idpType": { + "social": "Social login", + "custom": "Custom" + }, "couldNotLinkIdP": "Could not link identity provider {{error}}", "verifyEmail": "Verify Email", "updateUserLocale": "Update User Locale", diff --git a/src/user/UserIdentityProviderLinks.tsx b/src/user/UserIdentityProviderLinks.tsx index b5a1bffcfd..dbbad1b8a2 100644 --- a/src/user/UserIdentityProviderLinks.tsx +++ b/src/user/UserIdentityProviderLinks.tsx @@ -96,7 +96,7 @@ export const UserIdentityProviderLinks = () => { id, federatedIdentityId: federatedId, }); - addAlert(t("common:mappingDeletedSuccess"), AlertVariant.success); + addAlert(t("users:idpUnlinkSuccess"), AlertVariant.success); refresh(); } catch (error) { addError("common:mappingDeletedError", error); @@ -125,7 +125,9 @@ export const UserIdentityProviderLinks = () => { )?.groupName!; return ( ); }; @@ -136,7 +138,11 @@ export const UserIdentityProviderLinks = () => { )?.groupName!; return ( ); }; @@ -179,7 +185,7 @@ export const UserIdentityProviderLinks = () => { /> )} - + diff --git a/src/user/user-section.css b/src/user/user-section.css index 3880a3b71d..786beb2560 100644 --- a/src/user/user-section.css +++ b/src/user/user-section.css @@ -109,6 +109,7 @@ article.pf-c-card.pf-m-flat.kc-available-idps > div > div > h1 { .kc-available-idps-text { color: var(--pf-global--Color--200); + margin-top: var(--pf-global--spacer--sm); } .kc-linked-idps-text { @@ -121,4 +122,21 @@ article.pf-c-card.pf-m-flat.kc-available-idps > div > div > h1 { .keycloak__user-credentials__reset-form { --pf-c-form--m-horizontal__group-label--md--GridColumnWidth: 13rem; -} \ No newline at end of file +} + +.pf-c-card__header.kc-form-panel__header{ + padding-bottom: 0; +} + +.pf-c-card__body.kc-form-panel__body{ + padding-bottom: 0; +} + +.pf-c-content.kc-no-providers-text{ + margin-top: calc( + var(--pf-global--spacer--2xl) - var(--pf-global--spacer--sm) + ); + margin-right: var(--pf-global--spacer--md); + margin-bottom: var(--pf-global--spacer--2xl); +} +