mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-03-14 20:02:33 +00:00
fix key popup
This commit is contained in:
parent
bd19a0b6d2
commit
7b69957ea8
@ -8,7 +8,7 @@ import { decryptResource, getGroupAdmins, validateSecretKey } from '../Group/Gro
|
||||
import { base64ToUint8Array } from '../../qdn/encryption/group-encryption';
|
||||
import { uint8ArrayToObject } from '../../backgroundFunctions/encryption';
|
||||
|
||||
export const CreateCommonSecret = ({groupId, secretKey, isOwner, myAddress, secretKeyDetails, userInfo, noSecretKey, setHideCommonKeyPopup, setIsForceShowCreationKeyPopup}) => {
|
||||
export const CreateCommonSecret = ({groupId, secretKey, isOwner, myAddress, secretKeyDetails, userInfo, noSecretKey, setHideCommonKeyPopup, setIsForceShowCreationKeyPopup, isForceShowCreationKeyPopup}) => {
|
||||
const { show, setTxList } = useContext(MyContext);
|
||||
|
||||
const [openSnack, setOpenSnack] = React.useState(false);
|
||||
@ -164,7 +164,7 @@ export const CreateCommonSecret = ({groupId, secretKey, isOwner, myAddress, sec
|
||||
<Box>
|
||||
<Typography>The latest group secret key was published by a non-owner. As the owner of the group please re-encrypt the key as a safeguard</Typography>
|
||||
</Box>
|
||||
): (
|
||||
) : isForceShowCreationKeyPopup ? null : (
|
||||
<Box>
|
||||
<Typography>The group member list has changed. Please re-encrypt the secret key.</Typography>
|
||||
</Box>
|
||||
|
@ -1322,6 +1322,7 @@ export const Group = ({
|
||||
setSecretKeyDetails(null);
|
||||
setNewEncryptionNotification(null);
|
||||
setMemberCountFromSecretKeyData(null);
|
||||
setIsForceShowCreationKeyPopup(false)
|
||||
setSelectedGroup(null);
|
||||
setSelectedDirect(null);
|
||||
setGroups([]);
|
||||
@ -1388,6 +1389,7 @@ export const Group = ({
|
||||
setAdminsWithNames([]);
|
||||
setMembers([]);
|
||||
setMemberCountFromSecretKeyData(null);
|
||||
setIsForceShowCreationKeyPopup(false)
|
||||
setTriedToFetchSecretKey(false);
|
||||
setFirstSecretKeyInCreation(false);
|
||||
setIsOpenSideViewDirects(false)
|
||||
@ -1442,6 +1444,7 @@ export const Group = ({
|
||||
setAdminsWithNames([]);
|
||||
setMembers([]);
|
||||
setMemberCountFromSecretKeyData(null);
|
||||
setIsForceShowCreationKeyPopup(false)
|
||||
setTriedToFetchSecretKey(false);
|
||||
setFirstSecretKeyInCreation(false);
|
||||
setGroupSection("chat");
|
||||
@ -1493,6 +1496,7 @@ export const Group = ({
|
||||
setAdminsWithNames([]);
|
||||
setMembers([]);
|
||||
setMemberCountFromSecretKeyData(null);
|
||||
setIsForceShowCreationKeyPopup(false)
|
||||
setTriedToFetchSecretKey(false);
|
||||
setFirstSecretKeyInCreation(false);
|
||||
setGroupSection("announcement");
|
||||
@ -1554,6 +1558,7 @@ export const Group = ({
|
||||
setAdminsWithNames([]);
|
||||
setMembers([]);
|
||||
setMemberCountFromSecretKeyData(null);
|
||||
setIsForceShowCreationKeyPopup(false)
|
||||
setTriedToFetchSecretKey(false);
|
||||
setFirstSecretKeyInCreation(false);
|
||||
setGroupSection("forum");
|
||||
@ -1610,6 +1615,7 @@ export const Group = ({
|
||||
setAdminsWithNames([]);
|
||||
setMembers([]);
|
||||
setMemberCountFromSecretKeyData(null);
|
||||
setIsForceShowCreationKeyPopup(false)
|
||||
setTriedToFetchSecretKey(false);
|
||||
setFirstSecretKeyInCreation(false);
|
||||
setIsOpenSideViewDirects(false)
|
||||
@ -2551,12 +2557,13 @@ export const Group = ({
|
||||
zIndex: 100,
|
||||
}}
|
||||
>
|
||||
{(isPrivate && admins.includes(myAddress) &&
|
||||
{((isPrivate && admins.includes(myAddress) &&
|
||||
shouldReEncrypt &&
|
||||
triedToFetchSecretKey &&
|
||||
!firstSecretKeyInCreation &&
|
||||
!hideCommonKeyPopup) || isForceShowCreationKeyPopup && (
|
||||
!hideCommonKeyPopup) || isForceShowCreationKeyPopup) && (
|
||||
<CreateCommonSecret
|
||||
isForceShowCreationKeyPopup={isForceShowCreationKeyPopup}
|
||||
setHideCommonKeyPopup={setHideCommonKeyPopup}
|
||||
groupId={selectedGroup?.groupId}
|
||||
secretKey={secretKey}
|
||||
|
Loading…
x
Reference in New Issue
Block a user