Skip to content

Commit b7a3deb

Browse files
authored
Merge pull request #45374 from dominictb/fix/45303-note-join
feat: add note to clarify the workspace join link functionality
2 parents 331309f + d5f54b7 commit b7a3deb

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

src/languages/en.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,14 @@ export default {
20592059
lineItemLevel: 'Line-item level',
20602060
reportLevel: 'Report level',
20612061
appliedOnExport: 'Not imported into Expensify, applied on export',
2062+
shareNote: {
2063+
header: 'Easily share your workspace with other members.',
2064+
content: {
2065+
firstPart:
2066+
'Share this QR code or copy the link below to make it easy for members to request access to your workspace. All requests to join the workspace will show up in the',
2067+
secondPart: 'room for your review.',
2068+
},
2069+
},
20622070
createNewConnection: 'Create new connection',
20632071
reuseExistingConnection: 'Reuse existing connection',
20642072
existingConnections: 'Existing connections',

src/languages/es.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,14 @@ export default {
20932093
lineItemLevel: 'Nivel de partida',
20942094
reportLevel: 'Nivel de informe',
20952095
appliedOnExport: 'No se importa en Expensify, se aplica en la exportación',
2096+
shareNote: {
2097+
header: 'Comparte fácilmente tu espacio de trabajo con otros miembros.',
2098+
content: {
2099+
firstPart:
2100+
'Comparte este código QR o copia el enlace de abajo para facilitar que los miembros soliciten acceso a tu espacio de trabajo. Todas las solicitudes para unirse al espacio de trabajo aparecerán en la sala',
2101+
secondPart: 'para tu revisión.',
2102+
},
2103+
},
20962104
createNewConnection: 'Crear una nueva conexión',
20972105
reuseExistingConnection: 'Reutilizar la conexión existente',
20982106
existingConnections: 'Conexiones existentes',

src/pages/workspace/WorkspaceProfileSharePage.tsx

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useRef} from 'react';
1+
import React, {useMemo, useRef} from 'react';
22
import {View} from 'react-native';
33
import type {ImageSourcePropType} from 'react-native';
44
import ContextMenuItem from '@components/ContextMenuItem';
@@ -9,6 +9,8 @@ import QRShare from '@components/QRShare';
99
import type {QRShareHandle} from '@components/QRShare/types';
1010
import ScreenWrapper from '@components/ScreenWrapper';
1111
import ScrollView from '@components/ScrollView';
12+
import Text from '@components/Text';
13+
import TextLink from '@components/TextLink';
1214
import useEnvironment from '@hooks/useEnvironment';
1315
import useLocalize from '@hooks/useLocalize';
1416
import useStyleUtils from '@hooks/useStyleUtils';
@@ -50,6 +52,13 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
5052
const logoBackgroundColor = !hasAvatar ? defaultWorkspaceAvatarColors.backgroundColor?.toString() : undefined;
5153
const svgLogoFillColor = !hasAvatar ? defaultWorkspaceAvatarColors.fill : undefined;
5254

55+
const adminRoom = useMemo(() => {
56+
if (!policy?.id) {
57+
return undefined;
58+
}
59+
return ReportUtils.getRoom(CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, policy?.id);
60+
}, [policy?.id]);
61+
5362
return (
5463
<AccessOrNotFoundWrapper
5564
policyID={policyID}
@@ -63,8 +72,29 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
6372
title={translate('common.share')}
6473
onBackButtonPress={Navigation.goBack}
6574
/>
66-
<ScrollView style={[themeStyles.flex1, themeStyles.pt2]}>
75+
<ScrollView style={[themeStyles.flex1, themeStyles.pt3]}>
6776
<View style={[themeStyles.flex1, isSmallScreenWidth ? themeStyles.workspaceSectionMobile : themeStyles.workspaceSection]}>
77+
<View style={[themeStyles.mh5]}>
78+
<Text style={[themeStyles.textHeadlineH1, themeStyles.mb2]}>{translate('workspace.common.shareNote.header')}</Text>
79+
</View>
80+
<View style={[themeStyles.mh5, themeStyles.mb9]}>
81+
<Text style={[themeStyles.textNormal]}>
82+
{translate('workspace.common.shareNote.content.firstPart')}{' '}
83+
<TextLink
84+
style={themeStyles.link}
85+
onPress={() => {
86+
if (!adminRoom?.reportID) {
87+
return;
88+
}
89+
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(adminRoom.reportID));
90+
}}
91+
>
92+
{CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS}
93+
</TextLink>{' '}
94+
{translate('workspace.common.shareNote.content.secondPart')}
95+
</Text>
96+
</View>
97+
6898
<View style={[themeStyles.workspaceSectionMobile, themeStyles.ph9]}>
6999
{/*
70100
Right now QR code download button is not shown anymore

0 commit comments

Comments
 (0)