Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion discord/src/components/ParticipantBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ export const ParticipantBox = ({ participant }: ParticipantBoxProps) => {
<img
src={profileUrl}
alt={participant.username}
className="h-[55%] object-cover rounded-full"
style={{
maxWidth: "80%",
maxHeight: "80%",
width: "70%",
height: "70%",
}}
className="object-cover rounded-full"
/>
)}
<p
Expand Down
6 changes: 5 additions & 1 deletion discord/src/pages/dashboard/panels/CallStatusPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ export const CallStatusPanel = () => {
const gap = 24; // gap-6
const horizontalPadding = 48; // approximate padding from p-4/md:p-6
const verticalPadding = 48;
const headerHeight = 64; // approximate height of the header block including padding/border

const count = participants.length || 1;
const columns = Math.min(count, Math.max(1, Math.ceil(Math.sqrt(count))));
const rows = Math.max(1, Math.ceil(count / columns));

const availableWidth = Math.max(panelDimensions.width - horizontalPadding, minTileSize);
const availableHeight = Math.max(panelDimensions.height - verticalPadding, minTileSize);
const availableHeight = Math.max(
panelDimensions.height - verticalPadding - headerHeight,
minTileSize,
);

const sizeByWidth = Math.floor((availableWidth - gap * (columns - 1)) / columns);
const sizeByHeight = Math.floor((availableHeight - gap * (rows - 1)) / rows);
Expand Down