mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-24 03:47:53 +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,
|
||||
} = useModal();
|
||||
|
||||
const [isRunningPublicNode, setIsRunningPublicNode] = useState(false)
|
||||
|
||||
const [infoSnack, setInfoSnack] = useState(null);
|
||||
const [openSnack, setOpenSnack] = useState(false);
|
||||
@ -450,6 +451,14 @@ function App() {
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(()=> {
|
||||
isRunningGateway().then((res)=> {
|
||||
setIsRunningPublicNode(res)
|
||||
}).catch((error)=> {
|
||||
console.error(error)
|
||||
})
|
||||
}, [extState])
|
||||
|
||||
useEffect(()=> {
|
||||
if(!shownTutorialsInitiated) return
|
||||
if(extState === 'not-authenticated'){
|
||||
@ -1868,7 +1877,8 @@ function App() {
|
||||
isUserBlocked,
|
||||
addToBlockList,
|
||||
removeBlockFromList,
|
||||
getAllBlockedUsers
|
||||
getAllBlockedUsers,
|
||||
isRunningPublicNode
|
||||
}}
|
||||
>
|
||||
<TaskManager getUserInfo={getUserInfo} />
|
||||
@ -2046,7 +2056,8 @@ function App() {
|
||||
isUserBlocked,
|
||||
addToBlockList,
|
||||
removeBlockFromList,
|
||||
getAllBlockedUsers
|
||||
getAllBlockedUsers,
|
||||
isRunningPublicNode
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
|
@ -301,12 +301,17 @@ 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)}
|
||||
/>
|
||||
<Spacer height="7px" />
|
||||
<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>
|
||||
<PasswordField
|
||||
@ -314,6 +319,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
autoComplete="off"
|
||||
sx={{
|
||||
width: '100%'
|
||||
}}
|
||||
/>
|
||||
|
||||
</Box>
|
||||
|
@ -12,18 +12,12 @@ export const sortablePinnedAppsAtom = atom({
|
||||
}, {
|
||||
name: 'Q-Share',
|
||||
service: 'APP'
|
||||
}, {
|
||||
name: 'qombo',
|
||||
service: 'APP'
|
||||
}, {
|
||||
name: 'Q-Fund',
|
||||
service: 'APP'
|
||||
}, {
|
||||
name: 'Q-Shop',
|
||||
service: 'APP'
|
||||
},{
|
||||
name: 'Qombo',
|
||||
service: 'APP'
|
||||
},
|
||||
{
|
||||
name: 'Q-Trade',
|
||||
@ -33,10 +27,6 @@ export const sortablePinnedAppsAtom = atom({
|
||||
name: 'Q-Support',
|
||||
service: 'APP'
|
||||
},
|
||||
{
|
||||
name: 'NodeInfo',
|
||||
service: 'APP'
|
||||
},
|
||||
{
|
||||
name: 'Q-Manager',
|
||||
service: 'APP'
|
||||
|
@ -36,12 +36,10 @@ const officialAppList = [
|
||||
"q-share",
|
||||
"q-support",
|
||||
"q-mail",
|
||||
"qombo",
|
||||
"q-fund",
|
||||
"q-shop",
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"nodeinfo",
|
||||
"q-manager"
|
||||
];
|
||||
|
||||
|
@ -44,12 +44,10 @@ const officialAppList = [
|
||||
"q-share",
|
||||
"q-support",
|
||||
"q-mail",
|
||||
"qombo",
|
||||
"q-fund",
|
||||
"q-shop",
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"nodeinfo",
|
||||
"q-manager"
|
||||
];
|
||||
|
||||
|
@ -38,12 +38,10 @@ const officialAppList = [
|
||||
"q-share",
|
||||
"q-support",
|
||||
"q-mail",
|
||||
"qombo",
|
||||
"q-fund",
|
||||
"q-shop",
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"nodeinfo",
|
||||
"q-manager"
|
||||
];
|
||||
|
||||
|
@ -53,12 +53,10 @@ const officialAppList = [
|
||||
"q-share",
|
||||
"q-support",
|
||||
"q-mail",
|
||||
"qombo",
|
||||
"q-fund",
|
||||
"q-shop",
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"nodeinfo",
|
||||
"q-manager",
|
||||
"q-mintership"
|
||||
];
|
||||
|
@ -188,7 +188,7 @@ const onSeenFunc = useCallback(()=> {
|
||||
|
||||
|
||||
</WrapperUserAction>
|
||||
<Tooltip disableFocusListener title={`level ${userInfo}`}>
|
||||
<Tooltip disableFocusListener title={`level ${userInfo ?? 0}`}>
|
||||
|
||||
|
||||
<img style={{
|
||||
|
@ -404,7 +404,7 @@ export const Group = ({
|
||||
const [openAddGroup, setOpenAddGroup] = useState(false);
|
||||
const [isInitialGroups, setIsInitialGroups] = 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 [timestampEnterData, setTimestampEnterData] = useState({});
|
||||
const [chatMode, setChatMode] = useState("groups");
|
||||
@ -457,6 +457,8 @@ export const Group = ({
|
||||
return null
|
||||
}, [selectedGroup])
|
||||
|
||||
|
||||
|
||||
|
||||
const setSelectedGroupId = useSetRecoilState(selectedGroupIdAtom)
|
||||
const toggleSideViewDirects = ()=> {
|
||||
@ -2021,21 +2023,24 @@ export const Group = ({
|
||||
/>
|
||||
Group Mgmt
|
||||
</CustomButton>
|
||||
<CustomButton
|
||||
onClick={() => {
|
||||
setIsOpenBlockedUserModal(true);
|
||||
}}
|
||||
sx={{
|
||||
minWidth: 'unset',
|
||||
padding: '10px'
|
||||
}}
|
||||
>
|
||||
<BlockIcon
|
||||
sx={{
|
||||
color: "white",
|
||||
}}
|
||||
/>
|
||||
</CustomButton>
|
||||
{!isRunningPublicNode && (
|
||||
<CustomButton
|
||||
onClick={() => {
|
||||
setIsOpenBlockedUserModal(true);
|
||||
}}
|
||||
sx={{
|
||||
minWidth: 'unset',
|
||||
padding: '10px'
|
||||
}}
|
||||
>
|
||||
<BlockIcon
|
||||
sx={{
|
||||
color: "white",
|
||||
}}
|
||||
/>
|
||||
</CustomButton>
|
||||
)}
|
||||
|
||||
</>
|
||||
)}
|
||||
{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 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>
|
||||
)
|
||||
}}
|
||||
|
@ -4,6 +4,7 @@ import { executeEvent } from '../utils/events';
|
||||
import { MyContext } from '../App';
|
||||
|
||||
export const WrapperUserAction = ({ children, address, name, disabled }) => {
|
||||
const {isRunningPublicNode} = useContext(MyContext)
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
|
||||
// Handle child element click to open Popover
|
||||
@ -138,8 +139,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>
|
||||
</Popover>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user