8000 Keycloak account console PatternFly design system alignment by tyandor · Pull Request #10748 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Keycloak account console PatternFly design system alignment #10748

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

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ public CredentialTypeMetadata getCredentialTypeMetadata(CredentialTypeMetadataCo
.helpText("recovery-authn-codes-help-text").iconCssClass("kcAuthenticatorRecoveryAuthnCodesClass")
.removeable(true);
UserModel user = metadataContext.getUser();
if (user != null && !isConfiguredFor(session.getContext().getRealm(), user, getType())) {
builder.createAction(UserModel.RequiredAction.CONFIGURE_RECOVERY_AUTHN_CODES.name());
} else {
builder.updateAction(UserModel.RequiredAction.CONFIGURE_RECOVERY_AUTHN_CODES.name());
}
builder.createAction(UserModel.RequiredAction.CONFIGURE_RECOVERY_AUTHN_CODES.name());
return builder.build(session);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public UriBuilder createUriBuilder() {
@FindBy(xpath = "//a[@id='referer']")
private WebElement backToRefererLink;

@FindBy(linkText = "Sign Out")
@FindBy(linkText = "Sign out")
private WebElement signOutLink;

@FindBy(linkText = "Account")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public abstract class AbstractAccountPage extends AbstractPage {

@FindBy(linkText = "Sign Out")
@FindBy(linkText = "Sign out")
private WebElement logoutLink;

@FindBy(id = "kc-current-locale-link")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ public void testConsoleListedInApplications() {
loginPage.login("realm-admin", "password");
Assert.assertTrue(applicationsPage.isCurrent());
Map<String, AccountApplicationsPage.AppEntry> apps = applicationsPage.getApplications();
Assert.assertThat(apps.keySet(), hasItems("Admin CLI", "Security Admin Console"));
Assert.assertThat(apps.keySet(), hasItems("Admin CLI", "security admin console"));
events.clear();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ public String getClients() {
}

public String getStarted() {
return getTextFromItem("started").split("Started at ")[1];
return getTextFromItem("started").split("Started ")[1];
}

public String getExpires() {
return getTextFromItem("expires").split("Expires at ")[1];
return getTextFromItem("expires").split("Expires ")[1];
}

public boolean isSignOutDisplayed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ else if (parentListId.equals(UNLINKED_IDPS_LIST_ID)) {
}

public boolean hasSocialLoginBadge() {
return getTextFromElement(badgeElement).equals("Social Login");
return getTextFromElement(badgeElement).equals("Social login");
}

public boolean hasSystemDefinedBadge() {
return getTextFromElement(badgeElement).equals("System Defined");
return getTextFromElement(badgeElement).equals("System defined");
}

public boolean hasSocialIcon() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public String getPageId() {

@Override
public boolean isCurrent() {
return driver.getPageSource().contains("Page Not Found");
return driver.getPageSource().contains("Page not found");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* @author Vaclav Muzikar <vmuzikar@redhat.com>
*/
public class SigningInTest extends BaseAccountPageTest {
public static final String PASSWORD_LABEL = "My Password";
public static final String PASSWORD_LABEL = "My password";

@Page
private SigningInPage signingInPage;
Expand Down Expand Up @@ -91,8 +91,8 @@ public void categoriesTest() {
testContext.setTestRealmReps(emptyList()); // reimport realm after this test

assertThat(signingInPage.getCategoriesCount(), is(2));
assertThat(signingInPage.getCategoryTitle("basic-authentication"), is("Basic Authentication"));
assertThat(signingInPage.getCategoryTitle("two-factor"), is("Two-Factor Authentication"));
assertThat(signingInPage.getCategoryTitle("basic-authentication"), is("Basic authentication"));
assertThat(signingInPage.getCategoryTitle("two-factor"), is("Two-factor authentication"));
}

@Test
Expand Down Expand Up @@ -160,7 +160,7 @@ public void otpTest() {

signingInPage.assertCurrent();
assertThat(otpCredentialType.isSetUp(), is(false));
assertThat(otpCredentialType.getTitle(), is("Authenticator Application"));
assertThat(otpCredentialType.getTitle(), is("authenticator application"));

final String label1 = "OTP is secure";
final String label2 = "OTP is inconvenient";
Expand Down
10000
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ doCancel=Cancel
doLogOutAllSessions=Log out all sessions
doRemove=Remove
doAdd=Add
doSignOut=Sign Out
doSignOut=Sign out
doLogIn=Log In
doLink=Link
noAccessMessage=Access not allowed

personalInfoSidebarTitle=Personal info
accountSecuritySidebarTitle=Account security
signingInSidebarTitle=Signing in
deviceActivitySidebarTitle=Device activity
linkedAccountsSidebarTitle=Linked accounts

editAccountHtmlTitle=Edit Account
personalInfoHtmlTitle=Personal Info
Expand All @@ -19,7 +24,7 @@ sessionsHtmlTitle=Sessions
accountManagementTitle=Keycloak Account Management
authenticatorTitle=Authenticator
applicationsHtmlTitle=Applications
linkedAccountsHtmlTitle=Linked Accounts
linkedAccountsHtmlTitle=Linked accounts

accountManagementWelcomeMessage=Welcome to Keycloak Account Management
personalInfoIntroMessage=Manage your basic information
Expand All @@ -32,7 +37,7 @@ updatePasswordTitle=Update Password
updatePasswordMessageTitle=Make sure you choose a strong password
updatePasswordMessage=A strong password contains a mix of numbers, letters, and symbols. It is hard to guess, does not resemble a real word, and is only used for this account.
personalSubTitle=Your Personal Info
personalSubMessage=Manage this basic information: your first name, last name and email
personalSubMessage=Manage your basic information.

authenticatorCode=One-time code
email=Email
Expand Down Expand Up @@ -94,7 +99,7 @@ role_offline-access=Offline access
role_uma_authorization=Obtain permissions
client_account=Account
client_account-console=Account Console
client_security-admin-console=Security Admin Console
client_security-admin-console=security admin console
client_admin-cli=Admin CLI
client_realm-management=Realm Management
client_broker=Broker
Expand All @@ -120,7 +125,7 @@ applications=Applications
account=Account
federatedIdentity=Federated Identity
authenticator=Authenticator
device-activity=Device Activity
device-activity=Device activity
sessions=Sessions
log=Log

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<form action="${url.loginAction}" class="${properties.kcFormClass!}" id="kc-recovery-codes-settings-form" method="post">
<input type="hidden" name="generatedRecoveryAuthnCodes" value="${recoveryAuthnCodesConfigBean.generatedRecoveryAuthnCodesAsString}" />
<input type="hidden" name="generatedAt" value="${recoveryAuthnCodesConfigBean.generatedAt?c}" />
<input type="hidden" name="userLabel" value=" " />
<input type="hidden" id="userLabel" name="userLabel" value="${msg("recovery-codes-label-default")}" />

<#if isAppInitiatedAction??>
<input type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ recovery-codes-action-cancel=Cancel setup
recovery-codes-download-file-header=Keep these recovery codes somewhere safe.
recovery-codes-download-file-description=Recovery codes are single-use passcodes that allow you to log in to your account if you do not have access to your authenticator.
recovery-codes-download-file-date= These codes were generated on
recovery-codes-label-default=Recovery codes

# WebAuthn
webauthn-display-name=Security Key
Expand Down
95 changes: 54 additions & 41 deletions themes/src/main/resources/theme/keycloak.v2/account/index.ftl
97AE
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@
</#list>
</#if>


<link rel="stylesheet" type="text/css" href="${resourceCommonUrl}/web_modules/@patternfly/react-core/dist/styles/base.css"/>
<link rel="stylesheet" type="text/css" href="${resourceCommonUrl}/web_modules/@patternfly/react-core/dist/styles/app.css"/>
<link rel="stylesheet" type="text/css" href="${resourceCommonUrl}/web_modules/@patternfly/patternfly/patternfly-addons.css"/>
<link href="${resourceUrl}/public/layout.css" rel="stylesheet"/>
</head>

Expand Down Expand Up @@ -181,26 +183,31 @@
</div>
<div class="pf-c-page__header-tools">
<#if referrer?has_content && referrer_uri?has_content>
<div class="pf-c-page__header-tools-group pf-m-icons">
<a id="landingReferrerLink" href="${referrer_uri}" id="referrer" tabindex="0"><span class="pf-icon pf-icon-arrow"></span>${msg("backTo",referrerName)}</a>
<div class="pf-c-page__header-tools-group pf-m-icons pf-u-display-none pf-u-display-flex-on-md">
<a id="landingReferrerLink" href="${referrer_uri}" class="pf-c-button pf-m-link" tabindex="0">
<span class="pf-c-button__icon pf-m-start">
<i class="pf-icon pf-icon-arrow" aria-hidden="true"></i>
</span>
${msg("backToAdminConsole")}
</a>
</div>
</#if>

<div class="pf-c-page__header-tools-group pf-m-icons">
<div class="pf-c-page__header-tools-group pf-m-icons pf-u-display-none pf-u-display-flex-on-md pf-u-mr-md">
<button id="landingSignInButton" tabindex="0" style="display:none" class="pf-c-button pf-m-primary" type="button">${msg("doSignIn")}</button>
<button id="landingSignOutButton" tabindex="0" style="display:none" class="pf-c-button pf-m-primary" type="button">${msg("doSignOut")}</button>
</div>

<!-- Kebab for mobile -->
<div class="pf-c-page__header-tools-group">
<div class="pf-c-page__header-tools-group pf-u-display-none-on-md">
<div id="landingMobileKebab" class="pf-c-dropdown pf-m-mobile" <!-- pf-m-expanded -->
<button aria-label="Actions" tabindex="0" id="landingMobileKebabButton" class="pf-c-dropdown__toggle pf-m-plain" type="button" aria-expanded="true" aria-haspopup="true">
<svg fill="currentColor" height="1em" width="1em" viewBox="0 0 192 512" aria-hidden="true" role="img" style="vertical-align: -0.125em;"><path d="M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z" transform=""></path></svg>
</button>
<ul id="landingMobileDropdown" aria-labelledby="landingMobileKebabButton" class="pf-c-dropdown__menu pf-m-align-right" role="menu" style="display:none">
<#if referrer?has_content && referrer_uri?has_content>
<li role="none">
<a id="landingMobileReferrerLink" href="${referrer_uri}" role="menuitem" tabindex="0" aria-disabled="false" class="pf-c-dropdown__menu-item">${msg("backTo",referrerName)}</a>
<a id="landingMobileReferrerLink" href="${referrer_uri}" role="menuitem" tabindex="0" aria-disabled="false" class="pf-c-dropdown__menu-item">${msg("backToAdminConsole")}</a>
</li>
</#if>

Expand All @@ -220,45 +227,51 @@
</header>

<main role="main" class="pf-c-page__main">
<section class="pf-c-page__main-section pf-m-light">
<div class="pf-c-content" id="landingWelcomeMessage">
<h1>${msg("accountManagementWelcomeMessage")}</h1>
</div>
<section class="pf-c-page__main-section pf-m-limit-width pf-m-light pf-m-shadow-bottom">
<div class="pf-c-page__main-body">
<div class="pf-c-content" id="landingWelcomeMessage">
<h1>${msg("accountManagementWelcomeMessage")}</h1>
</div>
</div>
</section>
<section class="pf-c-page__main-section">
<div class="pf-l-gallery pf-m-gutter">
<#assign content=theme.apply("content.json")?eval>
<#list content as item>
<div class="pf-l-gallery__item pf-c-card" id="landing-${item.id}">
<div>
<div class="pf-c-card__header pf-c-content">
<h2>
<#if item.icon??>
<i class="pf-icon ${item.icon}"></i>&nbsp;
<#elseif item.iconSvg??>
<img src="${item.iconSvg}" alt="icon"/>&nbsp;
</#if>
${msg(item.label)}
</h2>
<#if item.descriptionLabel??>
<p>${msg(item.descriptionLabel)}</p>
</#if>
</div>
<div class="pf-c-card__body pf-c-content">
<#if item.content??>
<#list item.content as sub>
<div id="landing-${sub.id}">
<a window.location.hash='${sub.path}'">${msg(sub.label)}</a>
<section class="pf-c-page__main-section pf-m-limit-width pf-m-overflow-scroll">
<div class="pf-c-page__main-body">
<div class="pf-l-gallery pf-m-gutter">
<#assign content=theme.apply("content.json")?eval>
<#list content as item>
<div class="pf-l-gallery__item" id="landing-${item.id}">
<div class="pf-c-card pf-m-full-height">
<div>
<div class="pf-c-card__title pf-c-content">
<h2 class="pf-u-display-flex pf-u-w-100 pf-u-flex-direction-column">
<#if item.icon??>
<i class="pf-icon ${item.icon}"></i>
<#elseif item.iconSvg??>
<img src="${item.iconSvg}" alt="icon"/>
</#if>
${msg(item.label)}
</h2>
</div>
<div class="pf-c-card__body">
<#if item.descriptionLabel??>
<p class="pf-u-mb-md">${msg(item.descriptionLabel)}</p>
</#if>
<#if item.content??>
<#list item.content as sub>
<div id="landing-${sub.id}">
<a window.location.hash='${sub.path}'">${msg(sub.label)}</a>
</div>
</#list>
<#else>
<a id="landing-${item.id}" window.location.hash = '${item.path}'">${msg(item.label)}</a>
</#if>
</div>
</div>
</div>
</div>
</#list>
<#else>
<a id="landing-${item.id}" window.location.hash = '${item.path}'">${msg(item.label)}</a>
</#if>
</div>
</#list>
</div>
</div>
</#list>
</div>
</div>
</section>
</main>
</div>
Expand Down
Loading
0