{/* eslint-disable-next-line
jsx-a11y/no-noninteractive-element-interactions,
- jsx-a11y/click-events-have-key-events
- */}
-
+ jsx-a11y/click-events-have-key-events
+ */}
+
diff --git a/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx b/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx
index 4e8e44b1f9321..1d8987995e8cf 100644
--- a/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx
+++ b/apps/meteor/client/components/InfoPanel/InfoPanel.stories.tsx
@@ -2,6 +2,7 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react';
import React from 'react';
import InfoPanel from '.';
+import { createFakeRoom } from '../../../tests/mocks/data';
import RetentionPolicyCallout from './RetentionPolicyCallout';
export default {
@@ -20,6 +21,8 @@ export default {
},
} as ComponentMeta
;
+const fakeRoom = createFakeRoom();
+
export const Default: ComponentStory = () => (
@@ -52,7 +55,7 @@ export const Default: ComponentStory = () => (
-
+
);
diff --git a/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx b/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx
index 27202afa496c4..c27234f6d0db5 100644
--- a/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx
+++ b/apps/meteor/client/components/InfoPanel/RetentionPolicyCallout.tsx
@@ -1,26 +1,19 @@
+import type { IRoom } from '@rocket.chat/core-typings';
import { Callout } from '@rocket.chat/fuselage';
import { useTranslation } from '@rocket.chat/ui-contexts';
-import type { FC } from 'react';
import React from 'react';
-import { useFormattedRelativeTime } from '../../hooks/useFormattedRelativeTime';
+import { usePruneWarningMessage } from '../../hooks/usePruneWarningMessage';
-type RetentionPolicyCalloutProps = {
- filesOnlyDefault: boolean;
- excludePinnedDefault: boolean;
- maxAgeDefault: number;
-};
-
-const RetentionPolicyCallout: FC = ({ filesOnlyDefault, excludePinnedDefault, maxAgeDefault }) => {
+const RetentionPolicyCallout = ({ room }: { room: IRoom }) => {
+ const message = usePruneWarningMessage(room);
const t = useTranslation();
- const time = useFormattedRelativeTime(maxAgeDefault);
return (
-
- {filesOnlyDefault && excludePinnedDefault && {t('RetentionPolicy_RoomWarning_FilesOnly', { time })}
}
- {filesOnlyDefault && !excludePinnedDefault && {t('RetentionPolicy_RoomWarning_UnpinnedFilesOnly', { time })}
}
- {!filesOnlyDefault && excludePinnedDefault && {t('RetentionPolicy_RoomWarning', { time })}
}
- {!filesOnlyDefault && !excludePinnedDefault && {t('RetentionPolicy_RoomWarning_Unpinned', { time })}
}
+
+
);
};
diff --git a/apps/meteor/client/components/ModalBackdrop.tsx b/apps/meteor/client/components/ModalBackdrop.tsx
index 18d930f9b1cc8..e1e6964961837 100644
--- a/apps/meteor/client/components/ModalBackdrop.tsx
+++ b/apps/meteor/client/components/ModalBackdrop.tsx
@@ -90,7 +90,7 @@ const ModalBackdrop = ({ children, onDismiss }: ModalBackdropProps): ReactElemen
children={children}
className='rcx-modal__backdrop'
position='fixed'
- zIndex={999999}
+ zIndex={9999}
inset={0}
display='flex'
flexDirection='column'
diff --git a/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx b/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx
index 0fd882f2c5cc2..401448ceb3966 100644
--- a/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx
+++ b/apps/meteor/client/components/Omnichannel/modals/CloseChatModal.tsx
@@ -18,7 +18,7 @@ import type { ReactElement } from 'react';
import React, { useCallback, useState, useEffect, useMemo } from 'react';
import { useForm } from 'react-hook-form';
-import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule';
+import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule';
import { dispatchToastMessage } from '../../../lib/toast';
import GenericModal from '../../GenericModal';
import Tags from '../Tags';
diff --git a/apps/meteor/client/components/Page/PageHeader.tsx b/apps/meteor/client/components/Page/PageHeader.tsx
index 1a2f53739c9af..4549c69dccec9 100644
--- a/apps/meteor/client/components/Page/PageHeader.tsx
+++ b/apps/meteor/client/components/Page/PageHeader.tsx
@@ -4,7 +4,7 @@ import { useLayout, useTranslation } from '@rocket.chat/ui-contexts';
import type { FC, ComponentProps, ReactNode } from 'react';
import React, { useContext } from 'react';
-import BurgerMenu from '../BurgerMenu';
+import SidebarToggler from '../SidebarToggler';
import PageContext from './PageContext';
type PageHeaderProps = {
@@ -24,15 +24,23 @@ const PageHeader: FC = ({ children = undefined, title, onClickB
-
+
{isMobile && (
-
+
)}
{onClickBack && }
diff --git a/apps/meteor/client/components/RoomAutoComplete/Avatar.tsx b/apps/meteor/client/components/RoomAutoComplete/Avatar.tsx
deleted file mode 100644
index 1437c4ebbe89d..0000000000000
--- a/apps/meteor/client/components/RoomAutoComplete/Avatar.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Options } from '@rocket.chat/fuselage';
-import { RoomAvatar } from '@rocket.chat/ui-avatar';
-import type { FC } from 'react';
-import React from 'react';
-
-type AvatarProps = {
- value: string;
- type: string;
- avatarETag?: string;
-};
-
-const Avatar: FC = ({ value, type, avatarETag, ...props }) => (
-
-);
-
-export default Avatar;
diff --git a/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx b/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx
index 39fbf9577776d..0da0e942b2e2a 100644
--- a/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx
+++ b/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx
@@ -1,36 +1,56 @@
+import type { IRoom } from '@rocket.chat/core-typings';
import { AutoComplete, Option, Box } from '@rocket.chat/fuselage';
import { useDebouncedValue } from '@rocket.chat/fuselage-hooks';
import { RoomAvatar } from '@rocket.chat/ui-avatar';
import { useEndpoint } from '@rocket.chat/ui-contexts';
import { useQuery } from '@tanstack/react-query';
-import type { ReactElement, ComponentProps } from 'react';
+import type { ComponentProps, ReactElement } from 'react';
import React, { memo, useMemo, useState } from 'react';
-import Avatar from './Avatar';
-
const generateQuery = (
term = '',
): {
selector: string;
} => ({ selector: JSON.stringify({ name: term }) });
-type RoomAutoCompleteProps = Omit, 'filter'>;
+type RoomAutoCompleteProps = Omit