feat: Portal include Project ID (#47)

This commit is contained in:
Eric Tuvesson
2024-06-28 00:43:34 +02:00
committed by GitHub
parent 8c7d4faeca
commit 618955e1ee

View File

@@ -1,5 +1,6 @@
import { usePluginContext } from '@noodl-contexts/PluginContext';
import React, { RefObject, useEffect, useRef } from 'react';
import React, { RefObject } from 'react';
import { ProjectModel } from '@noodl-models/projectmodel';
import { ActivityIndicator } from '@noodl-core-ui/components/common/ActivityIndicator';
import { BaseDialog } from '@noodl-core-ui/components/layout/BaseDialog';
@@ -62,6 +63,19 @@ export function DeployPopup(props: DeployPopupProps) {
}
function FluxscapeDeployTab() {
// Preview URL: 'http://192.168.0.33:8574/'
return <iframe src="https://portal.fluxscape.io" style={{ width: "100%", height: "50vh", borderStyle: "none" }} />;
const params = {};
const projectId = ProjectModel.instance.id;
if (projectId) {
params['projectId'] = projectId;
}
const urlParams = new URLSearchParams(params);
return (
<iframe
src={`https://portal.fluxscape.io/?${urlParams.toString()}`}
style={{ width: '100%', height: '50vh', borderStyle: 'none' }}
/>
);
}