mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-03-31 01:35:54 +00:00
add hide to seedphrase
This commit is contained in:
parent
3e261e6d05
commit
e3d7d71c52
14
src/App.tsx
14
src/App.tsx
@ -392,6 +392,7 @@ function App() {
|
|||||||
const [authenticatedMode, setAuthenticatedMode] = useState("qort");
|
const [authenticatedMode, setAuthenticatedMode] = useState("qort");
|
||||||
const [requestAuthentication, setRequestAuthentication] = useState<any>(null);
|
const [requestAuthentication, setRequestAuthentication] = useState<any>(null);
|
||||||
const [isOpenDrawerLookup, setIsOpenDrawerLookup] = useState(false)
|
const [isOpenDrawerLookup, setIsOpenDrawerLookup] = useState(false)
|
||||||
|
const [isRunningPublicNode, setIsRunningPublicNode] = useState(false)
|
||||||
|
|
||||||
const [userInfo, setUserInfo] = useState<any>(null);
|
const [userInfo, setUserInfo] = useState<any>(null);
|
||||||
const [balance, setBalance] = useState<any>(null);
|
const [balance, setBalance] = useState<any>(null);
|
||||||
@ -591,6 +592,16 @@ function App() {
|
|||||||
const handleSetGlobalApikey = (key) => {
|
const handleSetGlobalApikey = (key) => {
|
||||||
globalApiKey = key;
|
globalApiKey = key;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(()=> {
|
||||||
|
isRunningGateway().then((res)=> {
|
||||||
|
setIsRunningPublicNode(res)
|
||||||
|
}).catch((error)=> {
|
||||||
|
console.error(error)
|
||||||
|
})
|
||||||
|
}, [extState])
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
@ -1879,7 +1890,8 @@ function App() {
|
|||||||
isUserBlocked,
|
isUserBlocked,
|
||||||
addToBlockList,
|
addToBlockList,
|
||||||
removeBlockFromList,
|
removeBlockFromList,
|
||||||
getAllBlockedUsers
|
getAllBlockedUsers,
|
||||||
|
isRunningPublicNode
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
@ -367,10 +367,15 @@ 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"
|
||||||
|
id="standard-adornment-password"
|
||||||
value={seedValue}
|
value={seedValue}
|
||||||
onChange={(e) => setSeedValue(e.target.value)}
|
onChange={(e) => setSeedValue(e.target.value)}
|
||||||
|
autoComplete="off"
|
||||||
|
sx={{
|
||||||
|
width: '100%'
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<Spacer height="7px" />
|
<Spacer height="7px" />
|
||||||
|
|
||||||
@ -380,6 +385,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>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
@ -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-Manager',
|
name: 'Q-Manager',
|
||||||
service: 'APP'
|
service: 'APP'
|
||||||
|
@ -617,7 +617,7 @@ const handleNotification = async (groups) => {
|
|||||||
|
|
||||||
let mutedGroups = (await getUserSettings({ key: "mutedGroups" })) || [];
|
let mutedGroups = (await getUserSettings({ key: "mutedGroups" })) || [];
|
||||||
if (!isArray(mutedGroups)) mutedGroups = [];
|
if (!isArray(mutedGroups)) mutedGroups = [];
|
||||||
|
mutedGroups.push('0')
|
||||||
let isFocused;
|
let isFocused;
|
||||||
const data = groups.filter(
|
const data = groups.filter(
|
||||||
(group) =>
|
(group) =>
|
||||||
@ -3068,10 +3068,17 @@ const checkGroupList = async () => {
|
|||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
|
||||||
|
|
||||||
const filteredGroups =
|
const data = await response.json();
|
||||||
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(
|
const sortedGroups = filteredGroups.sort(
|
||||||
(a, b) => (b.timestamp || 0) - (a.timestamp || 0)
|
(a, b) => (b.timestamp || 0) - (a.timestamp || 0)
|
||||||
);
|
);
|
||||||
@ -3098,6 +3105,7 @@ export const checkNewMessages = async () => {
|
|||||||
try {
|
try {
|
||||||
let mutedGroups = await getUserSettings({key: 'mutedGroups'}) || []
|
let mutedGroups = await getUserSettings({key: 'mutedGroups'}) || []
|
||||||
if(!isArray(mutedGroups)) mutedGroups = []
|
if(!isArray(mutedGroups)) mutedGroups = []
|
||||||
|
mutedGroups.push('0')
|
||||||
let myName = "";
|
let myName = "";
|
||||||
const userData = await getUserInfo();
|
const userData = await getUserInfo();
|
||||||
if (userData?.name) {
|
if (userData?.name) {
|
||||||
|
@ -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,7 +44,6 @@ const officialAppList = [
|
|||||||
"q-share",
|
"q-share",
|
||||||
"q-support",
|
"q-support",
|
||||||
"q-mail",
|
"q-mail",
|
||||||
"qombo",
|
|
||||||
"q-fund",
|
"q-fund",
|
||||||
"q-shop",
|
"q-shop",
|
||||||
"q-manager"
|
"q-manager"
|
||||||
|
@ -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",
|
|
||||||
"q-manager",
|
"q-manager",
|
||||||
"q-mintership"
|
"q-mintership"
|
||||||
];
|
];
|
||||||
|
@ -52,7 +52,6 @@ const officialAppList = [
|
|||||||
"q-share",
|
"q-share",
|
||||||
"q-support",
|
"q-support",
|
||||||
"q-mail",
|
"q-mail",
|
||||||
"qombo",
|
|
||||||
"q-fund",
|
"q-fund",
|
||||||
"q-shop",
|
"q-shop",
|
||||||
"q-manager",
|
"q-manager",
|
||||||
|
@ -201,7 +201,7 @@ const onSeenFunc = useCallback(()=> {
|
|||||||
disableFocusListener
|
disableFocusListener
|
||||||
disableHoverListener
|
disableHoverListener
|
||||||
disableTouchListener
|
disableTouchListener
|
||||||
title={`level ${userInfo?.level}`}
|
title={`level ${userInfo ?? 0}`}
|
||||||
slotProps={{
|
slotProps={{
|
||||||
popper: {
|
popper: {
|
||||||
disablePortal: true,
|
disablePortal: true,
|
||||||
@ -210,7 +210,7 @@ const onSeenFunc = useCallback(()=> {
|
|||||||
>
|
>
|
||||||
|
|
||||||
<img onClick={handleTooltipOpen} style={{
|
<img onClick={handleTooltipOpen} style={{
|
||||||
visibility: userInfo?.level !== undefined ? 'visible' : 'hidden',
|
visibility: 'visible',
|
||||||
width: '30px',
|
width: '30px',
|
||||||
height: 'auto'
|
height: 'auto'
|
||||||
}} src={getBadgeImg(userInfo)} />
|
}} src={getBadgeImg(userInfo)} />
|
||||||
|
@ -466,7 +466,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");
|
||||||
@ -2148,6 +2148,7 @@ export const Group = ({
|
|||||||
/>
|
/>
|
||||||
Group Mgmt
|
Group Mgmt
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
{!isRunningPublicNode && (
|
||||||
<CustomButton
|
<CustomButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsOpenBlockedUserModal(true);
|
setIsOpenBlockedUserModal(true);
|
||||||
@ -2163,6 +2164,8 @@ export const Group = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
)}
|
||||||
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{chatMode === "directs" && (
|
{chatMode === "directs" && (
|
||||||
|
@ -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) => {
|
||||||
@ -137,7 +138,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