mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-14 13:52:11 +00:00
block access to video mocap
This commit is contained in:
1 parent
2abe1c1a46
commit
aea0070867
3 files changed
+29
-1
No files matched your search
@@ -824,6 +824,7 @@ class PageContainer extends React.Component<
|
||||
inferenceJobs: this.props.inferenceJobs,
|
||||
inferenceJobsByCategory:
|
||||
this.props.inferenceJobsByCategory,
|
||||
sessionWrapper: this.props.sessionWrapper,
|
||||
}}
|
||||
/>
|
||||
</Route>
|
||||
@@ -1331,6 +1332,7 @@ class PageContainer extends React.Component<
|
||||
this.props.sessionSubscriptionsWrapper,
|
||||
inferenceJobs: this.props.inferenceJobs,
|
||||
inferenceJobsByCategory: this.props.inferenceJobsByCategory,
|
||||
sessionWrapper: this.props.sessionWrapper,
|
||||
}}
|
||||
/>
|
||||
</Route>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { DiscordLink2 } from "@storyteller/components/src/elements/DiscordLink2";
|
||||
import { Container } from "components/common";
|
||||
import PageHeader from "components/layout/PageHeader";
|
||||
import React from "react";
|
||||
|
||||
export function StudioNotAvailable() {
|
||||
const subText = (
|
||||
<p> Please visit our <DiscordLink2 /> to join the wait list. </p>
|
||||
);
|
||||
|
||||
return (
|
||||
<Container type="panel" className="mb-5">
|
||||
<PageHeader
|
||||
title={"Studio Features Not Available"}
|
||||
subText={subText}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
@@ -21,6 +21,8 @@ import {
|
||||
faPersonRays,
|
||||
} from "@fortawesome/pro-solid-svg-icons";
|
||||
import PageHeaderWithImage from "components/layout/PageHeaderWithImage";
|
||||
import { SessionWrapper } from "@storyteller/components/src/session/SessionWrapper";
|
||||
import { StudioNotAvailable } from "v2/view/_common/StudioNotAvailable";
|
||||
|
||||
export default function VideoMotionCapture(props: {
|
||||
enqueueInferenceJob: (
|
||||
@@ -29,8 +31,9 @@ export default function VideoMotionCapture(props: {
|
||||
) => void;
|
||||
inferenceJobs: Array<InferenceJob>;
|
||||
inferenceJobsByCategory: Map<FrontendInferenceJobType, Array<InferenceJob>>;
|
||||
sessionWrapper: SessionWrapper;
|
||||
}) {
|
||||
const { enqueueInferenceJob } = props;
|
||||
const { enqueueInferenceJob, sessionWrapper } = props;
|
||||
const { t } = useLocalize("VideoMotionCapture");
|
||||
const { NO_FILE, FILE_UPLOADING, MOCAPNET_ENQUEUED } = states;
|
||||
const [pageState, dispatchPageState] = useReducer(reducer, {
|
||||
@@ -59,6 +62,10 @@ export default function VideoMotionCapture(props: {
|
||||
}, [pageState, enqueueInferenceJob]);
|
||||
const { pathname } = useLocation();
|
||||
|
||||
if (!sessionWrapper.canAccessStudio()) {
|
||||
return <StudioNotAvailable />
|
||||
}
|
||||
|
||||
if (pathname === `/video-mocap` || pathname === `/video-mocap/`) {
|
||||
return <Redirect to={`/video-mocap/upload`} />;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user