Remove curly braces

This commit is contained in:
nico.benaz 2025-04-21 11:53:03 +02:00 committed by GitHub
parent cb3f0c7364
commit 72c4293bc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2235,152 +2235,151 @@ export const Group = ({
: '0px', : '0px',
}} }}
> >
{
<DesktopHeader <DesktopHeader
isPrivate={isPrivate} isPrivate={isPrivate}
selectedGroup={selectedGroup} selectedGroup={selectedGroup}
groupSection={groupSection} groupSection={groupSection}
isUnread={isUnread} isUnread={isUnread}
goToAnnouncements={goToAnnouncements} goToAnnouncements={goToAnnouncements}
isUnreadChat={isUnreadChat} isUnreadChat={isUnreadChat}
goToChat={goToChat} goToChat={goToChat}
goToThreads={goToThreads} goToThreads={goToThreads}
setOpenManageMembers={setOpenManageMembers} setOpenManageMembers={setOpenManageMembers}
groupChatHasUnread={groupChatHasUnread} groupChatHasUnread={groupChatHasUnread}
groupsAnnHasUnread={groupsAnnHasUnread} groupsAnnHasUnread={groupsAnnHasUnread}
directChatHasUnread={directChatHasUnread} directChatHasUnread={directChatHasUnread}
chatMode={chatMode} chatMode={chatMode}
openDrawerGroups={openDrawerGroups} openDrawerGroups={openDrawerGroups}
goToHome={goToHome} goToHome={goToHome}
setIsOpenDrawerProfile={setIsOpenDrawerProfile} setIsOpenDrawerProfile={setIsOpenDrawerProfile}
mobileViewMode={mobileViewMode} mobileViewMode={mobileViewMode}
setMobileViewMode={setMobileViewMode} setMobileViewMode={setMobileViewMode}
setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} setMobileViewModeKeepOpen={setMobileViewModeKeepOpen}
hasUnreadGroups={groupChatHasUnread || groupsAnnHasUnread} hasUnreadGroups={groupChatHasUnread || groupsAnnHasUnread}
hasUnreadDirects={directChatHasUnread} hasUnreadDirects={directChatHasUnread}
myName={userInfo?.name || null} myName={userInfo?.name || null}
isHome={groupSection === 'home'} isHome={groupSection === 'home'}
isGroups={desktopSideView === 'groups'} isGroups={desktopSideView === 'groups'}
isDirects={desktopSideView === 'directs'} isDirects={desktopSideView === 'directs'}
setDesktopSideView={setDesktopSideView} setDesktopSideView={setDesktopSideView}
hasUnreadAnnouncements={isUnread} hasUnreadAnnouncements={isUnread}
isAnnouncement={groupSection === 'announcement'} isAnnouncement={groupSection === 'announcement'}
isChat={groupSection === 'chat'} isChat={groupSection === 'chat'}
hasUnreadChat={isUnreadChat} hasUnreadChat={isUnreadChat}
setGroupSection={setGroupSection} setGroupSection={setGroupSection}
isForum={groupSection === 'forum'} isForum={groupSection === 'forum'}
/> />
}
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
flexGrow: 1, flexGrow: 1,
height: 'calc(100vh - 70px)', height: 'calc(100vh - 70px)',
position: 'relative', position: 'relative',
}} }}
> >
{triedToFetchSecretKey && ( {triedToFetchSecretKey && (
<ChatGroup <ChatGroup
myAddress={myAddress} myAddress={myAddress}
selectedGroup={selectedGroup?.groupId} selectedGroup={selectedGroup?.groupId}
getSecretKey={getSecretKey} getSecretKey={getSecretKey}
secretKey={secretKey} secretKey={secretKey}
isPrivate={isPrivate} isPrivate={isPrivate}
setSecretKey={setSecretKey} setSecretKey={setSecretKey}
handleNewEncryptionNotification={setNewEncryptionNotification} handleNewEncryptionNotification={setNewEncryptionNotification}
hide={groupSection !== 'chat' || selectedDirect || newChat} hide={groupSection !== 'chat' || selectedDirect || newChat}
hideView={!(desktopViewMode === 'chat' && selectedGroup)} hideView={!(desktopViewMode === 'chat' && selectedGroup)}
handleSecretKeyCreationInProgress={ handleSecretKeyCreationInProgress={
handleSecretKeyCreationInProgress handleSecretKeyCreationInProgress
} }
triedToFetchSecretKey={triedToFetchSecretKey} triedToFetchSecretKey={triedToFetchSecretKey}
myName={userInfo?.name} myName={userInfo?.name}
balance={balance} balance={balance}
getTimestampEnterChatParent={getTimestampEnterChat} getTimestampEnterChatParent={getTimestampEnterChat}
/> />
)}
{isPrivate &&
firstSecretKeyInCreation &&
triedToFetchSecretKey &&
!secretKeyPublishDate && (
<div
style={{
alignItems: 'flex-start',
display: 'flex',
flexDirection: 'column',
height: '100%',
padding: '20px',
width: '100%',
}}
>
{' '}
<Typography>
The group's first common encryption key is in the process
of creation. Please wait a few minutes for it to be
retrieved by the network. Checking every 2 minutes...
</Typography>
</div>
)} )}
{isPrivate && {isPrivate &&
firstSecretKeyInCreation && !admins.includes(myAddress) &&
triedToFetchSecretKey && !secretKey &&
!secretKeyPublishDate && ( triedToFetchSecretKey ? (
<>
{secretKeyPublishDate ||
(!secretKeyPublishDate && !firstSecretKeyInCreation) ? (
<div <div
style={{ style={{
alignItems: 'flex-start', alignItems: 'flex-start',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
height: '100%', height: 'calc(100vh - 70px)',
overflow: 'auto',
padding: '20px', padding: '20px',
width: '100%', width: '100%',
}} }}
> >
{' '} {' '}
<Typography> <Typography>
The group's first common encryption key is in the process You are not part of the encrypted group of members. Wait
of creation. Please wait a few minutes for it to be until an admin re-encrypts the keys.
retrieved by the network. Checking every 2 minutes...
</Typography> </Typography>
</div> <Spacer height="25px" />
)} <Typography>
{isPrivate && <strong>
!admins.includes(myAddress) && Only unencrypted messages will be displayed.
!secretKey && </strong>
triedToFetchSecretKey ? ( </Typography>
<> <Spacer height="25px" />
{secretKeyPublishDate || <Typography>
(!secretKeyPublishDate && !firstSecretKeyInCreation) ? ( Try notifying an admin from the list of admins below:
<div </Typography>
style={{ <Spacer height="25px" />
alignItems: 'flex-start', {adminsWithNames.map((admin) => {
display: 'flex', return (
flexDirection: 'column', <Box
height: 'calc(100vh - 70px)', sx={{
overflow: 'auto', display: 'flex',
padding: '20px', gap: '20px',
width: '100%', padding: '15px',
}} alignItems: 'center',
> }}
{' '} >
<Typography> <Typography>{admin?.name}</Typography>
You are not part of the encrypted group of members. Wait <LoadingButton
until an admin re-encrypts the keys. loading={isLoadingNotifyAdmin}
</Typography> loadingPosition="start"
<Spacer height="25px" /> variant="contained"
<Typography> onClick={() => notifyAdmin(admin)}
<strong>
Only unencrypted messages will be displayed.
</strong>
</Typography>
<Spacer height="25px" />
<Typography>
Try notifying an admin from the list of admins below:
</Typography>
<Spacer height="25px" />
{adminsWithNames.map((admin) => {
return (
<Box
sx={{
display: 'flex',
gap: '20px',
padding: '15px',
alignItems: 'center',
}}
> >
<Typography>{admin?.name}</Typography> Notify
<LoadingButton </LoadingButton>
loading={isLoadingNotifyAdmin} </Box>
loadingPosition="start" );
variant="contained" })}
onClick={() => notifyAdmin(admin)} </div>
> ) : null}
Notify </>
</LoadingButton>
</Box>
);
})}
</div>
) : null}
</>
) : admins.includes(myAddress) && ) : admins.includes(myAddress) &&
!secretKey && !secretKey &&
isPrivate && isPrivate &&
@ -2520,65 +2519,60 @@ export const Group = ({
</Box> </Box>
</> </>
)} )}
{ <AppsDesktop
<AppsDesktop toggleSideViewGroups={toggleSideViewGroups}
toggleSideViewGroups={toggleSideViewGroups} toggleSideViewDirects={toggleSideViewDirects}
toggleSideViewDirects={toggleSideViewDirects} goToHome={goToHome}
goToHome={goToHome} mode={appsMode}
mode={appsMode} setMode={setAppsMode}
setMode={setAppsMode} setDesktopSideView={setDesktopSideView}
setDesktopSideView={setDesktopSideView} hasUnreadDirects={directChatHasUnread}
hasUnreadDirects={directChatHasUnread} show={desktopViewMode === 'apps'}
show={desktopViewMode === 'apps'} myName={userInfo?.name}
myName={userInfo?.name} isGroups={isOpenSideViewGroups}
isGroups={isOpenSideViewGroups} isDirects={isOpenSideViewDirects}
isDirects={isOpenSideViewDirects} hasUnreadGroups={groupChatHasUnread || groupsAnnHasUnread}
hasUnreadGroups={groupChatHasUnread || groupsAnnHasUnread} setDesktopViewMode={setDesktopViewMode}
setDesktopViewMode={setDesktopViewMode} isApps={desktopViewMode === 'apps'}
isApps={desktopViewMode === 'apps'} desktopViewMode={desktopViewMode}
desktopViewMode={desktopViewMode} />
/>
} <AppsDevMode
{ toggleSideViewGroups={toggleSideViewGroups}
<AppsDevMode toggleSideViewDirects={toggleSideViewDirects}
toggleSideViewGroups={toggleSideViewGroups} goToHome={goToHome}
toggleSideViewDirects={toggleSideViewDirects} mode={appsModeDev}
goToHome={goToHome} setMode={setAppsModeDev}
mode={appsModeDev} setDesktopSideView={setDesktopSideView}
setMode={setAppsModeDev} hasUnreadDirects={directChatHasUnread}
setDesktopSideView={setDesktopSideView} show={desktopViewMode === 'dev'}
hasUnreadDirects={directChatHasUnread} myName={userInfo?.name}
show={desktopViewMode === 'dev'} isGroups={isOpenSideViewGroups}
myName={userInfo?.name} isDirects={isOpenSideViewDirects}
isGroups={isOpenSideViewGroups} hasUnreadGroups={groupChatHasUnread || groupsAnnHasUnread}
isDirects={isOpenSideViewDirects} setDesktopViewMode={setDesktopViewMode}
hasUnreadGroups={groupChatHasUnread || groupsAnnHasUnread} desktopViewMode={desktopViewMode}
setDesktopViewMode={setDesktopViewMode} isApps={desktopViewMode === 'apps'}
desktopViewMode={desktopViewMode} />
isApps={desktopViewMode === 'apps'}
/> <HomeDesktop
} name={userInfo?.name}
refreshHomeDataFunc={refreshHomeDataFunc}
{ myAddress={myAddress}
<HomeDesktop isLoadingGroups={isLoadingGroups}
name={userInfo?.name} balance={balance}
refreshHomeDataFunc={refreshHomeDataFunc} userInfo={userInfo}
myAddress={myAddress} groups={groups}
isLoadingGroups={isLoadingGroups} setGroupSection={setGroupSection}
balance={balance} setSelectedGroup={setSelectedGroup}
userInfo={userInfo} getTimestampEnterChat={getTimestampEnterChat}
groups={groups} setOpenManageMembers={setOpenManageMembers}
setGroupSection={setGroupSection} setOpenAddGroup={setOpenAddGroup}
setSelectedGroup={setSelectedGroup} setMobileViewMode={setMobileViewMode}
getTimestampEnterChat={getTimestampEnterChat} setDesktopViewMode={setDesktopViewMode}
setOpenManageMembers={setOpenManageMembers} desktopViewMode={desktopViewMode}
setOpenAddGroup={setOpenAddGroup} />
setMobileViewMode={setMobileViewMode}
setDesktopViewMode={setDesktopViewMode}
desktopViewMode={desktopViewMode}
/>
}
</Box> </Box>
<AuthenticatedContainerInnerRight <AuthenticatedContainerInnerRight