Update dependency @vector-im/compound-web to v0.9.4 (#11891)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4f19356492
commit
6669cb70e4
11 changed files with 288 additions and 86 deletions
|
@ -91,7 +91,7 @@ export default class PosthogTrackers {
|
|||
this.trackPage();
|
||||
}
|
||||
|
||||
public static trackInteraction(name: InteractionName, ev?: SyntheticEvent, index?: number): void {
|
||||
public static trackInteraction(name: InteractionName, ev?: SyntheticEvent | Event, index?: number): void {
|
||||
let interactionType: InteractionEvent["interactionType"];
|
||||
if (ev?.type === "click") {
|
||||
interactionType = "Pointer";
|
||||
|
|
|
@ -39,7 +39,7 @@ import { useIsEncrypted } from "../../../hooks/useIsEncrypted";
|
|||
import BaseCard, { Group } from "./BaseCard";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import RoomAvatar from "../avatars/RoomAvatar";
|
||||
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
|
||||
import AccessibleButton from "../elements/AccessibleButton";
|
||||
import defaultDispatcher from "../../../dispatcher/dispatcher";
|
||||
import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases";
|
||||
import Modal from "../../../Modal";
|
||||
|
@ -268,7 +268,7 @@ const onRoomPinsClick = (): void => {
|
|||
RightPanelStore.instance.pushCard({ phase: RightPanelPhases.PinnedMessages }, true);
|
||||
};
|
||||
|
||||
const onRoomSettingsClick = (ev: ButtonEvent): void => {
|
||||
const onRoomSettingsClick = (ev: Event): void => {
|
||||
defaultDispatcher.dispatch({ action: "open_room_settings" });
|
||||
PosthogTrackers.trackInteraction("WebRightPanelRoomInfoSettingsButton", ev);
|
||||
};
|
||||
|
@ -303,7 +303,7 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
|
|||
});
|
||||
};
|
||||
|
||||
const onRoomMembersClick = (ev: ButtonEvent): void => {
|
||||
const onRoomMembersClick = (ev: Event): void => {
|
||||
RightPanelStore.instance.pushCard({ phase: RightPanelPhases.RoomMemberList }, true);
|
||||
PosthogTrackers.trackInteraction("WebRightPanelRoomInfoPeopleButton", ev);
|
||||
};
|
||||
|
@ -433,15 +433,17 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
|
|||
label={_t("room|context_menu|favourite")}
|
||||
checked={isFavorite}
|
||||
onChange={() => tagRoom(room, DefaultTagID.Favourite)}
|
||||
// XXX: https://github.com/element-hq/compound/issues/288
|
||||
onSelect={() => {}}
|
||||
/>
|
||||
<MenuItem
|
||||
Icon={UserAddIcon}
|
||||
label={_t("action|invite")}
|
||||
disabled={!canInviteTo(room)}
|
||||
onClick={() => inviteToRoom(room)}
|
||||
onSelect={() => inviteToRoom(room)}
|
||||
/>
|
||||
<MenuItem Icon={LinkIcon} label={_t("action|copy_link")} onClick={onShareRoomClick} />
|
||||
<MenuItem Icon={SettingsIcon} label={_t("common|settings")} onClick={onRoomSettingsClick} />
|
||||
<MenuItem Icon={LinkIcon} label={_t("action|copy_link")} onSelect={onShareRoomClick} />
|
||||
<MenuItem Icon={SettingsIcon} label={_t("common|settings")} onSelect={onRoomSettingsClick} />
|
||||
|
||||
<Separator />
|
||||
<MenuItem
|
||||
|
@ -449,34 +451,34 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
|
|||
// and is a short term solution until legacy room header is removed
|
||||
Icon={UserProfileSolidIcon}
|
||||
label={_t("common|people")}
|
||||
onClick={onRoomMembersClick}
|
||||
onSelect={onRoomMembersClick}
|
||||
/>
|
||||
{!isVideoRoom && (
|
||||
<>
|
||||
<MenuItem Icon={FilesIcon} label={_t("right_panel|files_button")} onClick={onRoomFilesClick} />
|
||||
<MenuItem Icon={FilesIcon} label={_t("right_panel|files_button")} onSelect={onRoomFilesClick} />
|
||||
<MenuItem
|
||||
Icon={PollsIcon}
|
||||
label={_t("right_panel|polls_button")}
|
||||
onClick={onRoomPollHistoryClick}
|
||||
onSelect={onRoomPollHistoryClick}
|
||||
/>
|
||||
{pinningEnabled && (
|
||||
<MenuItem
|
||||
Icon={PinIcon}
|
||||
label={_t("right_panel|pinned_messages_button")}
|
||||
onClick={onRoomPinsClick}
|
||||
onSelect={onRoomPinsClick}
|
||||
>
|
||||
<Text as="span" size="sm">
|
||||
{pinCount}
|
||||
</Text>
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem Icon={ExportArchiveIcon} label={_t("export_chat|title")} onClick={onRoomExportClick} />
|
||||
<MenuItem Icon={ExportArchiveIcon} label={_t("export_chat|title")} onSelect={onRoomExportClick} />
|
||||
</>
|
||||
)}
|
||||
|
||||
<Separator />
|
||||
|
||||
<MenuItem Icon={LeaveIcon} kind="critical" label={_t("action|leave_room")} onClick={onLeaveRoomClick} />
|
||||
<MenuItem Icon={LeaveIcon} kind="critical" label={_t("action|leave_room")} onSelect={onLeaveRoomClick} />
|
||||
|
||||
{SettingsStore.getValue(UIFeature.Widgets) &&
|
||||
!isVideoRoom &&
|
||||
|
|
|
@ -33,7 +33,7 @@ function mutateCssText(css: string): string {
|
|||
}
|
||||
|
||||
function isLightTheme(sheet: CSSStyleSheet): boolean {
|
||||
return (<HTMLStyleElement>sheet.ownerNode).dataset.mxTheme?.toLowerCase() === "light";
|
||||
return (<HTMLStyleElement>sheet.ownerNode)?.dataset.mxTheme?.toLowerCase() === "light";
|
||||
}
|
||||
|
||||
async function getRulesFromCssFile(path: string): Promise<CSSStyleSheet> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue