hide hsh00- prefix in username

This commit is contained in:
Peter Hormanns 2021-05-21 19:25:27 +02:00
parent 0ea2cb2277
commit 6b5f5006e0

View File

@ -35,7 +35,8 @@ public class MainToolbar extends CustomComponent implements ClickListener {
layout.addComponent(whitespace);
layout.setExpandRatio(whitespace, 1.0f);
final String login = session.getUser();
final Button profileBtn = new Button(login);
final String loginName = login.startsWith("hsh00-") ? login.substring(6) : login;
final Button profileBtn = new Button(loginName);
profileBtn.setStyleName(ValoTheme.BUTTON_LINK);
layout.addComponent(profileBtn);
layout.setExpandRatio(profileBtn, 0.0f);