Sidebar UI + backend updated.
This commit is contained in:
@@ -90,7 +90,7 @@ public class EditProfileController {
|
|||||||
|
|
||||||
backButton.setOnAction(e -> {
|
backButton.setOnAction(e -> {
|
||||||
saveChangesAndClose();
|
saveChangesAndClose();
|
||||||
closeEdit(); // ← قبلاً goBack بود
|
MainController.getInstance().goBack(overlayBackground);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load your camera icon image (white camera icon for visibility)
|
// Load your camera icon image (white camera icon for visibility)
|
||||||
@@ -143,7 +143,6 @@ public class EditProfileController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void closeEdit() {
|
private void closeEdit() {
|
||||||
//MainController.getInstance().closeOverlay(editCard.getParent());
|
|
||||||
// MainController.getInstance().goBack(overlayBackground);
|
// MainController.getInstance().goBack(overlayBackground);
|
||||||
MainController.getInstance().closeOverlay(editCard.getParent());
|
MainController.getInstance().closeOverlay(editCard.getParent());
|
||||||
|
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ public class MainController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void closeSidebar() {
|
public void closeSidebar() {
|
||||||
if (sidebarRoot != null && isSidebarOpen) {
|
if (sidebarRoot != null && isSidebarOpen) {
|
||||||
TranslateTransition slideOut = new TranslateTransition(Duration.millis(250), sidebarRoot);
|
TranslateTransition slideOut = new TranslateTransition(Duration.millis(250), sidebarRoot);
|
||||||
slideOut.setToX(-getSidebarWidth());
|
slideOut.setToX(-getSidebarWidth());
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class SettingsController {
|
|||||||
populateFromSession();
|
populateFromSession();
|
||||||
|
|
||||||
// Make it circular
|
// Make it circular
|
||||||
Circle clip = new Circle(48, 28, 38); // centerX, centerY, radius
|
Circle clip = new Circle(40, 30, 38); // centerX, centerY, radius
|
||||||
profileImage.setClip(clip);
|
profileImage.setClip(clip);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
@@ -223,11 +223,11 @@ public class SettingsController {
|
|||||||
|
|
||||||
// ست کردن در UI
|
// ست کردن در UI
|
||||||
profileName.setText(cachedName);
|
profileName.setText(cachedName);
|
||||||
profileId.setText(cachedUsername);
|
profileId.setText("@" + cachedUsername);
|
||||||
profileImage.setImage(cachedAvatar);
|
profileImage.setImage(cachedAvatar);
|
||||||
|
|
||||||
// گرد کردن تصویر (با توجه به اندازهی واقعی)
|
// گرد کردن تصویر (با توجه به اندازهی واقعی)
|
||||||
Circle clip = new Circle(38, 38, 38); // centerX, centerY, radius
|
Circle clip = new Circle(40, 30, 38); // centerX, centerY, radius
|
||||||
profileImage.setClip(clip);
|
profileImage.setClip(clip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,6 +324,7 @@ public class SidebarMenuController {
|
|||||||
boolean opened = false;
|
boolean opened = false;
|
||||||
try {
|
try {
|
||||||
MainController.getInstance().openChat(entry);
|
MainController.getInstance().openChat(entry);
|
||||||
|
MainController.getInstance().closeSidebar();
|
||||||
opened = true;
|
opened = true;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
// مسیر دوم: اگر با id/type باز میکنی، یا اول info میگیری:
|
// مسیر دوم: اگر با id/type باز میکنی، یا اول info میگیری:
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 934 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
Reference in New Issue
Block a user