add hide to seedphrase

This commit is contained in:
PhilReact 2025-03-05 02:19:16 +02:00
parent 7bbe50f881
commit 6c335ce841
10 changed files with 54 additions and 28 deletions

View File

@ -396,6 +396,8 @@ function App() {
const resetAtomIsUsingImportExportSettingsAtom = useResetRecoilState(isUsingImportExportSettingsAtom)
const { toggleFullScreen } = useAppFullScreen(setFullScreen);
const generatorRef = useRef(null)
const [isRunningPublicNode, setIsRunningPublicNode] = useState(false)
const exportSeedphrase = ()=> {
const seedPhrase = generatorRef.current.parsedString
saveSeedPhraseToDisk(seedPhrase)
@ -487,7 +489,13 @@ function App() {
}
}, [extState]);
useEffect(()=> {
isRunningGateway().then((res)=> {
setIsRunningPublicNode(res)
}).catch((error)=> {
console.error(error)
})
}, [extState])
useEffect(() => {
isFocusedRef.current = isFocused;
@ -1932,7 +1940,8 @@ function App() {
isUserBlocked,
addToBlockList,
removeBlockFromList,
getAllBlockedUsers
getAllBlockedUsers,
isRunningPublicNode
}}
>
<TaskManger getUserInfo={getUserInfo} />
@ -2101,7 +2110,8 @@ function App() {
isUserBlocked,
addToBlockList,
removeBlockFromList,
getAllBlockedUsers
getAllBlockedUsers,
isRunningPublicNode
}}
>
<Box

View File

@ -301,11 +301,16 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
/>
<Spacer height="7px" />
<Label>Seed-phrase</Label>
<Input
placeholder="Seed-phrase"
value={seedValue}
onChange={(e) => setSeedValue(e.target.value)}
/>
<PasswordField
placeholder="Seed-phrase"
id="standard-adornment-password"
value={seedValue}
onChange={(e) => setSeedValue(e.target.value)}
autoComplete="off"
sx={{
width: '100%'
}}
/>
<Spacer height="7px" />
<Label>Choose new password</Label>
@ -314,6 +319,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
value={password}
onChange={(e) => setPassword(e.target.value)}
autoComplete="off"
sx={{
width: '100%'
}}
/>
</Box>

View File

@ -21,9 +21,6 @@ export const sortablePinnedAppsAtom = atom({
}, {
name: 'Q-Shop',
service: 'APP'
},{
name: 'qombo',
service: 'APP'
},
{
name: 'Q-Trade',
@ -33,10 +30,6 @@ export const sortablePinnedAppsAtom = atom({
name: 'Q-Support',
service: 'APP'
},
{
name: 'NodeInfo',
service: 'APP'
},
{
name: 'Q-Mintership',
service: 'APP'

View File

@ -4931,8 +4931,15 @@ const checkGroupList = async () => {
});
const data = await response.json();
const filteredGroups =
data.groups?.filter((item) => item?.groupId !== 0) || [];
const copyGroups = [...(data?.groups || [])]
const findIndex = copyGroups?.findIndex(item => item?.groupId === 0)
if(findIndex !== -1){
copyGroups[findIndex] = {
...(copyGroups[findIndex] || {}),
groupId: "0"
}
}
const filteredGroups = copyGroups
const sortedGroups = filteredGroups.sort(
(a, b) => (b.timestamp || 0) - (a.timestamp || 0)
);

View File

@ -39,12 +39,10 @@ const officialAppList = [
"q-share",
"q-support",
"q-mail",
"qombo",
"q-fund",
"q-shop",
"q-trade",
"q-support",
"nodeinfo"
];
const ScrollerStyled = styled('div')({

View File

@ -54,12 +54,10 @@ const officialAppList = [
"q-share",
"q-support",
"q-mail",
"qombo",
"q-fund",
"q-shop",
"q-trade",
"q-support",
"nodeinfo",
"q-mintership",
"q-manager"
];

View File

@ -185,7 +185,7 @@ const onSeenFunc = useCallback(()=> {
</WrapperUserAction>
<Tooltip disableFocusListener title={`level ${userInfo}`}>
<Tooltip disableFocusListener title={`level ${userInfo ?? 0}`}>
<img style={{

View File

@ -460,7 +460,7 @@ export const Group = ({
const [openAddGroup, setOpenAddGroup] = useState(false);
const [isInitialGroups, setIsInitialGroups] = useState(false);
const [openManageMembers, setOpenManageMembers] = useState(false);
const { setMemberGroups, memberGroups, rootHeight } = useContext(MyContext);
const { setMemberGroups, memberGroups, rootHeight, isRunningPublicNode } = useContext(MyContext);
const lastGroupNotification = useRef<null | number>(null);
const [timestampEnterData, setTimestampEnterData] = useState({});
const [chatMode, setChatMode] = useState("groups");
@ -2244,7 +2244,8 @@ export const Group = ({
/>
Group Mgmt
</CustomButton>
<CustomButton
{!isRunningPublicNode && (
<CustomButton
onClick={() => {
setIsOpenBlockedUserModal(true);
}}
@ -2259,6 +2260,8 @@ export const Group = ({
}}
/>
</CustomButton>
)}
</>
)}
{chatMode === "directs" && (

View File

@ -1,6 +1,7 @@
import { Button, InputAdornment, TextField, TextFieldProps, styled } from "@mui/material";
import { Button, ButtonBase, InputAdornment, TextField, TextFieldProps, styled } from "@mui/material";
import { forwardRef, useState } from 'react'
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
import VisibilityIcon from '@mui/icons-material/Visibility';
export const CustomInput = styled(TextField)({
width: "183px", // Adjust the width as needed
borderRadius: "5px",
@ -51,7 +52,11 @@ export const PasswordField = forwardRef<HTMLInputElement, TextFieldProps>( ({ ..
<InputAdornment position="end" data-testid="toggle-view-password-btn" onClick={() => {
setCanViewPassword((prevState) => !prevState)
}}>
{canViewPassword ? <Button data-testid="plain-text-indicator" sx={{ minWidth: 0, p: 0 }}>👁</Button> : <Button data-testid="password-text-indicator" sx={{ minWidth: 0, p: 0 }}>👁🗨</Button>}
{canViewPassword ? <ButtonBase data-testid="plain-text-indicator" sx={{ minWidth: 0, p: 0 }}><VisibilityOffIcon sx={{
color: 'white'
}}/></ButtonBase> : <ButtonBase data-testid="password-text-indicator" sx={{ minWidth: 0, p: 0 }}><VisibilityIcon sx={{
color: 'white'
}} /></ButtonBase>}
</InputAdornment>
)
}}

View File

@ -6,6 +6,7 @@ import { MyContext } from '../App';
export const WrapperUserAction = ({ children, address, name, disabled }) => {
const [anchorEl, setAnchorEl] = useState(null);
const {isRunningPublicNode} = useContext(MyContext)
// Handle child element click to open Popover
const handleChildClick = (event) => {
@ -139,7 +140,10 @@ export const WrapperUserAction = ({ children, address, name, disabled }) => {
>
User lookup
</Button>
<BlockUser handleClose={handleClose} address={address} name={name} />
{!isRunningPublicNode && (
<BlockUser handleClose={handleClose} address={address} name={name} />
)}
</Box>