mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-23 04:36:52 +00:00
added wallets embed
This commit is contained in:
@@ -11,11 +11,11 @@ import { useQortalMessageListener } from "./useQortalMessageListener";
|
||||
|
||||
|
||||
|
||||
export const AppViewer = React.forwardRef(({ app , hide, isDevMode}, iframeRef) => {
|
||||
export const AppViewer = React.forwardRef(({ app , hide, isDevMode, skipAuth}, iframeRef) => {
|
||||
const { rootHeight } = useContext(MyContext);
|
||||
// const iframeRef = useRef(null);
|
||||
const { document, window: frameWindow } = useFrame();
|
||||
const {path, history, changeCurrentIndex, resetHistory} = useQortalMessageListener(frameWindow, iframeRef, app?.tabId, isDevMode, app?.name, app?.service)
|
||||
const {path, history, changeCurrentIndex, resetHistory} = useQortalMessageListener(frameWindow, iframeRef, app?.tabId, isDevMode, app?.name, app?.service, skipAuth)
|
||||
const [url, setUrl] = useState('')
|
||||
|
||||
|
||||
|
@@ -3,7 +3,7 @@ import { AppViewer } from './AppViewer';
|
||||
import Frame from 'react-frame-component';
|
||||
import { MyContext, isMobile } from '../../App';
|
||||
|
||||
const AppViewerContainer = React.forwardRef(({ app, isSelected, hide, isDevMode, customHeight }, ref) => {
|
||||
const AppViewerContainer = React.forwardRef(({ app, isSelected, hide, isDevMode, customHeight, skipAuth }, ref) => {
|
||||
const { rootHeight } = useContext(MyContext);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ const AppViewerContainer = React.forwardRef(({ app, isSelected, hide, isDevMode,
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
>
|
||||
<AppViewer app={app} ref={ref} hide={!isSelected || hide} isDevMode={isDevMode} />
|
||||
<AppViewer skipAuth={skipAuth} app={app} ref={ref} hide={!isSelected || hide} isDevMode={isDevMode} />
|
||||
</Frame>
|
||||
);
|
||||
});
|
||||
|
@@ -40,7 +40,8 @@ const officialAppList = [
|
||||
"q-shop",
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"q-manager"
|
||||
"q-manager",
|
||||
"q-wallets"
|
||||
];
|
||||
|
||||
const ScrollerStyled = styled('div')({
|
||||
|
@@ -48,7 +48,8 @@ const officialAppList = [
|
||||
"q-shop",
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"q-manager"
|
||||
"q-manager",
|
||||
"q-wallets"
|
||||
];
|
||||
|
||||
const ScrollerStyled = styled("div")({
|
||||
|
@@ -42,7 +42,8 @@ const officialAppList = [
|
||||
"q-shop",
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"q-manager"
|
||||
"q-manager",
|
||||
"q-wallets"
|
||||
];
|
||||
|
||||
const ScrollerStyled = styled('div')({
|
||||
|
@@ -58,7 +58,8 @@ const officialAppList = [
|
||||
"q-trade",
|
||||
"q-support",
|
||||
"q-manager",
|
||||
"q-mintership"
|
||||
"q-mintership",
|
||||
"q-wallets"
|
||||
];
|
||||
|
||||
const ScrollerStyled = styled("div")({
|
||||
|
@@ -507,7 +507,7 @@ export const UIQortalRequests = [
|
||||
return obj; // Updated object with references to stored files
|
||||
}
|
||||
|
||||
export const useQortalMessageListener = (frameWindow, iframeRef, tabId, isDevMode, appName, appService) => {
|
||||
export const useQortalMessageListener = (frameWindow, iframeRef, tabId, isDevMode, appName, appService, skipAuth) => {
|
||||
const [path, setPath] = useState('')
|
||||
const [history, setHistory] = useState({
|
||||
customQDNHistoryPaths: [],
|
||||
@@ -564,7 +564,7 @@ isDOMContentLoaded: false
|
||||
const sendMessageToRuntime = (message, eventPort) => {
|
||||
window.sendMessage(message.action, message.payload, 300000, message.isExtension, {
|
||||
name: appName, service: appService
|
||||
})
|
||||
}, skipAuth)
|
||||
.then((response) => {
|
||||
if (response.error) {
|
||||
eventPort.postMessage({
|
||||
@@ -633,6 +633,8 @@ isDOMContentLoaded: false
|
||||
window.sendMessage("addEnteredQmailTimestamp").catch((error) => {
|
||||
// error
|
||||
});
|
||||
} else if(appName?.toLowerCase() === 'q-wallets'){
|
||||
executeEvent('setLastEnteredTimestampPaymentEvent', {})
|
||||
}
|
||||
} else if(event?.data?.action === 'NAVIGATION_HISTORY'){
|
||||
if(event?.data?.payload?.isDOMContentLoaded){
|
||||
|
Reference in New Issue
Block a user