From eab7290bbee8c7626fe0e087f51f23964f2d1569 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 20 Oct 2023 11:36:58 +0700 Subject: [PATCH 01/10] add new blocking view for new room page --- src/languages/en.ts | 2 + src/languages/es.ts | 2 + src/libs/Permissions.ts | 1 + src/pages/workspace/WorkspaceNewRoomPage.js | 156 +++++++++++--------- 4 files changed, 95 insertions(+), 66 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 11637846130a..f352e4aa3d08 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1422,6 +1422,8 @@ export default { companyCards: 'Company credit cards', reimbursements: 'Easy reimbursements', }, + notFound: 'No workspace found', + description: 'Rooms are a great place to discuss and work with multiple people. To message a room, create or join a workspace' }, new: { newWorkspace: 'New workspace', diff --git a/src/languages/es.ts b/src/languages/es.ts index e4a5c37241f2..14b99ce92b76 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1443,6 +1443,8 @@ export default { companyCards: 'Tarjetas de crédito corporativas', reimbursements: 'Reembolsos fáciles', }, + notFound: 'No se encontró ningún espacio de trabajo', + description: 'Las salas son un gran lugar para discutir y trabajar con varias personas. Para enviar mensajes a una sala, crear o unirse a un espacio de trabajo' }, new: { newWorkspace: 'Nuevo espacio de trabajo', diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 13489c396c3c..fe06ebb77e0c 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -2,6 +2,7 @@ import CONST from '../CONST'; import Beta from '../types/onyx/Beta'; function canUseAllBetas(betas: Beta[]): boolean { + return true; return betas?.includes(CONST.BETAS.ALL); } diff --git a/src/pages/workspace/WorkspaceNewRoomPage.js b/src/pages/workspace/WorkspaceNewRoomPage.js index da0bf845cc81..54ad2babb187 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.js +++ b/src/pages/workspace/WorkspaceNewRoomPage.js @@ -27,6 +27,11 @@ import compose from '../../libs/compose'; import variables from '../../styles/variables'; import useDelayedInputFocus from '../../hooks/useDelayedInputFocus'; import ValuePicker from '../../components/ValuePicker'; +import BlockingView from '../../components/BlockingViews/BlockingView'; +import * as Illustrations from '../../components/Icon/Illustrations'; +import Button from '../../components/Button'; +import Navigation from '../../libs/Navigation/Navigation'; +import ROUTES from '../../ROUTES'; const propTypes = { /** All reports shared with the user */ @@ -162,7 +167,7 @@ function WorkspaceNewRoomPage(props) { return ( App.createWorkspaceAndNavigateToIt('', false, '', false, false)} @@ -175,75 +180,94 @@ function WorkspaceNewRoomPage(props) { testID={WorkspaceNewRoomPage.displayName} > {({insets}) => ( - -
- - (roomNameInputRef.current = el)} - inputID="roomName" - isFocused={props.isFocused} - shouldDelayFocus - autoFocus - /> - - - - - - - - {isPolicyAdmin && ( - + + + (roomNameInputRef.current = el)} + inputID="roomName" + isFocused={props.isFocused} + shouldDelayFocus + autoFocus + /> + + + + + + + + {isPolicyAdmin && ( + + + + )} + - )} - - - - {visibilityDescription} - -
+ {visibilityDescription} + + + ) : ( + <> + +