Private chat info UI + backend implemented.

This commit is contained in:
Asal Lotfi
2025-09-05 15:31:01 +03:30
parent e112ae1308
commit 63b201b697
20 changed files with 716 additions and 12 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

@@ -1079,3 +1079,56 @@
-fx-border-color: red;
-fx-border-radius: 6;
}
/* === User Info (Dark) === */
.user-info-card {
-fx-background-color: #1f1f1f;
-fx-background-radius: 8;
-fx-padding: 16;
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.5), 12, 0, 0, 3);
}
.user-info-title {
-fx-font-size: 16px;
-fx-font-weight: bold;
-fx-text-fill: #f2f2f2;
}
.user-info-name {
-fx-font-size: 14px;
-fx-font-weight: bold;
-fx-text-fill: #fff;
}
.user-info-status {
-fx-font-size: 12px;
-fx-text-fill: #aaa;
}
.user-info-main {
-fx-font-size: 13px;
-fx-text-fill: #f0f0f0;
}
.user-info-sub {
-fx-font-size: 11px;
-fx-text-fill: #999;
}
.user-info-separator {
-fx-background-color: #333;
}
/* === Shared buttons === */
.danger-button {
-fx-background-color: #e74c3c;
-fx-text-fill: white;
-fx-background-radius: 6;
-fx-padding: 4 12;
}
.danger-button:hover {
-fx-background-color: #c0392b;
}
/* === Profile image === */
.profile-picture {
-fx-background-color: #2c2c2c;
-fx-background-radius: 50%;
-fx-border-color: #444;
-fx-border-radius: 50%;
-fx-border-width: 1;
}
@@ -1070,3 +1070,56 @@
-fx-border-color: red;
-fx-border-radius: 6;
}
/* === User Info (Light) === */
.user-info-card {
-fx-background-color: #ffffff;
-fx-background-radius: 8;
-fx-padding: 16;
-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 8, 0, 0, 2);
}
.user-info-title {
-fx-font-size: 16px;
-fx-font-weight: bold;
-fx-text-fill: #111;
}
.user-info-name {
-fx-font-size: 14px;
-fx-font-weight: bold;
-fx-text-fill: #111;
}
.user-info-status {
-fx-font-size: 12px;
-fx-text-fill: #555;
}
.user-info-main {
-fx-font-size: 13px;
-fx-text-fill: #222;
}
.user-info-sub {
-fx-font-size: 11px;
-fx-text-fill: #888;
}
.user-info-separator {
-fx-background-color: #e6e6e6;
}
/* === Shared buttons === */
.danger-button {
-fx-background-color: #e74c3c;
-fx-text-fill: white;
-fx-background-radius: 6;
-fx-padding: 4 12;
}
.danger-button:hover {
-fx-background-color: #c0392b;
}
/* === Profile image === */
.profile-picture {
-fx-background-color: #f0f0f0;
-fx-background-radius: 50%;
-fx-border-color: #ddd;
-fx-border-radius: 50%;
-fx-border-width: 1;
}
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="org.to.telegramfinalproject.UI.ChannelInfoController"
prefHeight="400.0" prefWidth="600.0">
</AnchorPane>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="org.to.telegramfinalproject.UI.GroupInfoController"
prefHeight="400.0" prefWidth="600.0">
</AnchorPane>
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.control.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.image.Image?>
<StackPane xmlns:fx="http://javafx.com/fxml"
fx:controller="org.to.telegramfinalproject.UI.UserInfoController"
styleClass="overlay-root">
<!-- Dimmed background -->
<Pane fx:id="overlayBackground" styleClass="overlay-background"/>
<!-- Profile card -->
<VBox fx:id="profileCard" styleClass="profile-card" spacing="16"
prefWidth="360" maxWidth="360"
prefHeight="480" maxHeight="480">
<!-- ===== Header: User Info (left) + actions (right) ===== -->
<HBox alignment="CENTER_LEFT" spacing="10">
<Label text="User Info" styleClass="user-info-title" HBox.hgrow="ALWAYS"/>
<Pane HBox.hgrow="ALWAYS"/> <!-- pushes buttons to right -->
<!-- More / overflow -->
<Button fx:id="moreButton" styleClass="icon-button">
<graphic>
<ImageView fitWidth="18" fitHeight="18" preserveRatio="true">
<image>
<Image url="@/org/to/telegramfinalproject/Icons/more_dark.png"/>
</image>
</ImageView>
</graphic>
<contextMenu>
<ContextMenu fx:id="moreMenu">
<items>
<MenuItem fx:id="deleteChatItem" text="Delete chat" style="-fx-text-fill: red;">
<graphic>
<ImageView fitWidth="16" fitHeight="16" preserveRatio="true">
<image>
<Image url="@/org/to/telegramfinalproject/Icons/delete_red.png"/>
</image>
</ImageView>
</graphic>
</MenuItem>
<MenuItem fx:id="blockItem" text="Block" style="-fx-text-fill: red;">
<graphic>
<ImageView fitWidth="16" fitHeight="16" preserveRatio="true">
<image>
<Image url="@/org/to/telegramfinalproject/Icons/block_red.png"/>
</image>
</ImageView>
</graphic>
</MenuItem>
<MenuItem fx:id="unblockItem" text="Unblock" visible="false" style="-fx-text-fill: red;">
<graphic>
<ImageView fitWidth="16" fitHeight="16" preserveRatio="true">
<image>
<Image url="@/org/to/telegramfinalproject/Icons/block_red.png"/>
</image>
</ImageView>
</graphic>
</MenuItem>
</items>
</ContextMenu>
</contextMenu>
</Button>
<!-- Close -->
<Button fx:id="closeButton" styleClass="icon-button" text="✕"/>
</HBox>
<!-- Profile: picture + name/status -->
<HBox alignment="CENTER_LEFT" spacing="12">
<ImageView fx:id="profileImage" fitWidth="80" fitHeight="80" preserveRatio="true"
styleClass="profile-picture"/>
<VBox alignment="CENTER_LEFT" spacing="4">
<Label fx:id="profileName" text="User Name" styleClass="profile-name"/>
<Label fx:id="profileStatus" text="last seen recently" styleClass="profile-status"/>
</VBox>
</HBox>
<Separator styleClass="section-separator"/>
<!-- Info blocks -->
<HBox alignment="TOP_LEFT">
<Pane prefWidth="30"/> <!-- left spacer -->
<VBox spacing="16" styleClass="info-blocks">
<!-- Bio -->
<VBox fx:id="bioBlock" spacing="2">
<HBox spacing="6" alignment="CENTER_LEFT">
<ImageView fitWidth="16" fitHeight="16" preserveRatio="true">
<image>
<Image url="@/org/to/telegramfinalproject/Icons/bio_dark.png"/>
</image>
</ImageView>
<Label fx:id="userBio" wrapText="true" styleClass="profile-info-main"/>
</HBox>
<Label text="Bio" styleClass="profile-info-sub"/>
</VBox>
<!-- Username -->
<VBox fx:id="usernameBlock" spacing="2">
<HBox spacing="6" alignment="CENTER_LEFT">
<ImageView fitWidth="16" fitHeight="16" preserveRatio="true">
<image>
<Image url="@/org/to/telegramfinalproject/Icons/user_id_dark.png"/>
</image>
</ImageView>
<Label fx:id="userId" styleClass="profile-info-main"/>
</HBox>
<Label text="Username" styleClass="profile-info-sub"/>
</VBox>
</VBox>
</HBox>
<Separator styleClass="section-separator"/>
</VBox>
</StackPane>
Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B