Center logo and make it clickable to navigate to Analytics
This commit is contained in:
@@ -9,6 +9,8 @@ import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.Separator;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Stage;
|
||||
import org.example.petshopdesktop.auth.UserSession;
|
||||
@@ -73,6 +75,9 @@ public class MainLayoutController {
|
||||
@FXML
|
||||
private Button btnChat;
|
||||
|
||||
@FXML
|
||||
private ImageView imgLogo;
|
||||
|
||||
@FXML
|
||||
private Label lblUsername;
|
||||
|
||||
@@ -166,6 +171,12 @@ public class MainLayoutController {
|
||||
updateButtons(btnChat);
|
||||
}
|
||||
|
||||
@FXML
|
||||
void logoClicked(MouseEvent event) {
|
||||
loadView("analytics-view.fxml");
|
||||
updateButtons(btnAnalytics);
|
||||
}
|
||||
|
||||
@FXML
|
||||
void btnLogoutClicked(ActionEvent event) {
|
||||
UserSession.getInstance().logout();
|
||||
|
||||
Reference in New Issue
Block a user