Skip to content

Commit dda53be

Browse files
authored
fix(classroom): not support require.context (#1317)
1 parent ef5f2a9 commit dda53be

File tree

10 files changed

+10
-66
lines changed

10 files changed

+10
-66
lines changed

desktop/renderer-app/src/components/TopBarRoundBtn.tsx

-23
This file was deleted.

desktop/renderer-app/src/pages/SmallClassPage/index.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import {
1717
} from "flat-components";
1818

1919
import InviteButton from "../../components/InviteButton";
20-
import { TopBarRoundBtn } from "../../components/TopBarRoundBtn";
21-
import { TopBarRightBtn } from "flat-components";
20+
import { TopBarRightBtn, TopBarRoundBtn } from "flat-components";
2221
import { RealtimePanel } from "../../components/RealtimePanel";
2322
import { ChatPanel } from "../../components/ChatPanel";
2423
import { SmallClassAvatar } from "./SmallClassAvatar";
@@ -52,6 +51,8 @@ import shareScreenSVG from "../../assets/image/share-screen.svg";
5251
import exitSVG from "../../assets/image/exit.svg";
5352
import hideSideSVG from "../../assets/image/hide-side.svg";
5453
import hideSideActiveSVG from "../../assets/image/hide-side-active.svg";
54+
import classInteractionSVG from "../../assets/image/class-interaction.svg";
55+
import classLectureSVG from "../../assets/image/class-lecture.svg";
5556

5657
const CLASSROOM_WIDTH = 1200;
5758
const AVATAR_AREA_WIDTH = CLASSROOM_WIDTH - 16 * 2;
@@ -245,7 +246,7 @@ export const SmallClassPage = observer<SmallClassPageProps>(function SmallClassP
245246
return classRoomStore.classMode === ClassModeType.Lecture ? (
246247
<TopBarRoundBtn
247248
dark
248-
iconName="class-interaction"
249+
icon={<img src={classInteractionSVG} />}
249250
title={t("lecture-mode")}
250251
onClick={classRoomStore.toggleClassMode}
251252
>
@@ -254,7 +255,7 @@ export const SmallClassPage = observer<SmallClassPageProps>(function SmallClassP
254255
) : (
255256
<TopBarRoundBtn
256257
dark
257-
iconName="class-lecture"
258+
icon={<img src={classLectureSVG} />}
258259
title={t("interactive-mode")}
259260
onClick={classRoomStore.toggleClassMode}
260261
>

web/flat-web/src/components/TopBarRoundBtn/icons/class-begin.svg

-1
This file was deleted.

web/flat-web/src/components/TopBarRoundBtn/icons/class-pause.svg

-1
This file was deleted.

web/flat-web/src/components/TopBarRoundBtn/icons/class-resume.svg

-1
This file was deleted.

web/flat-web/src/components/TopBarRoundBtn/icons/class-stop.svg

-1
This file was deleted.

web/flat-web/src/components/TopBarRoundBtn/index.tsx

-32
This file was deleted.

web/flat-web/src/pages/SmallClassPage/index.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import {
1111
LoadingPage,
1212
Timer,
1313
CloudRecordBtn,
14+
TopBarRoundBtn,
1415
} from "flat-components";
1516

1617
import InviteButton from "../../components/InviteButton";
17-
import { TopBarRoundBtn } from "../../components/TopBarRoundBtn";
1818
import { TopBarRightBtn } from "../../components/TopBarRightBtn";
1919
import { RealtimePanel } from "../../components/RealtimePanel";
2020
import { ChatPanel } from "../../components/ChatPanel";
@@ -43,6 +43,8 @@ import { useTranslation } from "react-i18next";
4343
import { ShareScreen } from "../../components/ShareScreen";
4444
import { generateAvatar } from "../../utils/generate-avatar";
4545
import { AppStoreButton } from "../../components/AppStoreButton";
46+
import classInteractionSVG from "../../assets/image/class-interaction.svg";
47+
import classLectureSVG from "../../assets/image/class-lecture.svg";
4648

4749
const CLASSROOM_WIDTH = 1200;
4850
const AVATAR_AREA_WIDTH = CLASSROOM_WIDTH - 16 * 2;
@@ -226,7 +228,7 @@ export const SmallClassPage = observer<SmallClassPageProps>(function SmallClassP
226228
return classRoomStore.classMode === ClassModeType.Lecture ? (
227229
<TopBarRoundBtn
228230
dark
229-
iconName="class-interaction"
231+
icon={<img src={classInteractionSVG} />}
230232
title={t("lecture-mode")}
231233
onClick={classRoomStore.toggleClassMode}
232234
>
@@ -235,7 +237,7 @@ export const SmallClassPage = observer<SmallClassPageProps>(function SmallClassP
235237
) : (
236238
<TopBarRoundBtn
237239
dark
238-
iconName="class-lecture"
240+
icon={<img src={classLectureSVG} />}
239241
title={t("interactive-mode")}
240242
onClick={classRoomStore.toggleClassMode}
241243
>

0 commit comments

Comments
 (0)