diff --git a/.changeset/four-dragons-warn.md b/.changeset/four-dragons-warn.md new file mode 100644 index 0000000000000..c8b3da4d93300 --- /dev/null +++ b/.changeset/four-dragons-warn.md @@ -0,0 +1,8 @@ +--- +'@rocket.chat/ui-client': minor +'@rocket.chat/i18n': minor +'@rocket.chat/meteor': minor +--- + +Replaces the parent room tag in room header in favor of a button to back to the parent room +> This change is being tested under `Enhanced navigation experience` feature preview, in order to check it you need to enabled it diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoom.tsx deleted file mode 100644 index 5a3df51894de8..0000000000000 --- a/apps/meteor/client/views/room/HeaderV2/ParentRoom.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import type { IRoom } from '@rocket.chat/core-typings'; - -import { HeaderTag, HeaderTagIcon } from '../../../components/Header'; -import { useRoomIcon } from '../../../hooks/useRoomIcon'; -import { roomCoordinator } from '../../../lib/rooms/roomCoordinator'; - -type ParentRoomProps = { - room: Pick; -}; - -const ParentRoom = ({ room }: ParentRoomProps) => { - const icon = useRoomIcon(room); - - const handleRedirect = (): void => roomCoordinator.openRouteLink(room.t, { rid: room._id, ...room }); - - return ( - (e.code === 'Space' || e.code === 'Enter') && handleRedirect()} - onClick={handleRedirect} - > - - {roomCoordinator.getRoomName(room.t, room)} - - ); -}; - -export default ParentRoom; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussion.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussion.tsx new file mode 100644 index 0000000000000..09375e137d1de --- /dev/null +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussion.tsx @@ -0,0 +1,20 @@ +import type { IRoom } from '@rocket.chat/core-typings'; +import { useTranslation } from 'react-i18next'; + +import { roomCoordinator } from '../../../../../lib/rooms/roomCoordinator'; +import ParentRoomButton from '../ParentRoomButton'; + +type ParentDiscussionProps = { + loading?: boolean; + room: Pick; +}; + +const ParentDiscussion = ({ loading = false, room }: ParentDiscussionProps) => { + const { t } = useTranslation(); + const roomName = roomCoordinator.getRoomName(room.t, room); + const handleRedirect = (): void => roomCoordinator.openRouteLink(room.t, { rid: room._id, ...room }); + + return ; +}; + +export default ParentDiscussion; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussionRoute.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussionRoute.tsx new file mode 100644 index 0000000000000..5b407de6ba0c1 --- /dev/null +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussionRoute.tsx @@ -0,0 +1,27 @@ +import type { IRoom } from '@rocket.chat/core-typings'; +import { useUserSubscription } from '@rocket.chat/ui-contexts'; + +import ParentDiscussion from './ParentDiscussion'; +import ParentDiscussionWithData from './ParentDiscussionWithData'; + +type ParentDiscussionRouteProps = { + room: Pick; +}; + +const ParentDiscussionRoute = ({ room }: ParentDiscussionRouteProps) => { + const { prid } = room; + + if (!prid) { + throw new Error('Parent room ID is missing'); + } + + const subscription = useUserSubscription(prid); + + if (subscription) { + return ; + } + + return ; +}; + +export default ParentDiscussionRoute; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussionWithData.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussionWithData.tsx new file mode 100644 index 0000000000000..d7b5f87944db5 --- /dev/null +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/ParentDiscussionWithData.tsx @@ -0,0 +1,16 @@ +import type { IRoom } from '@rocket.chat/core-typings'; + +import ParentDiscussion from './ParentDiscussion'; +import { useRoomInfoEndpoint } from '../../../../../hooks/useRoomInfoEndpoint'; + +const ParentDiscussionWithData = ({ rid }: { rid: IRoom['_id'] }) => { + const { data, isPending, isError } = useRoomInfoEndpoint(rid); + + if (isError || !data?.room) { + return null; + } + + return ; +}; + +export default ParentDiscussionWithData; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/index.ts b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/index.ts new file mode 100644 index 0000000000000..6d70f6998d612 --- /dev/null +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentDiscussion/index.ts @@ -0,0 +1 @@ +export { default } from './ParentDiscussionRoute'; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentRoom.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentRoom.tsx new file mode 100644 index 0000000000000..38c6cc5f86597 --- /dev/null +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentRoom.tsx @@ -0,0 +1,22 @@ +import type { IRoom } from '@rocket.chat/core-typings'; + +import ParentDiscussion from './ParentDiscussion'; +import ParentTeam from './ParentTeam'; + +const ParentRoom = ({ room }: { room: IRoom }) => { + const parentRoomId = Boolean(room.prid || (room.teamId && !room.teamMain)); + + if (!parentRoomId) { + return null; + } + + if (room.prid) { + return ; + } + + if (room.teamId && !room.teamMain) { + return ; + } +}; + +export default ParentRoom; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentRoomButton.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentRoomButton.tsx new file mode 100644 index 0000000000000..05ce1a34b38c8 --- /dev/null +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentRoomButton.tsx @@ -0,0 +1,14 @@ +import { IconButton, Skeleton } from '@rocket.chat/fuselage'; +import type { ComponentProps } from 'react'; + +type ParentRoomButtonProps = Omit, 'icon'> & { loading: boolean }; + +const ParentRoomButton = ({ loading, ...props }: ParentRoomButtonProps) => { + if (loading) { + return ; + } + + return ; +}; + +export default ParentRoomButton; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentTeam.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentTeam.tsx similarity index 66% rename from apps/meteor/client/views/room/HeaderV2/ParentTeam.tsx rename to apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentTeam.tsx index 475054c07a9b2..9c9460f0a4820 100644 --- a/apps/meteor/client/views/room/HeaderV2/ParentTeam.tsx +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/ParentTeam.tsx @@ -2,9 +2,10 @@ import type { IRoom } from '@rocket.chat/core-typings'; import { TEAM_TYPE } from '@rocket.chat/core-typings'; import { useUserId, useEndpoint } from '@rocket.chat/ui-contexts'; import { keepPreviousData, useQuery } from '@tanstack/react-query'; +import { useTranslation } from 'react-i18next'; -import { HeaderTag, HeaderTagIcon, HeaderTagSkeleton } from '../../../components/Header'; -import { goToRoomById } from '../../../lib/utils/goToRoomById'; +import ParentRoomButton from './ParentRoomButton'; +import { goToRoomById } from '../../../../lib/utils/goToRoomById'; type APIErrorResult = { success: boolean; error: string }; @@ -13,7 +14,9 @@ type ParentTeamProps = { }; const ParentTeam = ({ room }: ParentTeamProps) => { + const { t } = useTranslation(); const { teamId } = room; + const userId = useUserId(); if (!teamId) { @@ -43,8 +46,9 @@ const ParentTeam = ({ room }: ParentTeamProps) => { queryFn: async () => userTeamsListEndpoint({ userId }), }); - const userBelongsToTeam = userTeams?.teams?.find((team) => team._id === teamId) || false; - const isTeamPublic = teamInfoData?.teamInfo.type === TEAM_TYPE.PUBLIC; + const userBelongsToTeam = Boolean(userTeams?.teams?.find((team) => team._id === teamId)) || false; + const isPublicTeam = teamInfoData?.teamInfo.type === TEAM_TYPE.PUBLIC; + const shouldDisplayTeam = isPublicTeam || userBelongsToTeam; const redirectToMainRoom = (): void => { const rid = teamInfoData?.teamInfo.roomId; @@ -52,31 +56,19 @@ const ParentTeam = ({ room }: ParentTeamProps) => { return; } - if (!(isTeamPublic || userBelongsToTeam)) { - return; - } - goToRoomById(rid); }; - if (teamInfoLoading || userTeamsLoading) { - return ; - } - - if (teamInfoError) { + if (teamInfoError || !shouldDisplayTeam) { return null; } return ( - (e.code === 'Space' || e.code === 'Enter') && redirectToMainRoom()} + - - {teamInfoData?.teamInfo.name} - + title={t('Back_to__roomName__team', { roomName: teamInfoData?.teamInfo.name })} + /> ); }; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoom/index.ts b/apps/meteor/client/views/room/HeaderV2/ParentRoom/index.ts new file mode 100644 index 0000000000000..31d381a035f27 --- /dev/null +++ b/apps/meteor/client/views/room/HeaderV2/ParentRoom/index.ts @@ -0,0 +1 @@ +export { default } from './ParentRoom'; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoomWithData.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoomWithData.tsx deleted file mode 100644 index 903994533b50a..0000000000000 --- a/apps/meteor/client/views/room/HeaderV2/ParentRoomWithData.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import type { IRoom } from '@rocket.chat/core-typings'; -import { useUserSubscription } from '@rocket.chat/ui-contexts'; - -import ParentRoom from './ParentRoom'; -import ParentRoomWithEndpointData from './ParentRoomWithEndpointData'; - -type ParentRoomWithDataProps = { - room: IRoom; -}; - -const ParentRoomWithData = ({ room }: ParentRoomWithDataProps) => { - const { prid } = room; - - if (!prid) { - throw new Error('Parent room ID is missing'); - } - - const subscription = useUserSubscription(prid); - - if (subscription) { - return ; - } - - return ; -}; - -export default ParentRoomWithData; diff --git a/apps/meteor/client/views/room/HeaderV2/ParentRoomWithEndpointData.tsx b/apps/meteor/client/views/room/HeaderV2/ParentRoomWithEndpointData.tsx deleted file mode 100644 index 0f8cb89bc4b78..0000000000000 --- a/apps/meteor/client/views/room/HeaderV2/ParentRoomWithEndpointData.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import type { IRoom } from '@rocket.chat/core-typings'; - -import ParentRoom from './ParentRoom'; -import { HeaderTagSkeleton } from '../../../components/Header'; -import { useRoomInfoEndpoint } from '../../../hooks/useRoomInfoEndpoint'; - -type ParentRoomWithEndpointDataProps = { - rid: IRoom['_id']; -}; - -const ParentRoomWithEndpointData = ({ rid }: ParentRoomWithEndpointDataProps) => { - const { data, isPending, isError } = useRoomInfoEndpoint(rid); - - if (isPending) { - return ; - } - - if (isError || !data?.room) { - return null; - } - - return ; -}; - -export default ParentRoomWithEndpointData; diff --git a/apps/meteor/client/views/room/HeaderV2/RoomHeader.tsx b/apps/meteor/client/views/room/HeaderV2/RoomHeader.tsx index 6e138fca2a9c7..4f3100668afed 100644 --- a/apps/meteor/client/views/room/HeaderV2/RoomHeader.tsx +++ b/apps/meteor/client/views/room/HeaderV2/RoomHeader.tsx @@ -5,8 +5,7 @@ import { Suspense } from 'react'; import { useTranslation } from 'react-i18next'; import FederatedRoomOriginServer from './FederatedRoomOriginServer'; -import ParentRoomWithData from './ParentRoomWithData'; -import ParentTeam from './ParentTeam'; +import ParentRoom from './ParentRoom'; import RoomTitle from './RoomTitle'; import RoomToolbox from './RoomToolbox'; import RoomTopic from './RoomTopic'; @@ -38,13 +37,12 @@ const RoomHeader = ({ room, slots = {}, roomToolbox }: RoomHeaderProps) => { return (
{slots?.start} + {slots?.preContent} - {room.prid && } - {room.teamId && !room.teamMain && } {isRoomFederated(room) && } diff --git a/apps/meteor/tests/e2e/channel-management.spec.ts b/apps/meteor/tests/e2e/channel-management.spec.ts index f8ff93723c69f..a15320c25aff4 100644 --- a/apps/meteor/tests/e2e/channel-management.spec.ts +++ b/apps/meteor/tests/e2e/channel-management.spec.ts @@ -134,7 +134,7 @@ test.describe.serial('channel-management', () => { targetChannel = hugeName; await page.setViewportSize({ width: 640, height: 460 }); - await expect(page.getByRole('heading', { name: hugeName })).toHaveCSS('width', '411px'); + await expect(page.getByRole('heading', { name: hugeName })).toHaveCSS('width', '407px'); }); test('should open sidebar clicking on sidebar toggler', async ({ page }) => { diff --git a/apps/meteor/tests/e2e/feature-preview.spec.ts b/apps/meteor/tests/e2e/feature-preview.spec.ts index 55f51ea62b170..2b3cc13b5a100 100644 --- a/apps/meteor/tests/e2e/feature-preview.spec.ts +++ b/apps/meteor/tests/e2e/feature-preview.spec.ts @@ -1,8 +1,18 @@ import { faker } from '@faker-js/faker'; +import type { Page } from '@playwright/test'; import { Users } from './fixtures/userStates'; import { AccountProfile, HomeChannel } from './page-objects'; -import { createTargetChannel, createTargetTeam, deleteChannel, deleteTeam, setSettingValueById } from './utils'; +import { + createTargetChannel, + createTargetTeam, + deleteChannel, + deleteTeam, + setSettingValueById, + createTargetDiscussion, + createChannelWithTeam, + deleteRoom, +} from './utils'; import { setUserPreferences } from './utils/setUserPreferences'; import { test, expect } from './utils/test'; @@ -12,17 +22,20 @@ test.describe.serial('feature preview', () => { let poHomeChannel: HomeChannel; let poAccountProfile: AccountProfile; let targetChannel: string; + let targetDiscussion: Record; let sidepanelTeam: string; const targetChannelNameInTeam = `channel-from-team-${faker.number.int()}`; test.beforeAll(async ({ api }) => { await setSettingValueById(api, 'Accounts_AllowFeaturePreview', true); targetChannel = await createTargetChannel(api, { members: ['user1'] }); + targetDiscussion = await createTargetDiscussion(api); }); test.afterAll(async ({ api }) => { await setSettingValueById(api, 'Accounts_AllowFeaturePreview', false); await deleteChannel(api, targetChannel); + await deleteRoom(api, targetDiscussion._id); }); test.beforeEach(async ({ page }) => { @@ -172,11 +185,56 @@ test.describe.serial('feature preview', () => { await expect(page.locator('role=navigation[name="header"]')).not.toBeVisible(); }); - test('should not display avatar in room header', async ({ page }) => { + test('should display the room header properly', async ({ page }) => { await page.goto('/home'); + await poHomeChannel.sidebar.openChat(targetDiscussion.fname); - await poHomeChannel.sidebar.openChat(targetChannel); - await expect(page.locator('main').locator('header').getByRole('figure')).not.toBeVisible(); + await test.step('should not display avatar in room header', async () => { + await expect(page.locator('main').locator('header').getByRole('figure')).not.toBeVisible(); + }); + + await test.step('should display the back button in the room header when accessing a room with parent', async () => { + await expect( + page + .locator('main') + .locator('header') + .getByRole('button', { name: /Back to/ }), + ).toBeVisible(); + }); + }); + + test.describe('user is not part of the team', () => { + let targetTeam: string; + let targetChannelWithTeam: string; + let user1Page: Page; + + test.beforeAll(async ({ api, browser }) => { + await setSettingValueById(api, 'Accounts_Default_User_Preferences_featuresPreview', [{ name: 'newNavigation', value: true }]); + + const { channelName, teamName } = await createChannelWithTeam(api); + targetTeam = teamName; + targetChannelWithTeam = channelName; + user1Page = await browser.newPage({ storageState: Users.user1.state }); + }); + + test.afterAll(async ({ api }) => { + await setSettingValueById(api, 'Accounts_Default_User_Preferences_featuresPreview', []); + + await deleteChannel(api, targetChannelWithTeam); + await deleteTeam(api, targetTeam); + await user1Page.close(); + }); + + test('should not display back to team button in the room header', async ({ page }) => { + await user1Page.goto(`/channel/${targetChannelWithTeam}`); + + await expect( + page + .locator('main') + .locator('header') + .getByRole('button', { name: /Back to/ }), + ).not.toBeVisible(); + }); }); }); diff --git a/apps/meteor/tests/e2e/search-discussion.spec.ts b/apps/meteor/tests/e2e/search-discussion.spec.ts index 0d645432d777e..a2ec674805296 100644 --- a/apps/meteor/tests/e2e/search-discussion.spec.ts +++ b/apps/meteor/tests/e2e/search-discussion.spec.ts @@ -2,7 +2,7 @@ import type { Page } from '@playwright/test'; import { Users } from './fixtures/userStates'; import { HomeChannel } from './page-objects'; -import { createTargetDiscussion } from './utils'; +import { createTargetDiscussion, deleteRoom } from './utils'; import { getSettingValueById } from './utils/getSettingValueById'; import { setSettingValueById } from './utils/setSettingValueById'; import { test, expect } from './utils/test'; @@ -12,26 +12,27 @@ test.use({ storageState: Users.user1.state }); test.describe.serial('search-discussion', () => { let settingDefaultValue: unknown; let poHomeChannel: HomeChannel; - let discussionName: string; + let discussion: Record; test.beforeAll(async ({ api }) => { settingDefaultValue = await getSettingValueById(api, 'UI_Allow_room_names_with_special_chars'); }); test.beforeEach(async ({ page, api }) => { - discussionName = await createTargetDiscussion(api); + discussion = await createTargetDiscussion(api); poHomeChannel = new HomeChannel(page); await page.goto('/home'); }); test.afterAll(async ({ api }) => { await setSettingValueById(api, 'UI_Allow_room_names_with_special_chars', settingDefaultValue); + await deleteRoom(api, discussion._id); }); const testDiscussionSearch = async (page: Page) => { await poHomeChannel.sidenav.openSearch(); - await poHomeChannel.sidenav.inputSearch.type(discussionName); - const targetSearchItem = page.locator('role=listbox').getByText(discussionName).first(); + await poHomeChannel.sidenav.inputSearch.fill(discussion.fname); + const targetSearchItem = page.locator('role=listbox').getByText(discussion.fname).first(); await expect(targetSearchItem).toBeVisible(); }; diff --git a/apps/meteor/tests/e2e/utils/create-target-channel.ts b/apps/meteor/tests/e2e/utils/create-target-channel.ts index 1bccd514fb5bd..402d45a2731ba 100644 --- a/apps/meteor/tests/e2e/utils/create-target-channel.ts +++ b/apps/meteor/tests/e2e/utils/create-target-channel.ts @@ -45,6 +45,10 @@ export async function deleteChannel(api: BaseTest['api'], roomName: string): Pro await api.post('/channels.delete', { roomName }); } +export async function deleteRoom(api: BaseTest['api'], roomId: string): Promise { + await api.post('/rooms.delete', { roomId }); +} + export async function createTargetPrivateChannel(api: BaseTest['api'], options?: Omit): Promise { const name = faker.string.uuid(); await api.post('/groups.create', { name, ...options }); @@ -72,13 +76,30 @@ export async function createDirectMessage(api: BaseTest['api']): Promise { }); } -export async function createTargetDiscussion(api: BaseTest['api']): Promise { +export async function createTargetDiscussion(api: BaseTest['api']): Promise> { const channelName = faker.string.uuid(); const discussionName = faker.string.uuid(); - const response = await api.post('/channels.create', { name: channelName }); - const { channel } = await response.json(); - await api.post('/rooms.createDiscussion', { t_name: discussionName, prid: channel._id }); + const channelResponse = await api.post('/channels.create', { name: channelName }); + const { channel } = await channelResponse.json(); + const discussionResponse = await api.post('/rooms.createDiscussion', { t_name: discussionName, prid: channel._id }); + const { discussion } = await discussionResponse.json(); + + if (!discussion) { + throw new Error('Discussion not created'); + } + + return discussion; +} + +export async function createChannelWithTeam(api: BaseTest['api']): Promise> { + const channelName = faker.string.uuid(); + const teamName = faker.string.uuid(); + + const teamResponse = await api.post('/teams.create', { name: teamName, type: 1, members: ['user2'] }); + const { team } = await teamResponse.json(); + + await api.post('/channels.create', { name: channelName, members: ['user1'], extraData: { teamId: team._id } }); - return discussionName; + return { channelName, teamName }; } diff --git a/packages/i18n/src/locales/ar.i18n.json b/packages/i18n/src/locales/ar.i18n.json index 87085e65a121c..a2cbd69e5fccb 100644 --- a/packages/i18n/src/locales/ar.i18n.json +++ b/packages/i18n/src/locales/ar.i18n.json @@ -599,7 +599,6 @@ "Back_to_integrations": "عودة إلى عمليات التكامل", "Back_to_login": "عودة إلى تسجيل الدخول", "Back_to_permissions": "عودة إلى الأذونات", - "Back_to_room": "عودة إلى Room", "Back_to_threads": "عودة إلى المواضيع", "Backup_codes": "أكواد التخزين الاحتياطي", "Belongs_To": "ينتمي إلى", diff --git a/packages/i18n/src/locales/ca.i18n.json b/packages/i18n/src/locales/ca.i18n.json index 09b5280aedc8c..d124edade00fe 100644 --- a/packages/i18n/src/locales/ca.i18n.json +++ b/packages/i18n/src/locales/ca.i18n.json @@ -596,7 +596,6 @@ "Back_to_integrations": "Torna a les integracions", "Back_to_login": "Torna a identificar-me", "Back_to_permissions": "Torna a permisos", - "Back_to_room": "Tornar a Room", "Back_to_threads": "Torna als fils", "Backup_codes": "Codis de recuperació", "Belongs_To": "Pertany a", diff --git a/packages/i18n/src/locales/cs.i18n.json b/packages/i18n/src/locales/cs.i18n.json index 6fb4e275806c9..3b25312eb52e6 100644 --- a/packages/i18n/src/locales/cs.i18n.json +++ b/packages/i18n/src/locales/cs.i18n.json @@ -501,7 +501,6 @@ "Back_to_integrations": "Zpět k integracím", "Back_to_login": "Zpět na přihlašovací formulář", "Back_to_permissions": "Zpět na práva", - "Back_to_room": "Zpět do místnosti", "Backup_codes": "Záložní kódy", "Best_first_response_time": "Nejlepší doba první reakce", "Beta_feature_Depends_on_Video_Conference_to_be_enabled": "Beta funkcionalita. Videohovory musí být povoleny.", diff --git a/packages/i18n/src/locales/da.i18n.json b/packages/i18n/src/locales/da.i18n.json index 48ef392565dea..aa8a1e97586e3 100644 --- a/packages/i18n/src/locales/da.i18n.json +++ b/packages/i18n/src/locales/da.i18n.json @@ -648,7 +648,6 @@ "Back_to_imports": "Tilbage til import", "Cancel": "Annullér", "Cancel_message_input": "Annullér", - "Back_to_room": "Tilbage til rum", "Canceled": "Annulleret", "Cannot_invite_users_to_direct_rooms": "Kan ikke invitere brugere til at direkte rum", "Cannot_open_conversation_with_yourself": "Kan ikke oprette direkte besked med dig selv", diff --git a/packages/i18n/src/locales/de.i18n.json b/packages/i18n/src/locales/de.i18n.json index 73dedb00609ae..0508b1b86ae49 100644 --- a/packages/i18n/src/locales/de.i18n.json +++ b/packages/i18n/src/locales/de.i18n.json @@ -747,7 +747,6 @@ "Back_to_imports": "Zurück zu den Importen", "Cancel": "Abbrechen", "Cancel_message_input": "Abbrechen", - "Back_to_room": "Zurück zu Room", "Canceled": "Abgebrochen", "Back_to_threads": "Zurück zu den Threads", "BBB_End_Meeting": "Meeting beenden", diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index 5996179d73368..1a7ecd479baeb 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -766,6 +766,8 @@ "Back_to_integrations": "Back to integrations", "Back_to_login": "Back to login", "Back_to_Manage_Apps": "Back to Manage Apps", + "Back_to__roomName__channel": "Back to {{roomName}} channel", + "Back_to__roomName__team": "Back to {{roomName}} team", "Back_to_permissions": "Back to permissions", "are_playing": "are playing", "is_playing": "is playing", @@ -860,7 +862,6 @@ "Back_to_imports": "Back to imports", "Cancel": "Cancel", "Cancel_message_input": "Cancel", - "Back_to_room": "Back to Room", "Canceled": "Canceled", "Back_to_threads": "Back to threads", "BBB_End_Meeting": "End Meeting", diff --git a/packages/i18n/src/locales/es.i18n.json b/packages/i18n/src/locales/es.i18n.json index 97d0deb19c614..8871569d02be1 100644 --- a/packages/i18n/src/locales/es.i18n.json +++ b/packages/i18n/src/locales/es.i18n.json @@ -604,7 +604,6 @@ "Back_to_integrations": "Volver a las integraciones", "Back_to_login": "Volver al inicio de sesión", "Back_to_permissions": "Volver a los permisos", - "Back_to_room": "Volver a Room", "Back_to_threads": "Volver a los hilos", "Backup_codes": "Códigos de respaldo", "Belongs_To": "Pertenece a", diff --git a/packages/i18n/src/locales/fa.i18n.json b/packages/i18n/src/locales/fa.i18n.json index 31043533336f6..108bd40bac232 100644 --- a/packages/i18n/src/locales/fa.i18n.json +++ b/packages/i18n/src/locales/fa.i18n.json @@ -442,7 +442,6 @@ "Back_to_integrations": "بازگشت به یکپارچگی ها", "Back_to_login": "بازگشت به صفحه ورود", "Back_to_permissions": "بازگشت به مجوزها", - "Back_to_room": "بازگشت به اتاق", "Backup_codes": "کد پشتیبان", "Best_first_response_time": "بهترین زمان پاسخ اول", "Beta_feature_Depends_on_Video_Conference_to_be_enabled": "ویژگی بتا وابسته به کنفرانس ویدیویی فعال می شود", diff --git a/packages/i18n/src/locales/fi.i18n.json b/packages/i18n/src/locales/fi.i18n.json index f894c89d6ce7d..9131ab922c6aa 100644 --- a/packages/i18n/src/locales/fi.i18n.json +++ b/packages/i18n/src/locales/fi.i18n.json @@ -759,7 +759,6 @@ "Back_to_imports": "Takaisin tuotuihin", "Cancel": "Peruuta", "Cancel_message_input": "Peruuta", - "Back_to_room": "Takaisin huoneeseen", "Canceled": "Peruutettu", "Back_to_threads": "Takaisin viestiketjuihin", "BBB_End_Meeting": "Lopeta kokous", diff --git a/packages/i18n/src/locales/fr.i18n.json b/packages/i18n/src/locales/fr.i18n.json index b65fe8a7f51ce..c766001d6f275 100644 --- a/packages/i18n/src/locales/fr.i18n.json +++ b/packages/i18n/src/locales/fr.i18n.json @@ -598,7 +598,6 @@ "Back_to_integrations": "Retour aux intégrations", "Back_to_login": "Retour à l'écran de connexion", "Back_to_permissions": "Retour aux autorisations", - "Back_to_room": "Retour au salon", "Back_to_threads": "Retour aux fils", "Backup_codes": "Codes de sauvegarde", "Be_the_first_to_join": "Soyez le premier à rejoindre", diff --git a/packages/i18n/src/locales/hi-IN.i18n.json b/packages/i18n/src/locales/hi-IN.i18n.json index 9e54a7ed8bfbc..e598395d668da 100644 --- a/packages/i18n/src/locales/hi-IN.i18n.json +++ b/packages/i18n/src/locales/hi-IN.i18n.json @@ -785,7 +785,6 @@ "Back_to_imports": "आयात पर वापस जाएँ", "Cancel": "रद्द करना", "Cancel_message_input": "रद्द करना", - "Back_to_room": "कक्ष में वापस", "Canceled": "रद्द", "Back_to_threads": "धागों पर वापस जाएँ", "BBB_End_Meeting": "बैठक समाप्त", diff --git a/packages/i18n/src/locales/hu.i18n.json b/packages/i18n/src/locales/hu.i18n.json index 565c86795297a..79979192797ca 100644 --- a/packages/i18n/src/locales/hu.i18n.json +++ b/packages/i18n/src/locales/hu.i18n.json @@ -730,7 +730,6 @@ "Back_to_imports": "Vissza az importálásokhoz", "Cancel": "Mégse", "Cancel_message_input": "Mégse", - "Back_to_room": "Vissza a szobához", "Canceled": "Megszakítva", "Back_to_threads": "Vissza a szálakhoz", "BBB_End_Meeting": "Értekezlet befejezése", diff --git a/packages/i18n/src/locales/ja.i18n.json b/packages/i18n/src/locales/ja.i18n.json index d43aff049dfc4..32b2aacab0c04 100644 --- a/packages/i18n/src/locales/ja.i18n.json +++ b/packages/i18n/src/locales/ja.i18n.json @@ -668,7 +668,6 @@ "Back_to_imports": "インポートに戻る", "Cancel": "キャンセル", "Cancel_message_input": "キャンセル", - "Back_to_room": "Roomに戻る", "Canceled": "キャンセルしました", "Back_to_threads": "スレッドに戻る", "BBB_End_Meeting": "ミーティングの終了", diff --git a/packages/i18n/src/locales/ka-GE.i18n.json b/packages/i18n/src/locales/ka-GE.i18n.json index 0168d948a9c7a..cba7e67a66301 100644 --- a/packages/i18n/src/locales/ka-GE.i18n.json +++ b/packages/i18n/src/locales/ka-GE.i18n.json @@ -541,7 +541,6 @@ "Back_to_imports": "იმპორტში დაბრუნება", "Cancel": "გაუქმება", "Cancel_message_input": "გაუქმება", - "Back_to_room": "დაბრუნება Room -ში", "Canceled": "გაუქმდა", "Cannot_invite_users_to_direct_rooms": "მომხმარებლების პირდაპირ ოთახში მოწვევა შეუძლებელია", "Cannot_open_conversation_with_yourself": "თქვენ ვერ შეძლებთ პირდაპირ მესიჯის გაგზავნას საკუთარ თავთან", diff --git a/packages/i18n/src/locales/km.i18n.json b/packages/i18n/src/locales/km.i18n.json index fb697b3f6b14e..5c0b6fe60c8a4 100644 --- a/packages/i18n/src/locales/km.i18n.json +++ b/packages/i18n/src/locales/km.i18n.json @@ -513,7 +513,6 @@ "Avg_of_waiting_time": "ជាមធ្យមនៃការរង់ចាំពេលវេលា", "Cancel": "បញ្ឈប់", "Cancel_message_input": "បញ្ឈប់", - "Back_to_room": "ត្រលប់ទៅ Room។", "Canceled": "បានបោះបង់", "Cannot_invite_users_to_direct_rooms": "មិនអាចអញ្ជើញអ្នកប្រើប្រាស់ដើម្បីដឹកនាំបន្ទប់", "Cannot_open_conversation_with_yourself": "មិនអាចបញ្ជូនសារផ្ទាល់ជាមួយខ្លួនអ្នកបានទេ", diff --git a/packages/i18n/src/locales/ko.i18n.json b/packages/i18n/src/locales/ko.i18n.json index b85356990e4f9..c450217d5d7c3 100644 --- a/packages/i18n/src/locales/ko.i18n.json +++ b/packages/i18n/src/locales/ko.i18n.json @@ -542,7 +542,6 @@ "Back_to_integrations": "Integrations 로 돌아가기", "Back_to_login": "로그인으로 돌아가기", "Back_to_permissions": "권한 으로 돌아가기", - "Back_to_room": "Room으로 돌아가기", "Backup_codes": "백업 코드", "Best_first_response_time": "최상의 첫번째 응답 시간", "Beta_feature_Depends_on_Video_Conference_to_be_enabled": "베타 기능입니다. 화상 회의 설정을 따릅니다.", diff --git a/packages/i18n/src/locales/lt.i18n.json b/packages/i18n/src/locales/lt.i18n.json index fc5ae02a45f46..bb14b50807d27 100644 --- a/packages/i18n/src/locales/lt.i18n.json +++ b/packages/i18n/src/locales/lt.i18n.json @@ -457,7 +457,6 @@ "Back_to_imports": "Atgal į importus", "Cancel": "Atšaukti", "Cancel_message_input": "Atšaukti", - "Back_to_room": "Atgal į Room", "Back_to_threads": "Atgal į temas", "Cannot_invite_users_to_direct_rooms": "Negalima pakviesti naudotojų nukreipti kambarius", "Cannot_open_conversation_with_yourself": "Negalima tiesioginio pranešimo su savimi", diff --git a/packages/i18n/src/locales/nb.i18n.json b/packages/i18n/src/locales/nb.i18n.json index faf3c144cd7f0..6c425ba6327c9 100644 --- a/packages/i18n/src/locales/nb.i18n.json +++ b/packages/i18n/src/locales/nb.i18n.json @@ -859,7 +859,6 @@ "Back_to_imports": "Tilbake til import", "Cancel": "Avbryt", "Cancel_message_input": "Avbryt", - "Back_to_room": "Tilbake til rommet", "Canceled": "Avbrutt", "Back_to_threads": "Tilbake til tråder", "BBB_End_Meeting": "Avslutt møte", diff --git a/packages/i18n/src/locales/nl.i18n.json b/packages/i18n/src/locales/nl.i18n.json index 0ec8f860f5897..d357b71c6c176 100644 --- a/packages/i18n/src/locales/nl.i18n.json +++ b/packages/i18n/src/locales/nl.i18n.json @@ -672,7 +672,6 @@ "Back_to_imports": "Terug naar imports", "Cancel": "Annuleren", "Cancel_message_input": "Annuleren", - "Back_to_room": "Terug naar kamer", "Canceled": "Geannuleerd", "Back_to_threads": "Terug naar discussies", "BBB_End_Meeting": "Vergadering beëindigen", diff --git a/packages/i18n/src/locales/nn.i18n.json b/packages/i18n/src/locales/nn.i18n.json index 7df183ba1af03..1e73ad4e738d2 100644 --- a/packages/i18n/src/locales/nn.i18n.json +++ b/packages/i18n/src/locales/nn.i18n.json @@ -859,7 +859,6 @@ "Back_to_imports": "Tilbake til import", "Cancel": "Avbryt", "Cancel_message_input": "Avbryt", - "Back_to_room": "Tilbake til Room", "Canceled": "Avbrutt", "Back_to_threads": "Tilbake til tråder", "BBB_End_Meeting": "Avslutt møte", diff --git a/packages/i18n/src/locales/pl.i18n.json b/packages/i18n/src/locales/pl.i18n.json index 4ab76d056fadc..892961b05ce78 100644 --- a/packages/i18n/src/locales/pl.i18n.json +++ b/packages/i18n/src/locales/pl.i18n.json @@ -648,7 +648,6 @@ "Back_to_integrations": "Wróć do integracji", "Back_to_login": "Wróć do strony logowania", "Back_to_permissions": "Wróć do uprawnień", - "Back_to_room": "Wróć do pokoju Room", "Back_to_threads": "Wróć do wątków", "Backup_codes": "Kody zapasowe", "Be_the_first_to_join": "Bądź pierwszym, który dołączy", diff --git a/packages/i18n/src/locales/pt-BR.i18n.json b/packages/i18n/src/locales/pt-BR.i18n.json index e22554721adfd..fed94c6851d0f 100644 --- a/packages/i18n/src/locales/pt-BR.i18n.json +++ b/packages/i18n/src/locales/pt-BR.i18n.json @@ -631,7 +631,6 @@ "Back_to_integrations": "Voltar para integrações", "Back_to_login": "Voltar para o login", "Back_to_permissions": "Voltar para permissões", - "Back_to_room": "Voltar para Sala", "Back_to_threads": "Voltar para tópicos", "Backup_codes": "Códigos de backup", "Belongs_To": "Pertence a", diff --git a/packages/i18n/src/locales/pt.i18n.json b/packages/i18n/src/locales/pt.i18n.json index 567fcffa92e3b..f3df42816fd07 100644 --- a/packages/i18n/src/locales/pt.i18n.json +++ b/packages/i18n/src/locales/pt.i18n.json @@ -502,7 +502,6 @@ "call-management": "Gestão de Chamadas", "Cancel": "Cancelar", "Cancel_message_input": "Cancelar", - "Back_to_room": "Regressar ao canal", "Canceled": "Cancelado", "Cannot_invite_users_to_direct_rooms": "Não é possível convidar pessoas para salas diretas", "Cannot_open_conversation_with_yourself": "Não é possível fazer uma mensagem directa com a mesma origem", diff --git a/packages/i18n/src/locales/ru.i18n.json b/packages/i18n/src/locales/ru.i18n.json index 5ca0dff552226..b7a672c116961 100644 --- a/packages/i18n/src/locales/ru.i18n.json +++ b/packages/i18n/src/locales/ru.i18n.json @@ -656,7 +656,6 @@ "Back_to_integrations": "Назад", "Back_to_login": "На страницу авторизации", "Back_to_permissions": "Назад к настройкам прав", - "Back_to_room": "Вернуться в Room", "Back_to_threads": "Назад к тредам", "Backup_codes": "Коды резервного копирования", "Be_the_first_to_join": "Будьте первым, кто присоединится", diff --git a/packages/i18n/src/locales/sv.i18n.json b/packages/i18n/src/locales/sv.i18n.json index 343ce66c002e7..6af66935cf7c9 100644 --- a/packages/i18n/src/locales/sv.i18n.json +++ b/packages/i18n/src/locales/sv.i18n.json @@ -759,7 +759,6 @@ "Back_to_imports": "Tillbaka till importer", "Cancel": "Avbryt", "Cancel_message_input": "Avbryt", - "Back_to_room": "Tillbaka till Room", "Canceled": "Avbröt", "Back_to_threads": "Tillbaka till trådar", "BBB_End_Meeting": "Avsluta mötet", diff --git a/packages/i18n/src/locales/tr.i18n.json b/packages/i18n/src/locales/tr.i18n.json index 09deddb99da6a..f9b10baae432a 100644 --- a/packages/i18n/src/locales/tr.i18n.json +++ b/packages/i18n/src/locales/tr.i18n.json @@ -490,7 +490,6 @@ "call-management": "Arama Yönetimi", "Cancel": "İptal et", "Cancel_message_input": "İptal et", - "Back_to_room": "Odaya geri dön", "Canceled": "İptal edildi", "Cannot_invite_users_to_direct_rooms": "Odalar doğrudan kullanıcıları davet edemezsiniz", "Cannot_open_conversation_with_yourself": "Kendinize doğrudan ileti gönderemezsiniz", diff --git a/packages/i18n/src/locales/uk.i18n.json b/packages/i18n/src/locales/uk.i18n.json index 13ee35b59623f..a028e9a464c06 100644 --- a/packages/i18n/src/locales/uk.i18n.json +++ b/packages/i18n/src/locales/uk.i18n.json @@ -474,7 +474,6 @@ "Back_to_integrations": "Повернутися до інтеграцій", "Back_to_login": "Повернутися до сторінки входу", "Back_to_permissions": "Повернутися до дозволів", - "Back_to_room": "Повернутися до кімнати", "Backup_codes": "Коди резервного копіювання", "Best_first_response_time": "Кращий час першої відповіді", "Beta_feature_Depends_on_Video_Conference_to_be_enabled": "Бета-функція. Залежить від включення відеоконференції.", diff --git a/packages/i18n/src/locales/zh-TW.i18n.json b/packages/i18n/src/locales/zh-TW.i18n.json index 0c6715e09a320..49dea764283fb 100644 --- a/packages/i18n/src/locales/zh-TW.i18n.json +++ b/packages/i18n/src/locales/zh-TW.i18n.json @@ -667,7 +667,6 @@ "Back_to_imports": "回到匯入", "Cancel": "取消", "Cancel_message_input": "取消", - "Back_to_room": "返回 Room", "Canceled": "已取消", "Back_to_threads": "返回主題", "BBB_End_Meeting": "結束會議", diff --git a/packages/i18n/src/locales/zh.i18n.json b/packages/i18n/src/locales/zh.i18n.json index ebffcf0228b7d..336ced25244a9 100644 --- a/packages/i18n/src/locales/zh.i18n.json +++ b/packages/i18n/src/locales/zh.i18n.json @@ -611,7 +611,6 @@ "Back_to_imports": "返回导入", "Cancel": "取消", "Cancel_message_input": "取消", - "Back_to_room": "回到房间", "Canceled": "已取消", "Cannot_invite_users_to_direct_rooms": "不能邀请用户加入私聊", "Cannot_open_conversation_with_yourself": "不能和你自己私聊", diff --git a/packages/ui-client/src/components/Header/HeaderState.tsx b/packages/ui-client/src/components/Header/HeaderState.tsx index 5d64f380279c3..3a21eb949550e 100644 --- a/packages/ui-client/src/components/Header/HeaderState.tsx +++ b/packages/ui-client/src/components/Header/HeaderState.tsx @@ -12,6 +12,6 @@ type HeaderStateProps = }); const HeaderState: FC = (props) => - props.onClick ? : ; + props.onClick ? : ; export default HeaderState; diff --git a/packages/ui-client/src/components/HeaderV2/HeaderState.tsx b/packages/ui-client/src/components/HeaderV2/HeaderState.tsx index 360f3f67715e8..7c7f64fe86cbb 100644 --- a/packages/ui-client/src/components/HeaderV2/HeaderState.tsx +++ b/packages/ui-client/src/components/HeaderV2/HeaderState.tsx @@ -12,6 +12,6 @@ type HeaderStateProps = }); const HeaderState = (props: HeaderStateProps) => - props.onClick ? : ; + props.onClick ? : ; export default HeaderState;