Skip to content

Commit b808ac9

Browse files
added styling of the video component
1 parent 5472d95 commit b808ac9

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ let ButtonTmpComp = (function () {
204204
const img = imgRef.current;
205205

206206
const imgDiv = img?.getElementsByTagName("button")[0];
207-
const imgCurrent = img?.getElementsByTagName("button")[0];
208207
img!.style.height = height;
209208
img!.style.width = width;
210209
imgDiv!.style.height = height;
@@ -222,10 +221,6 @@ let ButtonTmpComp = (function () {
222221
) {
223222
return;
224223
}
225-
console.log(
226-
container?.clientHeight + "px",
227-
container?.clientWidth + "px"
228-
);
229224

230225
setStyle(container?.clientHeight + "px", container?.clientWidth + "px");
231226
};

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

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ import { IForm } from "../formComp/formDataConstants";
2626
import { SimpleNameComp } from "../simpleNameComp";
2727
import { ButtonStyleControl } from "./videobuttonCompConstants";
2828
import { RefControl } from "comps/controls/refControl";
29-
import { useEffect, useRef, useState } from "react";
29+
import { useEffect, useRef } from "react";
3030

3131
import { AutoHeightControl } from "comps/controls/autoHeightControl";
3232
import { client } from "./videoMeetingControllerComp";
3333

34-
import AgoraRTC, { IAgoraRTCRemoteUser, UID } from "agora-rtc-sdk-ng";
34+
import { IAgoraRTCRemoteUser } from "agora-rtc-sdk-ng";
3535

36-
import { stringExposingStateControl } from "@lowcoder-ee/index.sdk";
36+
import {
37+
hiddenPropertyView,
38+
stringExposingStateControl,
39+
} from "@lowcoder-ee/index.sdk";
40+
import { BackgroundColorContext } from "@lowcoder-ee/comps/utils/backgroundColorContext";
3741

3842
const FormLabel = styled(CommonBlueLabel)`
3943
font-size: 13px;
@@ -60,11 +64,12 @@ const Container = styled.div<{ $style: any }>`
6064

6165
const getStyle = (style: any) => {
6266
return css`
63-
button {
67+
{
6468
border: 1px solid ${style.border};
6569
border-radius: ${style.radius};
6670
margin: ${style.margin};
6771
padding: ${style.padding};
72+
background-color: ${style.background};
6873
}
6974
`;
7075
};
@@ -138,6 +143,9 @@ const typeOptions = [
138143
value: "submit",
139144
},
140145
] as const;
146+
function isDefault(type?: string) {
147+
return !type;
148+
}
141149

142150
let VideoCompBuilder = (function (props) {
143151
const childrenMap = {
@@ -168,7 +176,6 @@ let VideoCompBuilder = (function (props) {
168176
videoCo!.style.width = container?.clientWidth + "px";
169177
};
170178
useEffect(() => {
171-
172179
client.on(
173180
"user-published",
174181
async (user: IAgoraRTCRemoteUser, mediaType: "video" | "audio") => {
@@ -188,6 +195,9 @@ let VideoCompBuilder = (function (props) {
188195
}
189196
);
190197
}, [props.userId.value]);
198+
199+
console.log(props);
200+
191201
return (
192202
<EditorContext.Consumer>
193203
{(editorState) => (
@@ -207,9 +217,18 @@ let VideoCompBuilder = (function (props) {
207217
.setPropertyViewFn((children) => (
208218
<>
209219
<Section name={sectionNames.basic}>
210-
{children.userId.propertyView({ label: trans("text") })}
220+
{children.userId.propertyView({ label: trans("meeting.videoId") })}
211221
{children.autoHeight.getPropertyView()}
212222
</Section>
223+
<Section name={sectionNames.interaction}>
224+
{children.onEvent.getPropertyView()}
225+
</Section>
226+
<Section name={sectionNames.layout}>
227+
{hiddenPropertyView(children)}
228+
</Section>
229+
<Section name={sectionNames.style}>
230+
{children.style.getPropertyView()}
231+
</Section>
213232
</>
214233
))
215234
.build();

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,7 @@ export const en = {
14411441
top: "Top",
14421442
right: "Right",
14431443
bottom: "Bottom",
1444+
videoId: "Video Id",
14441445
left: "Left",
14451446
widthTooltip: "Number or percentage, e.g. 520, 60%",
14461447
heightTooltip: "Number, e.g. 378",

0 commit comments

Comments
 (0)