Skip to content

Commit

Permalink
Feat: Login Button changed into Profile when logged inn
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Apr 18, 2026
1 parent 54303fc commit 40d2815
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected void authTokenisSet() {
loginButton.setManaged(false);
profileButton.setVisible(true);
profileButton.setManaged(true);
profileButton.setText(authToken.getCurrentUser().getUsername().substring(0,2));
profileButton.setText(authToken.getCurrentUser().getUsername().substring(0,2).toUpperCase().trim());
} else {
loginButton.setVisible(true);
loginButton.setManaged(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,20 @@
</padding>
<children>
<Button fx:id="loginButton" onAction="#switchToLoginPage" prefHeight="34.0" prefWidth="120.0" style="-fx-background-color: #1F4FD8; -fx-text-fill: white; -fx-background-radius: 17; -fx-font-weight: bold;" text="Login" />
<Button fx:id="profileButton" managed="false" onAction="#switchToProfilePage" style="-fx-background-color: transparent;" visible="false">
<Button fx:id="profileButton" managed="false" onAction="#switchToProfilePage"
style="
-fx-background-color: #f4f6f8;
-fx-text-fill: #262221;
-fx-font-weight: bold;
-fx-font-size: 14;
-fx-background-radius: 50%;
-fx-min-width: 40;
-fx-min-height: 40;
-fx-max-width: 40;
-fx-max-height: 40;
-fx-cursor: hand;"

visible="false">
</Button>
</children>
</HBox>
Expand Down

0 comments on commit 40d2815

Please sign in to comment.