diff --git a/src/App.tsx b/src/App.tsx index 6f46c02..83bb60f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -392,6 +392,7 @@ function App() { const [authenticatedMode, setAuthenticatedMode] = useState("qort"); const [requestAuthentication, setRequestAuthentication] = useState(null); const [isOpenDrawerLookup, setIsOpenDrawerLookup] = useState(false) + const [isRunningPublicNode, setIsRunningPublicNode] = useState(false) const [userInfo, setUserInfo] = useState(null); const [balance, setBalance] = useState(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 }} > { /> - setSeedValue(e.target.value)} + autoComplete="off" + sx={{ + width: '100%' + }} /> @@ -380,6 +385,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => { value={password} onChange={(e) => setPassword(e.target.value)} autoComplete="off" + sx={{ + width: '100%' + }} /> diff --git a/src/atoms/global.ts b/src/atoms/global.ts index fc79ff1..28462fb 100644 --- a/src/atoms/global.ts +++ b/src/atoms/global.ts @@ -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' diff --git a/src/background.ts b/src/background.ts index 7d79f1d..07f3bdc 100644 --- a/src/background.ts +++ b/src/background.ts @@ -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) { diff --git a/src/components/Apps/AppsCategory.tsx b/src/components/Apps/AppsCategory.tsx index 53bcf04..b3aff55 100644 --- a/src/components/Apps/AppsCategory.tsx +++ b/src/components/Apps/AppsCategory.tsx @@ -36,12 +36,10 @@ const officialAppList = [ "q-share", "q-support", "q-mail", - "qombo", "q-fund", "q-shop", "q-trade", "q-support", - "nodeinfo", "q-manager" ]; diff --git a/src/components/Apps/AppsCategoryDesktop.tsx b/src/components/Apps/AppsCategoryDesktop.tsx index 02ff7cd..63e535c 100644 --- a/src/components/Apps/AppsCategoryDesktop.tsx +++ b/src/components/Apps/AppsCategoryDesktop.tsx @@ -44,7 +44,6 @@ const officialAppList = [ "q-share", "q-support", "q-mail", - "qombo", "q-fund", "q-shop", "q-manager" diff --git a/src/components/Apps/AppsLibrary.tsx b/src/components/Apps/AppsLibrary.tsx index 8c7d68a..9365263 100644 --- a/src/components/Apps/AppsLibrary.tsx +++ b/src/components/Apps/AppsLibrary.tsx @@ -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" ]; diff --git a/src/components/Apps/AppsLibraryDesktop.tsx b/src/components/Apps/AppsLibraryDesktop.tsx index 317a87f..6cf511d 100644 --- a/src/components/Apps/AppsLibraryDesktop.tsx +++ b/src/components/Apps/AppsLibraryDesktop.tsx @@ -52,7 +52,6 @@ const officialAppList = [ "q-share", "q-support", "q-mail", - "qombo", "q-fund", "q-shop", "q-manager", diff --git a/src/components/Chat/MessageItem.tsx b/src/components/Chat/MessageItem.tsx index e7644b6..32f6ed5 100644 --- a/src/components/Chat/MessageItem.tsx +++ b/src/components/Chat/MessageItem.tsx @@ -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(()=> { > diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx index 8ce4459..1e599c1 100644 --- a/src/components/Group/Group.tsx +++ b/src/components/Group/Group.tsx @@ -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); const [timestampEnterData, setTimestampEnterData] = useState({}); const [chatMode, setChatMode] = useState("groups"); @@ -2148,21 +2148,24 @@ export const Group = ({ /> Group Mgmt - { - setIsOpenBlockedUserModal(true); - }} - sx={{ - minWidth: 'unset', - padding: '10px' - }} - > - - + {!isRunningPublicNode && ( + { + setIsOpenBlockedUserModal(true); + }} + sx={{ + minWidth: 'unset', + padding: '10px' + }} + > + + + )} + )} {chatMode === "directs" && ( diff --git a/src/components/WrapperUserAction.tsx b/src/components/WrapperUserAction.tsx index 8dde696..ab63cad 100644 --- a/src/components/WrapperUserAction.tsx +++ b/src/components/WrapperUserAction.tsx @@ -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 - + {!isRunningPublicNode && ( + + )} +