Skip to content
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
2 changes: 1 addition & 1 deletion apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"@rocket.chat/favicon": "workspace:^",
"@rocket.chat/federation-matrix": "workspace:^",
"@rocket.chat/federation-sdk": "0.8.1",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-forms": "workspace:^",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-toastbar": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@lezer/highlight": "^1.2.5",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/css-in-js": "workspace:~",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-toastbar": "workspace:^",
"@rocket.chat/fuselage-tokens": "^0.35.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/fuselage-forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-aria": "~3.37.0"
},
"devDependencies": {
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/jest-presets": "workspace:~",
"@rocket.chat/storybook-config": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/fuselage-toastbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"react-timing-hooks": "~5.2.0"
},
"devDependencies": {
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/jest-presets": "workspace:~",
"@rocket.chat/storybook-config": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/fuselage-ui-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@rocket.chat/apps-engine": "workspace:^",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/emitter": "workspace:~",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-tokens": "^0.35.0",
"@rocket.chat/icons": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/gazzodown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/css-in-js": "workspace:~",
"@rocket.chat/emitter": "workspace:~",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-tokens": "^0.35.0",
"@rocket.chat/icons": "workspace:~",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@
"Cam_on": "Cam on",
"Camera": "Camera",
"Camera_access_not_allowed": "Video message - camera access was not allowed, please check your browser settings.",
"Camera_controls": "Camera controls",
"Camera_options": "Camera options",
"can-audit": "Can audit",
"can-audit_description": "Permission to access audit",
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@rocket.chat/styled": "~0.34.1"
},
"devDependencies": {
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/jest-presets": "workspace:~",
"@rocket.chat/storybook-config": "workspace:~",
"@rocket.chat/storybook-dark-mode": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/onboarding-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"react-hook-form": "~7.54.2"
},
"devDependencies": {
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-tokens": "^0.35.0",
"@rocket.chat/icons": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"webpack": "~5.104.1"
},
"devDependencies": {
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/icons": "workspace:~",
"@rocket.chat/tsconfig": "workspace:*",
"@storybook/react": "^9.1.20",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/css-in-js": "workspace:~",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-forms": "~1.5.1",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/icons": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@rocket.chat/core-typings": "workspace:~",
"@rocket.chat/css-in-js": "workspace:~",
"@rocket.chat/emitter": "workspace:~",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-tokens": "^0.35.0",
"@rocket.chat/icons": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@rocket.chat/core-typings": "workspace:~",
"@rocket.chat/css-in-js": "workspace:~",
"@rocket.chat/emitter": "workspace:~",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-tokens": "^0.35.0",
"@rocket.chat/icons": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@react-aria/toolbar": "^3.0.0-nightly.5042",
"@rocket.chat/css-in-js": "workspace:~",
"@rocket.chat/emitter": "workspace:~",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-tokens": "^0.35.0",
"@rocket.chat/icons": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-conference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@react-aria/visually-hidden": "^3.8.27",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/css-in-js": "workspace:^",
"@rocket.chat/fuselage": "^0.94.0",
"@rocket.chat/fuselage": "^0.95.0",
"@rocket.chat/fuselage-forms": "workspace:^",
"@rocket.chat/fuselage-hooks": "^0.43.1",
"@rocket.chat/fuselage-tokens": "^0.35.0",
Expand Down
1 change: 1 addition & 0 deletions packages/ui-conference/src/call/AudioDevicePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const AudioDevicePicker = () => {
beforeOpen={() => revealDeviceLabels(['audioinput', 'audiooutput'], devices)}
button={
<DeviceMenuButton
splitButtonTrigger
secondary
large
menuIcon={self.muted ? 'chevron-up' : <VoiceActivity level={micLevel} size={24} />}
Expand Down
80 changes: 28 additions & 52 deletions packages/ui-conference/src/call/CallControls.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from '@rocket.chat/css-in-js';
import { Box, ButtonGroup, Palette, RadioButton, borderRadius } from '@rocket.chat/fuselage';
import { Box, ButtonGroup, Palette, RadioButton, SplitButton, borderRadius } from '@rocket.chat/fuselage';
import type { Keys } from '@rocket.chat/icons';
import { GenericMenu } from '@rocket.chat/ui-client';
import type { GenericMenuItemProps } from '@rocket.chat/ui-client';
Expand Down Expand Up @@ -125,22 +125,6 @@ const controlNoticesStyles = css`
}
`;

// A device toggle and its selector fused into one control, the selector first and a shade quieter.
const deviceControlStyles = css`
display: inline-flex;
align-items: stretch;
overflow: hidden;
border-radius: ${borderRadius('medium')};

& button {
border-radius: 0;
}

& > *:first-child button {
opacity: 0.7;
}
`;

export type CallControlsProps = {
layout: StageLayout;
onLayoutChange: (layout: StageLayout) => void;
Expand Down Expand Up @@ -197,41 +181,33 @@ const CallControls = ({ layout, onLayoutChange, onOpenDiagnostics }: CallControl

return (
<ButtonGroup style={{ position: 'relative' }}>
<Box className={deviceControlStyles}>
<Box>
<AudioDevicePicker />
</Box>
<Box>
<ToggleButton
label={t('Mute')}
icons={['mic', 'mic-off']}
titles={self.speakingWhileMuted ? [t('You_are_muted'), t('You_are_muted')] : [t('Mute'), t('Unmute')]}
pressed={self.muted}
aria-pressed={self.muted}
dangerWhenPressed
large
onToggle={toggleMic}
/>
</Box>
</Box>
<Box className={deviceControlStyles}>
<Box>
<CameraPicker />
</Box>
<Box>
<ToggleButton
label={t('Camera')}
icons={['video', 'video-off']}
titles={[t('Stop_camera'), t('Start_camera')]}
pressed={!self.cameraOn}
// Pressed as its label reads: "Camera" is pressed while the camera is on, whichever way it is drawn.
aria-pressed={self.cameraOn}
dangerWhenPressed
large
onToggle={toggleCamera}
/>
</Box>
</Box>
<SplitButton danger={self.muted} aria-label={t('Microphone')}>
<AudioDevicePicker />
<ToggleButton
label={t('Mute')}
icons={['mic', 'mic-off']}
titles={self.speakingWhileMuted ? [t('You_are_muted'), t('You_are_muted')] : [t('Mute'), t('Unmute')]}
pressed={self.muted}
aria-pressed={self.muted}
dangerWhenPressed
large
onToggle={toggleMic}
/>
</SplitButton>
<SplitButton danger={!self.cameraOn} aria-label={t('Camera_controls')}>
<CameraPicker />
<ToggleButton
label={t('Camera')}
icons={['video', 'video-off']}
titles={[t('Stop_camera'), t('Start_camera')]}
pressed={!self.cameraOn}
// Pressed as its label reads: "Camera" is pressed while the camera is on, whichever way it is drawn.
aria-pressed={self.cameraOn}
dangerWhenPressed
large
onToggle={toggleCamera}
/>
</SplitButton>
<ToggleButton
label={t('Share_screen')}
icons={['desktop-arrow-up', 'desktop-cross']}
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-conference/src/call/CameraPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const CameraPicker = () => {
choices={[videoQuality]}
// A call joined with the camera off may not have the permission that names the cameras yet.
beforeOpen={() => revealDeviceLabels(['videoinput'], devices)}
button={<DeviceMenuButton secondary large menuIcon='chevron-up' label={t('Camera_options')} danger={!self.cameraOn} />}
button={
<DeviceMenuButton splitButtonTrigger secondary large menuIcon='chevron-up' label={t('Camera_options')} danger={!self.cameraOn} />
}
/>
);
};
Expand Down
Loading
Loading