Skip to content

Commit dd56bfb

Browse files
fix: profile image styling
1 parent ace706f commit dd56bfb

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,7 @@ let MTComp = (function () {
387387
volumeInfo.uid == userId &&
388388
props.localUser.value.speaking != speaking
389389
) {
390-
props.localUser.onChange({
391-
...props.localUser.value,
392-
speaking,
393-
});
390+
props.localUser.value.speaking = speaking;
394391
} else {
395392
setUpdateVolume({ update: speaking, userid: volumeInfo.uid });
396393
}
@@ -474,7 +471,7 @@ let MTComp = (function () {
474471
{children.meetingName.propertyView({
475472
label: trans("meeting.meetingName"),
476473
})}
477-
474+
478475
{children.placement.propertyView({
479476
label: trans("drawer.placement"),
480477
radioButton: true,

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingStreamComp.tsx

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import { IAgoraRTCRemoteUser } from "agora-rtc-sdk-ng";
3737

3838
import {
3939
MeetingEventHandlerControl,
40+
StringControl,
4041
StringStateControl,
4142
hiddenPropertyView,
4243
stringExposingStateControl,
@@ -72,6 +73,15 @@ const TextContainer = styled.div<{ $style: any }>`
7273
justify-content: center;
7374
${(props) => props.$style && getStyle(props.$style)}
7475
`;
76+
const ProfileImageContainer = styled.div<{ $style: any }>`
77+
height: 100%;
78+
width: 100%;
79+
display: flex;
80+
align-items: center;
81+
position: absolute;
82+
justify-content: center;
83+
${(props) => props.$style && getStyle(props.$style)}
84+
`;
7585
const VideoContainer = styled.video<{ $style: any }>`
7686
height: 100%;
7787
width: 100%;
@@ -166,6 +176,8 @@ const typeOptions = [
166176
export const meetingStreamChildren = {
167177
autoHeight: withDefault(AutoHeightControl, "fixed"),
168178
shareScreen: withDefault(BoolCodeControl, false),
179+
profileImageHeight: withDefault(StringControl, "300px"),
180+
profileImageWidth: withDefault(StringControl, "300px"),
169181
type: dropdownControl(typeOptions, ""),
170182
onEvent: MeetingEventHandlerControl,
171183
disabled: BoolCodeControl,
@@ -311,16 +323,26 @@ let VideoCompBuilder = (function (props) {
311323
$style={props.style}
312324
>
313325
<img
314-
style={{ borderRadius: "50%" }}
326+
style={{
327+
borderRadius: "50%",
328+
width: props.profileImageWidth,
329+
height: props.profileImageHeight,
330+
}}
315331
src={props.profileImageUrl.value}
316332
/>
317333
{userName ?? "No Username"}
318334
</TextContainer>
319335
</>
320336
) : (
321-
// )
322337
<TextContainer $style={props.style}>
323-
<p>No Video</p>
338+
<img
339+
style={{
340+
borderRadius: "50%",
341+
width: props.profileImageWidth,
342+
height: props.profileImageHeight,
343+
}}
344+
src={props.profileImageUrl.value}
345+
/>
324346
</TextContainer>
325347
)}
326348
</Container>
@@ -333,10 +355,6 @@ let VideoCompBuilder = (function (props) {
333355
<>
334356
<Section name={sectionNames.basic}>
335357
{children.userId.propertyView({ label: trans("meeting.videoId") })}
336-
{children.profileImageUrl.propertyView({
337-
label: trans("meeting.profileImageUrl"),
338-
placeholder: "https://via.placeholder.com/120",
339-
})}
340358
{children.autoHeight.getPropertyView()}
341359
{children.shareScreen.propertyView({
342360
label: trans("meeting.shareScreen"),
@@ -349,6 +367,14 @@ let VideoCompBuilder = (function (props) {
349367
{hiddenPropertyView(children)}
350368
</Section>
351369
<Section name={sectionNames.style}>
370+
{children.profileImageUrl.propertyView({
371+
label: trans("meeting.profileImageUrl"),
372+
placeholder: "https://via.placeholder.com/120",
373+
})}
374+
{children.profileImageHeight.propertyView({
375+
label: "Profile Height",
376+
})}
377+
{children.profileImageWidth.propertyView({ label: "Profile Width" })}
352378
{children.style.getPropertyView()}
353379
</Section>
354380
</>

0 commit comments

Comments
 (0)