mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-24 10:41:24 +00:00
fixes
This commit is contained in:
@@ -301,7 +301,6 @@ export const AppsDesktop = ({ mode, setMode, show , myName, goToHome, setDesktop
|
||||
};
|
||||
}, [tabs]);
|
||||
|
||||
|
||||
return (
|
||||
<AppsParent
|
||||
sx={{
|
||||
@@ -425,7 +424,7 @@ export const AppsDesktop = ({ mode, setMode, show , myName, goToHome, setDesktop
|
||||
</ButtonBase>
|
||||
)}
|
||||
{mode !== 'home' && (
|
||||
<AppsNavBarDesktop />
|
||||
<AppsNavBarDesktop disableBack={isNewTabWindow && mode === 'viewer'} />
|
||||
|
||||
)}
|
||||
|
||||
|
@@ -63,7 +63,7 @@ export function saveToLocalStorage(key, subKey, newValue) {
|
||||
}
|
||||
}
|
||||
|
||||
export const AppsNavBarDesktop = () => {
|
||||
export const AppsNavBarDesktop = ({disableBack}) => {
|
||||
const [tabs, setTabs] = useState([]);
|
||||
const [selectedTab, setSelectedTab] = useState(null);
|
||||
const [navigationController, setNavigationController] = useRecoilState(navigationControllerAtom)
|
||||
@@ -107,10 +107,11 @@ export const AppsNavBarDesktop = () => {
|
||||
|
||||
|
||||
const isDisableBackButton = useMemo(()=> {
|
||||
if(disableBack) return true
|
||||
if(selectedTab && navigationController[selectedTab?.tabId]?.hasBack) return false
|
||||
if(selectedTab && !navigationController[selectedTab?.tabId]?.hasBack) return true
|
||||
return false
|
||||
}, [navigationController, selectedTab])
|
||||
}, [navigationController, selectedTab, disableBack])
|
||||
|
||||
|
||||
|
||||
|
@@ -481,7 +481,7 @@ isDOMContentLoaded: false
|
||||
} else if (
|
||||
event?.data?.action === 'PUBLISH_MULTIPLE_QDN_RESOURCES' ||
|
||||
event?.data?.action === 'PUBLISH_QDN_RESOURCE' ||
|
||||
event?.data?.action === 'ENCRYPT_DATA' || event?.data?.action === 'ENCRYPT_DATA_WITH_SHARING_KEY' || 'ENCRYPT_QORTAL_GROUP_DATA'
|
||||
event?.data?.action === 'ENCRYPT_DATA' || event?.data?.action === 'ENCRYPT_DATA_WITH_SHARING_KEY' || event?.data?.action === 'ENCRYPT_QORTAL_GROUP_DATA'
|
||||
|
||||
) {
|
||||
let data;
|
||||
|
@@ -28,6 +28,7 @@ import DownloadIcon from "@mui/icons-material/Download";
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
import { useSetRecoilState } from "recoil";
|
||||
import { blobControllerAtom } from "../../atoms/global";
|
||||
import { decodeIfEncoded } from "../../utils/decode";
|
||||
|
||||
|
||||
export const AttachmentCard = ({
|
||||
@@ -181,7 +182,7 @@ export const AttachmentCard = ({
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
Created by {owner}
|
||||
Created by {decodeIfEncoded(owner)}
|
||||
</Typography>
|
||||
<Typography
|
||||
sx={{
|
||||
|
@@ -14,6 +14,7 @@ import { parseQortalLink } from "./embed-utils";
|
||||
import { PollCard } from "./PollEmbed";
|
||||
import { ImageCard } from "./ImageEmbed";
|
||||
import { AttachmentCard } from "./AttachmentEmbed";
|
||||
import { decodeIfEncoded } from "../../utils/decode";
|
||||
|
||||
const getPoll = async (name) => {
|
||||
const pollName = name;
|
||||
|
@@ -17,6 +17,7 @@ import OpenInNewIcon from "@mui/icons-material/OpenInNew";
|
||||
import { CustomLoader } from "../../common/CustomLoader";
|
||||
import ImageIcon from "@mui/icons-material/Image";
|
||||
import CloseIcon from "@mui/icons-material/Close";
|
||||
import { decodeIfEncoded } from "../../utils/decode";
|
||||
|
||||
export const ImageCard = ({
|
||||
image,
|
||||
@@ -37,11 +38,11 @@ export const ImageCard = ({
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
useEffect(()=> {
|
||||
if(errorMsg){
|
||||
setHeight('300px')
|
||||
}
|
||||
}, [errorMsg])
|
||||
// useEffect(()=> {
|
||||
// if(errorMsg){
|
||||
// setHeight('300px')
|
||||
// }
|
||||
// }, [errorMsg])
|
||||
|
||||
return (
|
||||
<Card
|
||||
@@ -113,7 +114,7 @@ export const ImageCard = ({
|
||||
color: "white",
|
||||
}}
|
||||
>
|
||||
Created by {owner}
|
||||
Created by {decodeIfEncoded(owner)}
|
||||
</Typography>
|
||||
<Typography
|
||||
sx={{
|
||||
|
@@ -99,6 +99,7 @@ import { formatEmailDate } from "./QMailMessages";
|
||||
import { AdminSpace } from "../Chat/AdminSpace";
|
||||
import { useSetRecoilState } from "recoil";
|
||||
import { selectedGroupIdAtom } from "../../atoms/global";
|
||||
import { sortArrayByTimestampAndGroupName } from "../../utils/time";
|
||||
|
||||
// let touchStartY = 0;
|
||||
// let disablePullToRefresh = false;
|
||||
@@ -121,6 +122,13 @@ import { selectedGroupIdAtom } from "../../atoms/global";
|
||||
// }
|
||||
// });
|
||||
|
||||
const isWithinLast15Minutes = (timestamp) => {
|
||||
const now = Date.now(); // Current timestamp in milliseconds
|
||||
const fifteenMinutes = 15 * 60 * 1000; // 15 minutes in milliseconds
|
||||
|
||||
return now - timestamp < fifteenMinutes;
|
||||
};
|
||||
|
||||
export const getPublishesFromAdmins = async (admins: string[], groupId) => {
|
||||
// const validApi = await findUsableApi();
|
||||
const queryString = admins.map((name) => `name=${name}`).join("&");
|
||||
@@ -909,7 +917,7 @@ export const Group = ({
|
||||
if (message?.action === "SET_GROUPS") {
|
||||
|
||||
// Update the component state with the received 'sendqort' state
|
||||
setGroups(message.payload);
|
||||
setGroups(sortArrayByTimestampAndGroupName(message.payload));
|
||||
getLatestRegularChat(message.payload);
|
||||
setMemberGroups(message.payload);
|
||||
|
||||
|
Reference in New Issue
Block a user