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:
30
apps/meteor/client/views/home/cards/AddUsersCard.tsx
Normal file
30
apps/meteor/client/views/home/cards/AddUsersCard.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { Card } from '@rocket.chat/fuselage';
|
||||
import { useTranslation, useRouter } from '@rocket.chat/ui-contexts';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
import { GenericCard, GenericCardButton } from '../../../components/GenericCard';
|
||||
|
||||
const AddUsersCard = (props: Omit<ComponentProps<typeof Card>, 'type'>) => {
|
||||
const t = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const handleOpenUsersRoute = (): void => {
|
||||
router.navigate('/admin/users');
|
||||
};
|
||||
|
||||
return (
|
||||
<GenericCard
|
||||
title={t('Add_users')}
|
||||
body={t('Invite_and_add_members_to_this_workspace_to_start_communicating')}
|
||||
buttons={[
|
||||
<GenericCardButton key={1} onClick={handleOpenUsersRoute} primary>
|
||||
{t('Add_users')}
|
||||
</GenericCardButton>,
|
||||
]}
|
||||
width='x340'
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddUsersCard;
|
||||
29
apps/meteor/client/views/home/cards/CreateChannelsCard.tsx
Normal file
29
apps/meteor/client/views/home/cards/CreateChannelsCard.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { Card } from '@rocket.chat/fuselage';
|
||||
import { useTranslation, useSetModal } from '@rocket.chat/ui-contexts';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
import { GenericCard, GenericCardButton } from '../../../components/GenericCard';
|
||||
import CreateChannelModal from '../../../navbar/NavBarPagesGroup/actions/CreateChannelModal';
|
||||
|
||||
const CreateChannelsCard = (props: Omit<ComponentProps<typeof Card>, 'type'>) => {
|
||||
const t = useTranslation();
|
||||
const setModal = useSetModal();
|
||||
|
||||
const openCreateChannelModal = (): void => setModal(<CreateChannelModal onClose={(): void => setModal(null)} />);
|
||||
|
||||
return (
|
||||
<GenericCard
|
||||
title={t('Create_channels')}
|
||||
body={t('Create_a_public_channel_that_new_workspace_members_can_join')}
|
||||
buttons={[
|
||||
<GenericCardButton key={1} onClick={openCreateChannelModal}>
|
||||
{t('Create_channel')}
|
||||
</GenericCardButton>,
|
||||
]}
|
||||
width='x340'
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default CreateChannelsCard;
|
||||
101
apps/meteor/client/views/home/cards/CustomContentCard.tsx
Normal file
101
apps/meteor/client/views/home/cards/CustomContentCard.tsx
Normal file
@@ -0,0 +1,101 @@
|
||||
import { Box, Button, Card, CardBody, CardControls, CardHeader, Icon, Tag } from '@rocket.chat/fuselage';
|
||||
import { useRole, useSettingSetValue, useSetting, useToastMessageDispatch, useRouter } from '@rocket.chat/ui-contexts';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useIsEnterprise } from '../../../hooks/useIsEnterprise';
|
||||
import CustomHomepageContent from '../CustomHomePageContent';
|
||||
|
||||
const CustomContentCard = (props: Omit<ComponentProps<typeof Card>, 'type'>) => {
|
||||
const { t } = useTranslation();
|
||||
const dispatchToastMessage = useToastMessageDispatch();
|
||||
const router = useRouter();
|
||||
|
||||
const { data } = useIsEnterprise();
|
||||
const isAdmin = useRole('admin');
|
||||
const customContentBody = useSetting('Layout_Home_Body', '');
|
||||
const isCustomContentBodyEmpty = customContentBody === '';
|
||||
const isCustomContentVisible = useSetting('Layout_Home_Custom_Block_Visible', false);
|
||||
const isCustomContentOnly = useSetting('Layout_Custom_Body_Only', false);
|
||||
|
||||
const setCustomContentVisible = useSettingSetValue('Layout_Home_Custom_Block_Visible');
|
||||
const setCustomContentOnly = useSettingSetValue('Layout_Custom_Body_Only');
|
||||
|
||||
const handleChangeCustomContentVisibility = async () => {
|
||||
try {
|
||||
await setCustomContentVisible(!isCustomContentVisible);
|
||||
} catch (error) {
|
||||
dispatchToastMessage({ type: 'error', message: error });
|
||||
}
|
||||
};
|
||||
|
||||
const handleOnlyShowCustomContent = async () => {
|
||||
try {
|
||||
await setCustomContentOnly(!isCustomContentOnly);
|
||||
} catch (error) {
|
||||
dispatchToastMessage({ type: 'error', message: error });
|
||||
}
|
||||
};
|
||||
|
||||
const isEnterprise = data?.isEnterprise;
|
||||
const willNotShowCustomContent = isCustomContentBodyEmpty || !isCustomContentVisible;
|
||||
|
||||
const userVisibilityTooltipText = isCustomContentVisible ? t('Now_Its_Visible_For_Everyone') : t('Now_Its_Visible_Only_For_Admins');
|
||||
|
||||
let customContentOnlyTooltipText = t('It_Will_Hide_All_Other_Content_Blocks_In_The_Homepage');
|
||||
if (willNotShowCustomContent) {
|
||||
customContentOnlyTooltipText = t('Action_Available_After_Custom_Content_Added_And_Visible');
|
||||
} else if (isCustomContentOnly) {
|
||||
customContentOnlyTooltipText = t('It_Will_Show_All_Other_Content_Blocks_In_The_Homepage');
|
||||
}
|
||||
|
||||
if (isAdmin) {
|
||||
return (
|
||||
<Card role='region' aria-label={t('Custom_content', 'Custom content')} {...props}>
|
||||
<CardHeader>
|
||||
<Tag>
|
||||
<Icon marginInlineEnd={4} name={willNotShowCustomContent ? 'eye-off' : 'eye'} size='x12' />
|
||||
{willNotShowCustomContent ? t('Not_Visible_To_Workspace') : t('Visible_To_Workspace')}
|
||||
</Tag>
|
||||
</CardHeader>
|
||||
<CardBody>{isCustomContentBodyEmpty ? t('Homepage_Custom_Content_Default_Message') : <CustomHomepageContent />}</CardBody>
|
||||
<CardControls>
|
||||
<Button medium onClick={() => router.navigate('/admin/settings/Layout')} title={t('Layout_Home_Page_Content')}>
|
||||
{t('Customize_Content')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={willNotShowCustomContent ? 'eye' : 'eye-off'}
|
||||
disabled={isCustomContentBodyEmpty || (isCustomContentVisible && isCustomContentOnly)}
|
||||
title={isCustomContentBodyEmpty ? t('Action_Available_After_Custom_Content_Added') : userVisibilityTooltipText}
|
||||
onClick={handleChangeCustomContentVisibility}
|
||||
medium
|
||||
>
|
||||
{willNotShowCustomContent ? t('Show_To_Workspace') : t('Hide_On_Workspace')}
|
||||
</Button>
|
||||
<Button
|
||||
icon='lightning'
|
||||
disabled={willNotShowCustomContent || !isEnterprise}
|
||||
title={!isEnterprise ? t('Premium_only') : customContentOnlyTooltipText}
|
||||
onClick={handleOnlyShowCustomContent}
|
||||
medium
|
||||
>
|
||||
{!isCustomContentOnly ? t('Show_Only_This_Content') : t('Show_default_content')}
|
||||
</Button>
|
||||
</CardControls>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
if (!willNotShowCustomContent && !isCustomContentOnly) {
|
||||
return (
|
||||
<Card>
|
||||
<Box marginBlock={8}>
|
||||
<CustomHomepageContent role='status' aria-label={customContentBody} />
|
||||
</Box>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
return <CustomHomepageContent role='status' aria-label={customContentBody} />;
|
||||
};
|
||||
|
||||
export default CustomContentCard;
|
||||
38
apps/meteor/client/views/home/cards/DesktopAppsCard.tsx
Normal file
38
apps/meteor/client/views/home/cards/DesktopAppsCard.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { Card } from '@rocket.chat/fuselage';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { GenericCard, GenericCardButton } from '../../../components/GenericCard';
|
||||
import { useExternalLink } from '../../../hooks/useExternalLink';
|
||||
import { links } from '../../../lib/links';
|
||||
|
||||
const WINDOWS_APP_URL = links.go.desktopAppWindows;
|
||||
const LINUX_APP_URL = links.go.desktopAppLinux;
|
||||
const MAC_APP_URL = links.go.desktopAppMac;
|
||||
|
||||
const DesktopAppsCard = (props: Omit<ComponentProps<typeof Card>, 'type'>) => {
|
||||
const { t } = useTranslation();
|
||||
const handleOpenLink = useExternalLink();
|
||||
|
||||
return (
|
||||
<GenericCard
|
||||
title={t('Desktop_apps')}
|
||||
body={t('Install_rocket_chat_on_your_preferred_desktop_platform')}
|
||||
buttons={[
|
||||
<GenericCardButton key={1} onClick={() => handleOpenLink(WINDOWS_APP_URL)} role='link'>
|
||||
{t('Platform_Windows')}
|
||||
</GenericCardButton>,
|
||||
<GenericCardButton key={2} onClick={() => handleOpenLink(LINUX_APP_URL)} role='link'>
|
||||
{t('Platform_Linux')}
|
||||
</GenericCardButton>,
|
||||
<GenericCardButton key={3} onClick={() => handleOpenLink(MAC_APP_URL)} role='link'>
|
||||
{t('Platform_Mac')}
|
||||
</GenericCardButton>,
|
||||
]}
|
||||
width='x340'
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default DesktopAppsCard;
|
||||
30
apps/meteor/client/views/home/cards/DocumentationCard.tsx
Normal file
30
apps/meteor/client/views/home/cards/DocumentationCard.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { Card } from '@rocket.chat/fuselage';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { GenericCard, GenericCardButton } from '../../../components/GenericCard';
|
||||
import { useExternalLink } from '../../../hooks/useExternalLink';
|
||||
import { links } from '../../../lib/links';
|
||||
|
||||
const DOCS_URL = links.go.documentation;
|
||||
|
||||
const DocumentationCard = (props: Omit<ComponentProps<typeof Card>, 'type'>) => {
|
||||
const { t } = useTranslation();
|
||||
const handleOpenLink = useExternalLink();
|
||||
|
||||
return (
|
||||
<GenericCard
|
||||
title={t('Documentation')}
|
||||
body={t('Learn_how_to_unlock_the_myriad_possibilities_of_rocket_chat')}
|
||||
buttons={[
|
||||
<GenericCardButton key={1} onClick={() => handleOpenLink(DOCS_URL)} role='link'>
|
||||
{t('See_documentation')}
|
||||
</GenericCardButton>,
|
||||
]}
|
||||
width='x340'
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default DocumentationCard;
|
||||
30
apps/meteor/client/views/home/cards/JoinRoomsCard.tsx
Normal file
30
apps/meteor/client/views/home/cards/JoinRoomsCard.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { Card } from '@rocket.chat/fuselage';
|
||||
import { useTranslation, useRouter } from '@rocket.chat/ui-contexts';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
import { GenericCard, GenericCardButton } from '../../../components/GenericCard';
|
||||
|
||||
const JoinRoomsCard = (props: Omit<ComponentProps<typeof Card>, 'type'>) => {
|
||||
const t = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const handleDirectory = (): void => {
|
||||
router.navigate('/directory');
|
||||
};
|
||||
|
||||
return (
|
||||
<GenericCard
|
||||
title={t('Join_rooms')}
|
||||
body={t('Discover_public_channels_and_teams_in_the_workspace_directory')}
|
||||
buttons={[
|
||||
<GenericCardButton key={1} onClick={handleDirectory}>
|
||||
{t('Open_directory')}
|
||||
</GenericCardButton>,
|
||||
]}
|
||||
width='x340'
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default JoinRoomsCard;
|
||||
34
apps/meteor/client/views/home/cards/MobileAppsCard.tsx
Normal file
34
apps/meteor/client/views/home/cards/MobileAppsCard.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { Card } from '@rocket.chat/fuselage';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { GenericCard, GenericCardButton } from '../../../components/GenericCard';
|
||||
import { useExternalLink } from '../../../hooks/useExternalLink';
|
||||
import { links } from '../../../lib/links';
|
||||
|
||||
const GOOGLE_PLAY_URL = links.go.mobileAppGoogle;
|
||||
const APP_STORE_URL = links.go.mobileAppApple;
|
||||
|
||||
const MobileAppsCard = (props: Omit<ComponentProps<typeof Card>, 'type'>) => {
|
||||
const { t } = useTranslation();
|
||||
const handleOpenLink = useExternalLink();
|
||||
|
||||
return (
|
||||
<GenericCard
|
||||
title={t('Mobile_apps')}
|
||||
body={t('Take_rocket_chat_with_you_with_mobile_applications')}
|
||||
buttons={[
|
||||
<GenericCardButton key={1} onClick={() => handleOpenLink(GOOGLE_PLAY_URL)} role='link'>
|
||||
{t('Google_Play')}
|
||||
</GenericCardButton>,
|
||||
<GenericCardButton key={2} onClick={() => handleOpenLink(APP_STORE_URL)} role='link'>
|
||||
{t('App_Store')}
|
||||
</GenericCardButton>,
|
||||
]}
|
||||
width='x340'
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default MobileAppsCard;
|
||||
Reference in New Issue
Block a user