Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(flat-pages): missing users button #1808

Merged
merged 2 commits into from
Dec 31, 2022
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
3 changes: 3 additions & 0 deletions packages/flat-pages/src/OneToOnePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { withClassroomStore, WithClassroomStoreProps } from "../utils/with-class
import { WindowsSystemBtnContext } from "../components/StoreProvider";
import { ShareScreenPicker } from "../components/ShareScreen/ShareScreenPicker";
import { ExtraPadding } from "../components/ExtraPadding";
import { UsersButton } from "../components/UsersButton";

export type OneToOnePageProps = {};

Expand Down Expand Up @@ -155,6 +156,8 @@ export const OneToOnePage = withClassroomStore<OneToOnePageProps>(
<CloudStorageButton classroom={classroomStore} />
)}
<InviteButton roomInfo={classroomStore.roomInfo} />
{/* TODO: open users sub window */}
<UsersButton classroom={classroomStore} />
{!windowsBtn?.showWindowsBtn && (
<TopBarRightBtn
icon={<SVGExit />}
Expand Down
3 changes: 3 additions & 0 deletions packages/flat-pages/src/SmallClassPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { withClassroomStore, WithClassroomStoreProps } from "../utils/with-class
import { WindowsSystemBtnContext } from "../components/StoreProvider";
import { ShareScreenPicker } from "../components/ShareScreen/ShareScreenPicker";
import { ExtraPadding } from "../components/ExtraPadding";
import { UsersButton } from "../components/UsersButton";

export type SmallClassPageProps = {};

Expand Down Expand Up @@ -221,6 +222,8 @@ export const SmallClassPage = withClassroomStore<SmallClassPageProps>(
<CloudStorageButton classroom={classroomStore} />
)}
<InviteButton roomInfo={classroomStore.roomInfo} />
{/* TODO: open users sub window */}
<UsersButton classroom={classroomStore} />
{!windowsBtn?.showWindowsBtn && (
<TopBarRightBtn
icon={<SVGExit />}
Expand Down
2 changes: 1 addition & 1 deletion packages/flat-pages/src/components/UsersButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const UsersButton = observer<UsersButtonProps>(function UsersButton({ cla
return (
<>
<TopBarRightBtn
icon={<SVGUserGroup active={hasRaisingHand} />}
icon={<SVGUserGroup active={classroom.isCreator && hasRaisingHand} />}
title={t("users")}
onClick={() => setOpen(!open)}
/>
Expand Down