add hide to seedphrase

This commit is contained in:
PhilReact 2025-03-05 02:19:25 +02:00
parent 3e261e6d05
commit e3d7d71c52
11 changed files with 61 additions and 39 deletions

View File

@ -392,6 +392,7 @@ function App() {
const [authenticatedMode, setAuthenticatedMode] = useState("qort");
const [requestAuthentication, setRequestAuthentication] = useState<any>(null);
const [isOpenDrawerLookup, setIsOpenDrawerLookup] = useState(false)
const [isRunningPublicNode, setIsRunningPublicNode] = useState(false)
const [userInfo, setUserInfo] = useState<any>(null);
const [balance, setBalance] = useState<any>(null);
@ -591,6 +592,16 @@ function App() {
const handleSetGlobalApikey = (key) => {
globalApiKey = key;
};
useEffect(()=> {
isRunningGateway().then((res)=> {
setIsRunningPublicNode(res)
}).catch((error)=> {
console.error(error)
})
}, [extState])
useEffect(() => {
try {
setIsLoading(true);
@ -1879,7 +1890,8 @@ function App() {
isUserBlocked,
addToBlockList,
removeBlockFromList,
getAllBlockedUsers
getAllBlockedUsers,
isRunningPublicNode
}}
>
<Box

View File

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

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-Manager',
service: 'APP'

View File

@ -617,7 +617,7 @@ const handleNotification = async (groups) => {
let mutedGroups = (await getUserSettings({ key: "mutedGroups" })) || [];
if (!isArray(mutedGroups)) mutedGroups = [];
mutedGroups.push('0')
let isFocused;
const data = groups.filter(
(group) =>
@ -3068,10 +3068,17 @@ const checkGroupList = async () => {
"Content-Type": "application/json",
},
});
const data = await response.json();
const filteredGroups =
data.groups?.filter((item) => item?.groupId !== 0) || [];
const data = await response.json();
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)
);
@ -3098,6 +3105,7 @@ export const checkNewMessages = async () => {
try {
let mutedGroups = await getUserSettings({key: 'mutedGroups'}) || []
if(!isArray(mutedGroups)) mutedGroups = []
mutedGroups.push('0')
let myName = "";
const userData = await getUserInfo();
if (userData?.name) {

View File

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

View File

@ -44,7 +44,6 @@ const officialAppList = [
"q-share",
"q-support",
"q-mail",
"qombo",
"q-fund",
"q-shop",
"q-manager"

View File

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

View File

@ -52,7 +52,6 @@ const officialAppList = [
"q-share",
"q-support",
"q-mail",
"qombo",
"q-fund",
"q-shop",
"q-manager",

View File

@ -201,7 +201,7 @@ const onSeenFunc = useCallback(()=> {
disableFocusListener
disableHoverListener
disableTouchListener
title={`level ${userInfo?.level}`}
title={`level ${userInfo ?? 0}`}
slotProps={{
popper: {
disablePortal: true,
@ -210,7 +210,7 @@ const onSeenFunc = useCallback(()=> {
>
<img onClick={handleTooltipOpen} style={{
visibility: userInfo?.level !== undefined ? 'visible' : 'hidden',
visibility: 'visible',
width: '30px',
height: 'auto'
}} src={getBadgeImg(userInfo)} />

View File

@ -466,7 +466,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");
@ -2148,21 +2148,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" && (

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) => {
@ -137,7 +138,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>
</>