mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-23 19:37:52 +00:00
add hide to seedphrase
This commit is contained in:
parent
de45a145ca
commit
c878f66f49
15
src/App.tsx
15
src/App.tsx
@ -401,6 +401,7 @@ function App() {
|
|||||||
message: messageQortalRequestExtension,
|
message: messageQortalRequestExtension,
|
||||||
} = useModal();
|
} = useModal();
|
||||||
|
|
||||||
|
const [isRunningPublicNode, setIsRunningPublicNode] = useState(false)
|
||||||
|
|
||||||
const [infoSnack, setInfoSnack] = useState(null);
|
const [infoSnack, setInfoSnack] = useState(null);
|
||||||
const [openSnack, setOpenSnack] = useState(false);
|
const [openSnack, setOpenSnack] = useState(false);
|
||||||
@ -450,6 +451,14 @@ function App() {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(()=> {
|
||||||
|
isRunningGateway().then((res)=> {
|
||||||
|
setIsRunningPublicNode(res)
|
||||||
|
}).catch((error)=> {
|
||||||
|
console.error(error)
|
||||||
|
})
|
||||||
|
}, [extState])
|
||||||
|
|
||||||
useEffect(()=> {
|
useEffect(()=> {
|
||||||
if(!shownTutorialsInitiated) return
|
if(!shownTutorialsInitiated) return
|
||||||
if(extState === 'not-authenticated'){
|
if(extState === 'not-authenticated'){
|
||||||
@ -1868,7 +1877,8 @@ function App() {
|
|||||||
isUserBlocked,
|
isUserBlocked,
|
||||||
addToBlockList,
|
addToBlockList,
|
||||||
removeBlockFromList,
|
removeBlockFromList,
|
||||||
getAllBlockedUsers
|
getAllBlockedUsers,
|
||||||
|
isRunningPublicNode
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TaskManager getUserInfo={getUserInfo} />
|
<TaskManager getUserInfo={getUserInfo} />
|
||||||
@ -2046,7 +2056,8 @@ function App() {
|
|||||||
isUserBlocked,
|
isUserBlocked,
|
||||||
addToBlockList,
|
addToBlockList,
|
||||||
removeBlockFromList,
|
removeBlockFromList,
|
||||||
getAllBlockedUsers
|
getAllBlockedUsers,
|
||||||
|
isRunningPublicNode
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
@ -301,12 +301,17 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
/>
|
/>
|
||||||
<Spacer height="7px" />
|
<Spacer height="7px" />
|
||||||
<Label>Seed-phrase</Label>
|
<Label>Seed-phrase</Label>
|
||||||
<Input
|
<PasswordField
|
||||||
placeholder="Seed-phrase"
|
placeholder="Seed-phrase"
|
||||||
value={seedValue}
|
id="standard-adornment-password"
|
||||||
onChange={(e) => setSeedValue(e.target.value)}
|
value={seedValue}
|
||||||
/>
|
onChange={(e) => setSeedValue(e.target.value)}
|
||||||
<Spacer height="7px" />
|
autoComplete="off"
|
||||||
|
sx={{
|
||||||
|
width: '100%'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Spacer height="7px" />
|
||||||
|
|
||||||
<Label>Choose new password</Label>
|
<Label>Choose new password</Label>
|
||||||
<PasswordField
|
<PasswordField
|
||||||
@ -314,6 +319,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
|||||||
value={password}
|
value={password}
|
||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
|
sx={{
|
||||||
|
width: '100%'
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -12,18 +12,12 @@ export const sortablePinnedAppsAtom = atom({
|
|||||||
}, {
|
}, {
|
||||||
name: 'Q-Share',
|
name: 'Q-Share',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
}, {
|
|
||||||
name: 'qombo',
|
|
||||||
service: 'APP'
|
|
||||||
}, {
|
}, {
|
||||||
name: 'Q-Fund',
|
name: 'Q-Fund',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
}, {
|
}, {
|
||||||
name: 'Q-Shop',
|
name: 'Q-Shop',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
},{
|
|
||||||
name: 'Qombo',
|
|
||||||
service: 'APP'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Q-Trade',
|
name: 'Q-Trade',
|
||||||
@ -33,10 +27,6 @@ export const sortablePinnedAppsAtom = atom({
|
|||||||
name: 'Q-Support',
|
name: 'Q-Support',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'NodeInfo',
|
|
||||||
service: 'APP'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Q-Manager',
|
name: 'Q-Manager',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
|
@ -36,12 +36,10 @@ const officialAppList = [
|
|||||||
"q-share",
|
"q-share",
|
||||||
"q-support",
|
"q-support",
|
||||||
"q-mail",
|
"q-mail",
|
||||||
"qombo",
|
|
||||||
"q-fund",
|
"q-fund",
|
||||||
"q-shop",
|
"q-shop",
|
||||||
"q-trade",
|
"q-trade",
|
||||||
"q-support",
|
"q-support",
|
||||||
"nodeinfo",
|
|
||||||
"q-manager"
|
"q-manager"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -44,12 +44,10 @@ const officialAppList = [
|
|||||||
"q-share",
|
"q-share",
|
||||||
"q-support",
|
"q-support",
|
||||||
"q-mail",
|
"q-mail",
|
||||||
"qombo",
|
|
||||||
"q-fund",
|
"q-fund",
|
||||||
"q-shop",
|
"q-shop",
|
||||||
"q-trade",
|
"q-trade",
|
||||||
"q-support",
|
"q-support",
|
||||||
"nodeinfo",
|
|
||||||
"q-manager"
|
"q-manager"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -38,12 +38,10 @@ const officialAppList = [
|
|||||||
"q-share",
|
"q-share",
|
||||||
"q-support",
|
"q-support",
|
||||||
"q-mail",
|
"q-mail",
|
||||||
"qombo",
|
|
||||||
"q-fund",
|
"q-fund",
|
||||||
"q-shop",
|
"q-shop",
|
||||||
"q-trade",
|
"q-trade",
|
||||||
"q-support",
|
"q-support",
|
||||||
"nodeinfo",
|
|
||||||
"q-manager"
|
"q-manager"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -53,12 +53,10 @@ const officialAppList = [
|
|||||||
"q-share",
|
"q-share",
|
||||||
"q-support",
|
"q-support",
|
||||||
"q-mail",
|
"q-mail",
|
||||||
"qombo",
|
|
||||||
"q-fund",
|
"q-fund",
|
||||||
"q-shop",
|
"q-shop",
|
||||||
"q-trade",
|
"q-trade",
|
||||||
"q-support",
|
"q-support",
|
||||||
"nodeinfo",
|
|
||||||
"q-manager",
|
"q-manager",
|
||||||
"q-mintership"
|
"q-mintership"
|
||||||
];
|
];
|
||||||
|
@ -188,7 +188,7 @@ const onSeenFunc = useCallback(()=> {
|
|||||||
|
|
||||||
|
|
||||||
</WrapperUserAction>
|
</WrapperUserAction>
|
||||||
<Tooltip disableFocusListener title={`level ${userInfo}`}>
|
<Tooltip disableFocusListener title={`level ${userInfo ?? 0}`}>
|
||||||
|
|
||||||
|
|
||||||
<img style={{
|
<img style={{
|
||||||
|
@ -404,7 +404,7 @@ export const Group = ({
|
|||||||
const [openAddGroup, setOpenAddGroup] = useState(false);
|
const [openAddGroup, setOpenAddGroup] = useState(false);
|
||||||
const [isInitialGroups, setIsInitialGroups] = useState(false);
|
const [isInitialGroups, setIsInitialGroups] = useState(false);
|
||||||
const [openManageMembers, setOpenManageMembers] = useState(false);
|
const [openManageMembers, setOpenManageMembers] = useState(false);
|
||||||
const { setMemberGroups, rootHeight } = useContext(MyContext);
|
const { setMemberGroups, rootHeight, isRunningPublicNode } = useContext(MyContext);
|
||||||
const lastGroupNotification = useRef<null | number>(null);
|
const lastGroupNotification = useRef<null | number>(null);
|
||||||
const [timestampEnterData, setTimestampEnterData] = useState({});
|
const [timestampEnterData, setTimestampEnterData] = useState({});
|
||||||
const [chatMode, setChatMode] = useState("groups");
|
const [chatMode, setChatMode] = useState("groups");
|
||||||
@ -457,6 +457,8 @@ export const Group = ({
|
|||||||
return null
|
return null
|
||||||
}, [selectedGroup])
|
}, [selectedGroup])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const setSelectedGroupId = useSetRecoilState(selectedGroupIdAtom)
|
const setSelectedGroupId = useSetRecoilState(selectedGroupIdAtom)
|
||||||
const toggleSideViewDirects = ()=> {
|
const toggleSideViewDirects = ()=> {
|
||||||
@ -2021,21 +2023,24 @@ export const Group = ({
|
|||||||
/>
|
/>
|
||||||
Group Mgmt
|
Group Mgmt
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<CustomButton
|
{!isRunningPublicNode && (
|
||||||
onClick={() => {
|
<CustomButton
|
||||||
setIsOpenBlockedUserModal(true);
|
onClick={() => {
|
||||||
}}
|
setIsOpenBlockedUserModal(true);
|
||||||
sx={{
|
}}
|
||||||
minWidth: 'unset',
|
sx={{
|
||||||
padding: '10px'
|
minWidth: 'unset',
|
||||||
}}
|
padding: '10px'
|
||||||
>
|
}}
|
||||||
<BlockIcon
|
>
|
||||||
sx={{
|
<BlockIcon
|
||||||
color: "white",
|
sx={{
|
||||||
}}
|
color: "white",
|
||||||
/>
|
}}
|
||||||
</CustomButton>
|
/>
|
||||||
|
</CustomButton>
|
||||||
|
)}
|
||||||
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{chatMode === "directs" && (
|
{chatMode === "directs" && (
|
||||||
|
@ -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 { forwardRef, useState } from 'react'
|
||||||
|
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
||||||
|
import VisibilityIcon from '@mui/icons-material/Visibility';
|
||||||
export const CustomInput = styled(TextField)({
|
export const CustomInput = styled(TextField)({
|
||||||
width: "183px", // Adjust the width as needed
|
width: "183px", // Adjust the width as needed
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
@ -51,7 +52,11 @@ export const PasswordField = forwardRef<HTMLInputElement, TextFieldProps>( ({ ..
|
|||||||
<InputAdornment position="end" data-testid="toggle-view-password-btn" onClick={() => {
|
<InputAdornment position="end" data-testid="toggle-view-password-btn" onClick={() => {
|
||||||
setCanViewPassword((prevState) => !prevState)
|
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>
|
</InputAdornment>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
@ -4,6 +4,7 @@ import { executeEvent } from '../utils/events';
|
|||||||
import { MyContext } from '../App';
|
import { MyContext } from '../App';
|
||||||
|
|
||||||
export const WrapperUserAction = ({ children, address, name, disabled }) => {
|
export const WrapperUserAction = ({ children, address, name, disabled }) => {
|
||||||
|
const {isRunningPublicNode} = useContext(MyContext)
|
||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
|
|
||||||
// Handle child element click to open Popover
|
// Handle child element click to open Popover
|
||||||
@ -138,8 +139,10 @@ export const WrapperUserAction = ({ children, address, name, disabled }) => {
|
|||||||
User lookup
|
User lookup
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
{!isRunningPublicNode && (
|
||||||
<BlockUser handleClose={handleClose} address={address} name={name} />
|
<BlockUser handleClose={handleClose} address={address} name={name} />
|
||||||
|
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Popover>
|
</Popover>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user