feat: add export option to deploy dropdown (#8221)
Added export flow into deploy dropdown
This commit is contained in:
parent
d88abdd658
commit
8641417293
1 changed files with 15 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ import { ENABLE_PUBLISH, ENABLE_WIDGET } from "@/customization/feature-flags";
|
||||||
import { customMcpOpen } from "@/customization/utils/custom-mcp-open";
|
import { customMcpOpen } from "@/customization/utils/custom-mcp-open";
|
||||||
import ApiModal from "@/modals/apiModal";
|
import ApiModal from "@/modals/apiModal";
|
||||||
import EmbedModal from "@/modals/EmbedModal/embed-modal";
|
import EmbedModal from "@/modals/EmbedModal/embed-modal";
|
||||||
|
import ExportModal from "@/modals/exportModal";
|
||||||
import useAlertStore from "@/stores/alertStore";
|
import useAlertStore from "@/stores/alertStore";
|
||||||
import useAuthStore from "@/stores/authStore";
|
import useAuthStore from "@/stores/authStore";
|
||||||
import useFlowsManagerStore from "@/stores/flowsManagerStore";
|
import useFlowsManagerStore from "@/stores/flowsManagerStore";
|
||||||
|
|
@ -39,6 +40,7 @@ export default function PublishDropdown() {
|
||||||
const hasIO = useFlowStore((state) => state.hasIO);
|
const hasIO = useFlowStore((state) => state.hasIO);
|
||||||
const isAuth = useAuthStore((state) => !!state.autoLogin);
|
const isAuth = useAuthStore((state) => !!state.autoLogin);
|
||||||
const [openApiModal, setOpenApiModal] = useState(false);
|
const [openApiModal, setOpenApiModal] = useState(false);
|
||||||
|
const [openExportModal, setOpenExportModal] = useState(false);
|
||||||
|
|
||||||
const handlePublishedSwitch = async (checked: boolean) => {
|
const handlePublishedSwitch = async (checked: boolean) => {
|
||||||
mutateAsync(
|
mutateAsync(
|
||||||
|
|
@ -116,6 +118,18 @@ export default function PublishDropdown() {
|
||||||
<span>API access</span>
|
<span>API access</span>
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem
|
||||||
|
className="deploy-dropdown-item group"
|
||||||
|
onClick={() => setOpenExportModal(true)}
|
||||||
|
>
|
||||||
|
<div className="group-hover:bg-accent">
|
||||||
|
<IconComponent
|
||||||
|
name="Download"
|
||||||
|
className={`${groupStyle} icon-size mr-2`}
|
||||||
|
/>
|
||||||
|
<span>Export</span>
|
||||||
|
</div>
|
||||||
|
</DropdownMenuItem>
|
||||||
<CustomLink
|
<CustomLink
|
||||||
className={cn("flex-1")}
|
className={cn("flex-1")}
|
||||||
to={`/mcp/folder/${folderId}`}
|
to={`/mcp/folder/${folderId}`}
|
||||||
|
|
@ -229,6 +243,7 @@ export default function PublishDropdown() {
|
||||||
tweaksBuildedObject={{}}
|
tweaksBuildedObject={{}}
|
||||||
activeTweaks={false}
|
activeTweaks={false}
|
||||||
></EmbedModal>
|
></EmbedModal>
|
||||||
|
<ExportModal open={openExportModal} setOpen={setOpenExportModal} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue