snapshot of https://github.com/RocketChat/Rocket.Chat.git (develop, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s

This commit is contained in:
upstream-mirror
2026-09-16 01:21:02 +05:00
commit 30810eecd7
10161 changed files with 987110 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
import type { ReactNode } from 'react';
import Card from '../Card';
import StreamCardOpenInRoomButton from './StreamCardOpenInRoom';
import StreamCardPin from './StreamCardPin';
import StreamCardStopSharingButton from './StreamCardStopSharingButton';
export type StreamCardProps = {
children: ReactNode;
own?: boolean;
onClickFocusStream?: () => void;
onClickStopSharing?: () => void;
onClickOpenInRoom?: () => void;
focused?: boolean;
autoHeight?: boolean;
maxHeight?: number;
showStopSharingOnHover?: boolean;
};
const alternateSizeProps = {
maxWidth: '100%',
maxHeight: '100%',
height: undefined,
width: undefined,
};
const StreamCard = ({
children,
own,
onClickFocusStream,
onClickStopSharing,
onClickOpenInRoom,
focused,
autoHeight,
maxHeight,
showStopSharingOnHover = false,
}: StreamCardProps) => {
return (
<Card
variant={own ? 'highlighted' : 'default'}
{...(focused ? alternateSizeProps : {})}
height={focused || autoHeight ? 'fit-content' : undefined}
minHeight={autoHeight ? 0 : undefined}
maxHeight={maxHeight || '100%'}
>
{onClickFocusStream && <StreamCardPin focused={focused} onClick={onClickFocusStream} position='bottomRight' />}
{own && onClickStopSharing && <StreamCardStopSharingButton onClick={onClickStopSharing} showOnHover={showStopSharingOnHover} />}
{onClickOpenInRoom && <StreamCardOpenInRoomButton onClick={onClickOpenInRoom} showOnHover={true} />}
{children}
</Card>
);
};
export default StreamCard;

View File

@@ -0,0 +1,22 @@
import { Button } from '@rocket.chat/fuselage';
import { useTranslation } from 'react-i18next';
import CardSlotContainer from '../CardSlot';
export type StreamCardOpenInRoomButtonProps = {
onClick: () => void;
showOnHover?: boolean;
};
const StreamCardOpenInRoomButton = ({ onClick, showOnHover = false }: StreamCardOpenInRoomButtonProps) => {
const { t } = useTranslation();
return (
<CardSlotContainer position='middle' variant='transparent' showOnHover={showOnHover} margin={0}>
<Button primary small icon='arrow-expand' onClick={onClick}>
{t('Open_in_room')}
</Button>
</CardSlotContainer>
);
};
export default StreamCardOpenInRoomButton;

View File

@@ -0,0 +1,22 @@
import { IconButton } from '@rocket.chat/fuselage';
import { useTranslation } from 'react-i18next';
import CardSlotContainer from '../CardSlot';
import type { SlotPosition } from '../CardSlot';
export type CardSlotPinProps = {
onClick: () => void;
focused?: boolean;
position?: SlotPosition;
};
const CardSlotPin = ({ focused, onClick, position = 'bottomRight' }: CardSlotPinProps) => {
const { t } = useTranslation();
return (
<CardSlotContainer position={position} variant='transparent'>
<IconButton tiny secondary={true} icon={focused ? 'pin-filled' : 'pin'} onClick={onClick} title={focused ? t('Unpin') : t('Pin')} />
</CardSlotContainer>
);
};
export default CardSlotPin;

View File

@@ -0,0 +1,22 @@
import { Button } from '@rocket.chat/fuselage';
import { useTranslation } from 'react-i18next';
import CardSlotContainer from '../CardSlot';
export type CardSlotStopSharingProps = {
onClick: () => void;
showOnHover?: boolean;
};
const CardSlotStopSharing = ({ onClick, showOnHover = false }: CardSlotStopSharingProps) => {
const { t } = useTranslation();
return (
<CardSlotContainer position='middle' variant='transparent' showOnHover={showOnHover} margin={0}>
<Button danger small icon='desktop-cross' onClick={onClick}>
{t('Stop_sharing')}
</Button>
</CardSlotContainer>
);
};
export default CardSlotStopSharing;

View File

@@ -0,0 +1,3 @@
export { default as StreamCard } from './StreamCard';
export { default as StreamCardPin } from './StreamCardPin';
export { default as StreamCardStopSharingButton } from './StreamCardStopSharingButton';