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
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:
@@ -0,0 +1,80 @@
|
||||
import { isOmnichannelRoom } from '@rocket.chat/core-typings';
|
||||
import { SidebarItemIcon } from '@rocket.chat/fuselage';
|
||||
import { escapeHTML } from '@rocket.chat/tools';
|
||||
import { RoomAvatar } from '@rocket.chat/ui-avatar';
|
||||
import { useUserId } from '@rocket.chat/ui-contexts';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import SidePanelOmnichannelBadges from './SidePanelOmnichannelBadges';
|
||||
import { OmnichannelRoomIcon } from '../../../../components/RoomIcon/OmnichannelRoomIcon';
|
||||
import type { LivechatInquiryLocalRecord } from '../../../../hooks/useLivechatInquiryStore';
|
||||
import { roomCoordinator } from '../../../../lib/rooms/roomCoordinator';
|
||||
import { isIOsDevice } from '../../../../lib/utils/isIOsDevice';
|
||||
import { normalizeMessagePreview } from '../../../../lib/utils/normalizeMessagePreview/normalizeMessagePreview';
|
||||
import { useOmnichannelPriorities } from '../../../omnichannel/hooks/useOmnichannelPriorities';
|
||||
import SidePanelItem from '../SidepanelItem';
|
||||
import RoomMenu from '../SidepanelItem/RoomMenu';
|
||||
|
||||
export type InquireSidePanelItemProps = {
|
||||
room: LivechatInquiryLocalRecord;
|
||||
openedRoom?: string;
|
||||
};
|
||||
|
||||
const InquireSidePanelItem = ({ room, openedRoom, ...props }: InquireSidePanelItemProps) => {
|
||||
const { t } = useTranslation();
|
||||
const isAnonymous = !useUserId();
|
||||
|
||||
const highlighted = Boolean(room.alert);
|
||||
const { alert, rid, t: type } = room;
|
||||
|
||||
const time = 'lastMessage' in room ? room.lastMessage?.ts : undefined;
|
||||
const message =
|
||||
room.lastMessage &&
|
||||
`${escapeHTML(room.lastMessage.u.name || room.lastMessage.u.username)}: ${normalizeMessagePreview(room.lastMessage, t)}`;
|
||||
const title = roomCoordinator.getRoomName(room.t, room) || '';
|
||||
const href = roomCoordinator.getRouteLink(room.t, room) || '';
|
||||
|
||||
const badges = <>{isOmnichannelRoom(room) && <SidePanelOmnichannelBadges room={room} />}</>;
|
||||
|
||||
const isQueued = room.status === 'queued';
|
||||
const { enabled: isPriorityEnabled } = useOmnichannelPriorities();
|
||||
|
||||
const menu =
|
||||
!isIOsDevice && !isAnonymous && (!isQueued || (isQueued && isPriorityEnabled)) ? (
|
||||
<RoomMenu
|
||||
alert={alert}
|
||||
rid={rid}
|
||||
roomOpen={rid === openedRoom}
|
||||
type={type}
|
||||
name={title}
|
||||
hideDefaultOptions={isQueued}
|
||||
href={href || undefined}
|
||||
/>
|
||||
) : undefined;
|
||||
|
||||
return (
|
||||
<SidePanelItem
|
||||
href={href}
|
||||
selected={rid === openedRoom}
|
||||
title={title}
|
||||
avatar={<RoomAvatar size='x20' room={{ ...room, _id: room.rid || room._id, type: room.t }} />}
|
||||
icon={
|
||||
room.source && (
|
||||
<SidebarItemIcon
|
||||
highlighted={highlighted}
|
||||
icon={<OmnichannelRoomIcon placement='sidebar' source={room.source} status={room.v.status} size='x20' />}
|
||||
/>
|
||||
)
|
||||
}
|
||||
unread={highlighted}
|
||||
time={time}
|
||||
subtitle={message ? <span className='message-body--unstyled' dangerouslySetInnerHTML={{ __html: message }} /> : null}
|
||||
badges={badges}
|
||||
menu={menu}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(InquireSidePanelItem);
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { IOmnichannelRoom } from '@rocket.chat/core-typings';
|
||||
|
||||
import SidePanelPriorityTag from './SidePanelPriorityTag';
|
||||
import RoomActivityIcon from '../../../../omnichannel/components/RoomActivityIcon';
|
||||
import { useOmnichannelPriorities } from '../../../../omnichannel/hooks/useOmnichannelPriorities';
|
||||
|
||||
export type SidePanelOmnichannelBadgesProps = { room: IOmnichannelRoom };
|
||||
|
||||
const SidePanelOmnichannelBadges = ({ room }: SidePanelOmnichannelBadgesProps) => {
|
||||
const { enabled: isPriorityEnabled } = useOmnichannelPriorities();
|
||||
|
||||
return (
|
||||
<>
|
||||
{isPriorityEnabled ? <SidePanelPriorityTag priorityWeight={room.priorityWeight} /> : null}
|
||||
<RoomActivityIcon room={room} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default SidePanelOmnichannelBadges;
|
||||
@@ -0,0 +1,22 @@
|
||||
import type { LivechatPriorityWeight } from '@rocket.chat/core-typings';
|
||||
import { Icon, Tag } from '@rocket.chat/fuselage';
|
||||
|
||||
import { useOmnichannelPrioritiesConfig } from '../../../../omnichannel/hooks/useOmnichannelPrioritiesConfig';
|
||||
|
||||
export type SidePanelPriorityTagProps = { priorityWeight: LivechatPriorityWeight };
|
||||
|
||||
const SidePanelPriorityTag = ({ priorityWeight }: SidePanelPriorityTagProps) => {
|
||||
const prioritiesConfig = useOmnichannelPrioritiesConfig(priorityWeight, false);
|
||||
|
||||
if (!prioritiesConfig?.iconName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Tag icon={<Icon marginInlineEnd={4} size='x12' name={prioritiesConfig?.iconName} />} variant={prioritiesConfig?.variant}>
|
||||
{prioritiesConfig?.name}
|
||||
</Tag>
|
||||
);
|
||||
};
|
||||
|
||||
export default SidePanelPriorityTag;
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from './SidePanelOmnichannelBadges';
|
||||
@@ -0,0 +1,22 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { sidePanelFiltersConfig, useSidePanelRoomsListTab, useUnreadOnlyToggle } from '../../../contexts/RoomsNavigationContext';
|
||||
import SidePanel from '../../SidePanel';
|
||||
|
||||
const SidePanelInProgress = () => {
|
||||
const { t } = useTranslation();
|
||||
const rooms = useSidePanelRoomsListTab('inProgress');
|
||||
const [unreadOnly, toggleUnreadOnly] = useUnreadOnlyToggle();
|
||||
|
||||
return (
|
||||
<SidePanel
|
||||
title={t(sidePanelFiltersConfig.inProgress.title)}
|
||||
currentTab='inProgress'
|
||||
unreadOnly={unreadOnly}
|
||||
toggleUnreadOnly={toggleUnreadOnly}
|
||||
rooms={rooms}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default SidePanelInProgress;
|
||||
@@ -0,0 +1,36 @@
|
||||
import { usePermission } from '@rocket.chat/ui-contexts';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import {
|
||||
sidePanelFiltersConfig,
|
||||
useRedirectToDefaultTab,
|
||||
useSidePanelQueueListTab,
|
||||
useUnreadOnlyToggle,
|
||||
} from '../../../contexts/RoomsNavigationContext';
|
||||
import SidePanelInquiry from '../../SidePanelInquiry';
|
||||
|
||||
const SidePanelQueue = () => {
|
||||
const { t } = useTranslation();
|
||||
const canViewOmnichannelQueue = usePermission('view-livechat-queue');
|
||||
|
||||
const rooms = useSidePanelQueueListTab();
|
||||
const [unreadOnly, toggleUnreadOnly] = useUnreadOnlyToggle();
|
||||
|
||||
useRedirectToDefaultTab(!canViewOmnichannelQueue);
|
||||
|
||||
if (!canViewOmnichannelQueue) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<SidePanelInquiry
|
||||
title={t(sidePanelFiltersConfig.queue.title)}
|
||||
currentTab='queue'
|
||||
unreadOnly={unreadOnly}
|
||||
toggleUnreadOnly={toggleUnreadOnly}
|
||||
rooms={rooms}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default SidePanelQueue;
|
||||
@@ -0,0 +1,35 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useHasLicenseModule } from '../../../../../hooks/useHasLicenseModule';
|
||||
import {
|
||||
sidePanelFiltersConfig,
|
||||
useRedirectToDefaultTab,
|
||||
useSidePanelRoomsListTab,
|
||||
useUnreadOnlyToggle,
|
||||
} from '../../../contexts/RoomsNavigationContext';
|
||||
import SidePanel from '../../SidePanel';
|
||||
|
||||
const SidePanelOnHold = () => {
|
||||
const { t } = useTranslation();
|
||||
const rooms = useSidePanelRoomsListTab('onHold');
|
||||
const [unreadOnly, toggleUnreadOnly] = useUnreadOnlyToggle();
|
||||
|
||||
const { data: hasEEModule = false } = useHasLicenseModule('livechat-enterprise');
|
||||
useRedirectToDefaultTab(!hasEEModule);
|
||||
|
||||
if (!hasEEModule) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<SidePanel
|
||||
title={t(sidePanelFiltersConfig.onHold.title)}
|
||||
currentTab='onHold'
|
||||
unreadOnly={unreadOnly}
|
||||
toggleUnreadOnly={toggleUnreadOnly}
|
||||
rooms={rooms}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default SidePanelOnHold;
|
||||
Reference in New Issue
Block a user