- );
-};
diff --git a/src/script/components/calling/CallingCell/CallingControls/CallingControls.styles.ts b/src/script/components/calling/CallingCell/CallingControls/CallingControls.styles.ts
deleted file mode 100644
index f4d85962667..00000000000
--- a/src/script/components/calling/CallingCell/CallingControls/CallingControls.styles.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2024 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-import {CSSObject} from '@emotion/react';
-
-export const cellControlsWrapper: CSSObject = {
- alignItems: 'center',
- display: 'flex',
- justifyContent: 'space-between',
- width: '100%',
-};
-
-export const cellControlsList: CSSObject = {
- display: 'flex',
- gap: '8px',
- listStyleType: 'none',
- margin: 0,
- padding: 0,
-};
diff --git a/src/script/components/calling/CallingCell/CallingControls/CallingControls.tsx b/src/script/components/calling/CallingCell/CallingControls/CallingControls.tsx
deleted file mode 100644
index 9ebf376d943..00000000000
--- a/src/script/components/calling/CallingCell/CallingControls/CallingControls.tsx
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2024 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-import cx from 'classnames';
-import {container} from 'tsyringe';
-
-import {
- cellControlsList,
- cellControlsWrapper,
-} from 'Components/calling/CallingCell/CallingControls/CallingControls.styles';
-import {useCallAlertState} from 'Components/calling/useCallAlertState';
-import * as Icon from 'Components/Icon';
-import {useKoSubscribableChildren} from 'Util/ComponentUtil';
-import {t} from 'Util/LocalizerUtil';
-
-import {Call} from '../../../../calling/Call';
-import {Participant} from '../../../../calling/Participant';
-import {TeamState} from '../../../../team/TeamState';
-import {CallActions} from '../../../../view_model/CallingViewModel';
-
-interface CallingControlsProps {
- answerCall: () => void;
- call: Call;
- callActions: CallActions;
- call1To1StartedAlert: string;
- isDetachedWindow: boolean;
- isFullUi?: boolean;
- isMuted?: boolean;
- isIncoming: boolean;
- isOutgoing: boolean;
- isOngoing: boolean;
- isDeclined: boolean;
- isGroup: boolean;
- isVideoCall: boolean;
- isConnecting?: boolean;
- selfParticipant: Participant;
- disableScreenButton: boolean;
- teamState: TeamState;
- supportsVideoCall: boolean;
-}
-
-export const CallingControls = ({
- answerCall,
- call,
- callActions,
- call1To1StartedAlert,
- isFullUi,
- isMuted,
- isConnecting,
- isDetachedWindow,
- isIncoming,
- isOutgoing,
- isDeclined,
- disableScreenButton,
- isVideoCall,
- isOngoing,
- isGroup,
- selfParticipant,
- teamState = container.resolve(TeamState),
- supportsVideoCall,
-}: CallingControlsProps) => {
- const {isVideoCallingEnabled} = useKoSubscribableChildren(teamState, ['isVideoCallingEnabled']);
- const {sharesScreen: selfSharesScreen, sharesCamera: selfSharesCamera} = useKoSubscribableChildren(selfParticipant, [
- 'sharesScreen',
- 'sharesCamera',
- ]);
-
- const {showAlert, clearShowAlert} = useCallAlertState();
-
- const isVideoUnsupported = !selfSharesCamera && !supportsVideoCall;
- const showVideoButton = isVideoCallingEnabled && (isVideoCall || isOngoing);
- const disableVideoButton = (isOutgoing && selfSharesCamera) || isVideoUnsupported;
-
- return (
-
- );
-};
diff --git a/src/script/components/calling/CallingCell/CallingControls/index.ts b/src/script/components/calling/CallingCell/CallingControls/index.ts
deleted file mode 100644
index 6fcd6a5624a..00000000000
--- a/src/script/components/calling/CallingCell/CallingControls/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2024 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-export * from './CallingControls';
diff --git a/src/script/components/calling/CallingCell/CallingHeader/CallingHeader.styles.ts b/src/script/components/calling/CallingCell/CallingHeader/CallingHeader.styles.ts
deleted file mode 100644
index 270755160b6..00000000000
--- a/src/script/components/calling/CallingCell/CallingHeader/CallingHeader.styles.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2024 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-import {CSSObject} from '@emotion/react';
-
-export const callingHeaderContainer: CSSObject = {
- alignItems: 'center',
- borderRadius: '8px 8px 0 0',
- cursor: 'pointer',
- display: 'flex',
- fontWeight: 'var(--font-weight-regular)',
- marginBottom: '8px',
- position: 'relative',
- width: '100%',
-};
-
-export const callingHeaderWrapper: CSSObject = {
- alignItems: 'center',
- display: 'flex',
- gap: '12px',
- width: '100%',
- overflow: 'hidden',
-};
-
-export const callAvatar: CSSObject = {
- alignItems: 'center',
- display: 'flex',
-};
-
-export const conversationCallName: CSSObject = {
- fontSize: 'var(--font-size-medium)',
- fontWeight: 'var(--font-weight-medium)',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
-};
-
-export const callDescription: CSSObject = {
- color: 'var(--background)',
- fontSize: 'var(--font-size-small)',
- fontWeight: 'var(--font-weight-regular)',
-};
-
-export const callDetails: CSSObject = {
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- paddingRight: '12px',
- width: '100%',
-};
-
-export const cbrCallState: CSSObject = {
- fontWeight: 'var(--font-weight-semibold)',
- marginLeft: '6px',
-};
-
-export const detachedWindowButton: CSSObject = {
- alignItems: 'center',
- background: 'transparent',
- border: 'none',
- display: 'flex',
- justifyContent: 'center',
- padding: '8px 12px',
-};
diff --git a/src/script/components/calling/CallingCell/CallingHeader/CallingHeader.tsx b/src/script/components/calling/CallingCell/CallingHeader/CallingHeader.tsx
deleted file mode 100644
index fa4f3d5eb32..00000000000
--- a/src/script/components/calling/CallingCell/CallingHeader/CallingHeader.tsx
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2024 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-import {TabIndex} from '@wireapp/react-ui-kit/lib/types/enums';
-
-import {Avatar, AVATAR_SIZE, GroupAvatar} from 'Components/Avatar';
-import {useDetachedCallingFeatureState} from 'Components/calling/DetachedCallingCell/DetachedCallingFeature.state';
-import {Duration} from 'Components/calling/Duration';
-import * as Icon from 'Components/Icon';
-import {t} from 'Util/LocalizerUtil';
-
-import {
- callAvatar,
- callDescription,
- callDetails,
- callingHeaderContainer,
- callingHeaderWrapper,
- cbrCallState,
- conversationCallName,
- detachedWindowButton,
-} from './CallingHeader.styles';
-
-import {User} from '../../../../entity/User';
-import {createNavigate, createNavigateKeyboard} from '../../../../router/routerBindings';
-
-interface CallingHeaderProps {
- isOngoing: boolean;
- isGroup: boolean;
-
- showAlert: boolean;
- isVideoCall: boolean;
- clearShowAlert: () => void;
- conversationUrl: string;
- callStartedAlert: string;
- ongoingCallAlert: string;
- isTemporaryUser: boolean;
- conversationParticipants: User[];
- conversationName: string;
- currentCallStatus: any;
- startedAt?: number;
- isCbrEnabled: boolean;
- toggleDetachedWindow: () => void;
- isDetached: boolean;
- isDetachedWindow: boolean;
-}
-
-export const CallingHeader = ({
- isGroup,
- isOngoing,
- showAlert,
- isVideoCall,
- clearShowAlert,
- conversationUrl,
- callStartedAlert,
- ongoingCallAlert,
- isTemporaryUser,
- conversationParticipants,
- conversationName,
- currentCallStatus,
- startedAt,
- isCbrEnabled,
- toggleDetachedWindow,
- isDetached,
- isDetachedWindow,
-}: CallingHeaderProps) => {
- const isDetachedCallingFeatureEnabled = useDetachedCallingFeatureState(state => state.isSupported());
- const isDetachedWindowActive = isDetachedWindow ? isDetached : true;
-
- return (
-
- );
-};
diff --git a/src/script/components/calling/CallingCell/CallingHeader/index.ts b/src/script/components/calling/CallingCell/CallingHeader/index.ts
deleted file mode 100644
index 7d3a24f71a9..00000000000
--- a/src/script/components/calling/CallingCell/CallingHeader/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2024 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-export * from './CallingHeader';
diff --git a/src/script/components/calling/CallingCell/index.ts b/src/script/components/calling/CallingCell/index.ts
deleted file mode 100644
index bdc2f2b8760..00000000000
--- a/src/script/components/calling/CallingCell/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Wire
- * Copyright (C) 2024 Wire Swiss GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- *
- */
-
-export * from './CallingCell';
diff --git a/src/script/components/calling/DetachedCallingCell/DetachedCallingCell.tsx b/src/script/components/calling/DetachedCallingCell/DetachedCallingCell.tsx
index 002011e4a7e..5192ff97a21 100644
--- a/src/script/components/calling/DetachedCallingCell/DetachedCallingCell.tsx
+++ b/src/script/components/calling/DetachedCallingCell/DetachedCallingCell.tsx
@@ -72,8 +72,8 @@ export const DetachedCallingCell = ({
pushToTalkKey={pushToTalkKey}
isFullUi
hasAccessToCamera={hasAccessToCamera}
+ isSelfVerified={selfUser.is_verified()}
setMaximizedParticipant={participant => activeCall.maximizedParticipant(participant)}
- isDetached
/>
);
diff --git a/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx b/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx
index 3a205c54bd8..f853fff3730 100644
--- a/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx
+++ b/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx
@@ -51,11 +51,10 @@ import {EmptyConversationList} from './EmptyConversationList';
import {getTabConversations} from './helpers';
import {SidebarStatus, SidebarTabs, useFolderState, useSidebarStore} from './state';
-import {CallState} from '../../../../calling/CallState';
+import {CallingViewMode, CallState} from '../../../../calling/CallState';
import {createLabel} from '../../../../conversation/ConversationLabelRepository';
import {ConversationRepository} from '../../../../conversation/ConversationRepository';
import {ConversationState} from '../../../../conversation/ConversationState';
-import type {Conversation} from '../../../../entity/Conversation';
import {User} from '../../../../entity/User';
import {useConversationFocus} from '../../../../hooks/useConversationFocus';
import {PreferenceNotificationRepository} from '../../../../notification/PreferenceNotificationRepository';
@@ -105,7 +104,6 @@ const Conversations: React.FC = ({
const [isConversationFilterFocused, setIsConversationFilterFocused] = useState(false);
const {classifiedDomains, isTeam} = useKoSubscribableChildren(teamState, ['classifiedDomains', 'isTeam']);
const {connectRequests} = useKoSubscribableChildren(userState, ['connectRequests']);
- const {notifications} = useKoSubscribableChildren(preferenceNotificationRepository, ['notifications']);
const {
activeConversation,
@@ -122,8 +120,9 @@ const Conversations: React.FC = ({
'unreadConversations',
'visibleConversations',
]);
+ const {activeCalls, viewMode} = useKoSubscribableChildren(callState, ['activeCalls', 'viewMode']);
- const {activeCalls} = useKoSubscribableChildren(callState, ['activeCalls']);
+ const isCallWindowDetached = viewMode === CallingViewMode.DETACHED_WINDOW;
const {conversationLabelRepository} = conversationRepository;
const favoriteConversations = conversationLabelRepository.getFavorites(conversations);
@@ -143,11 +142,8 @@ const Conversations: React.FC = ({
const {openFolder, closeFolder, expandedFolder, isFoldersTabOpen, toggleFoldersTab} = useFolderState();
const {currentFocus, handleKeyDown, resetConversationFocus} = useConversationFocus(conversations);
- // false when screen is larger than 1000px
- // true when screen is smaller than 1000px
- const isScreenLessThanMdBreakpoint = useMatchMedia('(max-width: 1000px)');
- const isSideBarOpen =
- sidebarStatus === SidebarStatus.AUTO ? !isScreenLessThanMdBreakpoint : sidebarStatus === SidebarStatus.OPEN;
+ const mdBreakpoint = useMatchMedia('(max-width: 1000px)');
+ const isSideBarOpen = sidebarStatus === SidebarStatus.AUTO ? mdBreakpoint : sidebarStatus === SidebarStatus.OPEN;
const {conversations: currentTabConversations, searchInputPlaceholder} = getTabConversations({
currentTab,
@@ -181,20 +177,6 @@ const Conversations: React.FC = ({
}
}, [activeConversation, conversationState, listViewModel.contentViewModel, conversations.length]);
- useEffect(() => {
- amplify.subscribe(WebAppEvents.CONVERSATION.SHOW, (conversation?: Conversation) => {
- if (!conversation) {
- return;
- }
-
- const includesConversation = currentTabConversations.includes(conversation);
-
- if (!includesConversation) {
- setCurrentTab(SidebarTabs.RECENT);
- }
- });
- }, [currentTabConversations]);
-
useEffect(() => {
if (!activeConversation) {
return () => {};
@@ -256,7 +238,7 @@ const Conversations: React.FC = ({
}
const sidebar = (
-