mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-03-28 00:05:54 +00:00
add hide to seedphrase
This commit is contained in:
parent
7bbe50f881
commit
6c335ce841
src
16
src/App.tsx
16
src/App.tsx
@ -396,6 +396,8 @@ function App() {
|
|||||||
const resetAtomIsUsingImportExportSettingsAtom = useResetRecoilState(isUsingImportExportSettingsAtom)
|
const resetAtomIsUsingImportExportSettingsAtom = useResetRecoilState(isUsingImportExportSettingsAtom)
|
||||||
const { toggleFullScreen } = useAppFullScreen(setFullScreen);
|
const { toggleFullScreen } = useAppFullScreen(setFullScreen);
|
||||||
const generatorRef = useRef(null)
|
const generatorRef = useRef(null)
|
||||||
|
const [isRunningPublicNode, setIsRunningPublicNode] = useState(false)
|
||||||
|
|
||||||
const exportSeedphrase = ()=> {
|
const exportSeedphrase = ()=> {
|
||||||
const seedPhrase = generatorRef.current.parsedString
|
const seedPhrase = generatorRef.current.parsedString
|
||||||
saveSeedPhraseToDisk(seedPhrase)
|
saveSeedPhraseToDisk(seedPhrase)
|
||||||
@ -487,7 +489,13 @@ function App() {
|
|||||||
}
|
}
|
||||||
}, [extState]);
|
}, [extState]);
|
||||||
|
|
||||||
|
useEffect(()=> {
|
||||||
|
isRunningGateway().then((res)=> {
|
||||||
|
setIsRunningPublicNode(res)
|
||||||
|
}).catch((error)=> {
|
||||||
|
console.error(error)
|
||||||
|
})
|
||||||
|
}, [extState])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
isFocusedRef.current = isFocused;
|
isFocusedRef.current = isFocused;
|
||||||
@ -1932,7 +1940,8 @@ function App() {
|
|||||||
isUserBlocked,
|
isUserBlocked,
|
||||||
addToBlockList,
|
addToBlockList,
|
||||||
removeBlockFromList,
|
removeBlockFromList,
|
||||||
getAllBlockedUsers
|
getAllBlockedUsers,
|
||||||
|
isRunningPublicNode
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TaskManger getUserInfo={getUserInfo} />
|
<TaskManger getUserInfo={getUserInfo} />
|
||||||
@ -2101,7 +2110,8 @@ function App() {
|
|||||||
isUserBlocked,
|
isUserBlocked,
|
||||||
addToBlockList,
|
addToBlockList,
|
||||||
removeBlockFromList,
|
removeBlockFromList,
|
||||||
getAllBlockedUsers
|
getAllBlockedUsers,
|
||||||
|
isRunningPublicNode
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
@ -301,11 +301,16 @@ 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)}
|
||||||
|
autoComplete="off"
|
||||||
|
sx={{
|
||||||
|
width: '100%'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<Spacer height="7px" />
|
<Spacer height="7px" />
|
||||||
|
|
||||||
<Label>Choose new password</Label>
|
<Label>Choose new password</Label>
|
||||||
@ -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>
|
||||||
|
@ -21,9 +21,6 @@ export const sortablePinnedAppsAtom = atom({
|
|||||||
}, {
|
}, {
|
||||||
name: 'Q-Shop',
|
name: 'Q-Shop',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
},{
|
|
||||||
name: 'qombo',
|
|
||||||
service: 'APP'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Q-Trade',
|
name: 'Q-Trade',
|
||||||
@ -33,10 +30,6 @@ export const sortablePinnedAppsAtom = atom({
|
|||||||
name: 'Q-Support',
|
name: 'Q-Support',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'NodeInfo',
|
|
||||||
service: 'APP'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Q-Mintership',
|
name: 'Q-Mintership',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
|
@ -4931,8 +4931,15 @@ const checkGroupList = async () => {
|
|||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
const filteredGroups =
|
const copyGroups = [...(data?.groups || [])]
|
||||||
data.groups?.filter((item) => item?.groupId !== 0) || [];
|
const findIndex = copyGroups?.findIndex(item => item?.groupId === 0)
|
||||||
|
if(findIndex !== -1){
|
||||||
|
copyGroups[findIndex] = {
|
||||||
|
...(copyGroups[findIndex] || {}),
|
||||||
|
groupId: "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const filteredGroups = copyGroups
|
||||||
const sortedGroups = filteredGroups.sort(
|
const sortedGroups = filteredGroups.sort(
|
||||||
(a, b) => (b.timestamp || 0) - (a.timestamp || 0)
|
(a, b) => (b.timestamp || 0) - (a.timestamp || 0)
|
||||||
);
|
);
|
||||||
|
@ -39,12 +39,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"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const ScrollerStyled = styled('div')({
|
const ScrollerStyled = styled('div')({
|
||||||
|
@ -54,12 +54,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-mintership",
|
"q-mintership",
|
||||||
"q-manager"
|
"q-manager"
|
||||||
];
|
];
|
||||||
|
@ -185,7 +185,7 @@ const onSeenFunc = useCallback(()=> {
|
|||||||
|
|
||||||
|
|
||||||
</WrapperUserAction>
|
</WrapperUserAction>
|
||||||
<Tooltip disableFocusListener title={`level ${userInfo}`}>
|
<Tooltip disableFocusListener title={`level ${userInfo ?? 0}`}>
|
||||||
|
|
||||||
|
|
||||||
<img style={{
|
<img style={{
|
||||||
|
@ -460,7 +460,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, memberGroups, rootHeight } = useContext(MyContext);
|
const { setMemberGroups, memberGroups, 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");
|
||||||
@ -2244,7 +2244,8 @@ export const Group = ({
|
|||||||
/>
|
/>
|
||||||
Group Mgmt
|
Group Mgmt
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<CustomButton
|
{!isRunningPublicNode && (
|
||||||
|
<CustomButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsOpenBlockedUserModal(true);
|
setIsOpenBlockedUserModal(true);
|
||||||
}}
|
}}
|
||||||
@ -2259,6 +2260,8 @@ export const Group = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</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>
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
@ -6,6 +6,7 @@ import { MyContext } from '../App';
|
|||||||
|
|
||||||
export const WrapperUserAction = ({ children, address, name, disabled }) => {
|
export const WrapperUserAction = ({ children, address, name, disabled }) => {
|
||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
|
const {isRunningPublicNode} = useContext(MyContext)
|
||||||
|
|
||||||
// Handle child element click to open Popover
|
// Handle child element click to open Popover
|
||||||
const handleChildClick = (event) => {
|
const handleChildClick = (event) => {
|
||||||
@ -139,7 +140,10 @@ export const WrapperUserAction = ({ children, address, name, disabled }) => {
|
|||||||
>
|
>
|
||||||
User lookup
|
User lookup
|
||||||
</Button>
|
</Button>
|
||||||
<BlockUser handleClose={handleClose} address={address} name={name} />
|
{!isRunningPublicNode && (
|
||||||
|
<BlockUser handleClose={handleClose} address={address} name={name} />
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user