mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
added feature flag checks for /style-video and meida pages
This commit is contained in:
1 parent
b0c3f23f2e
commit
dbc3da4e1f
2 files changed
+6
-6
No files matched your search
@@ -41,7 +41,7 @@ import { EngineMediaPanel } from "./components/EngineMediaPanel/EngineMediaPanel
|
||||
import { GetMediaFileTitle } from "common/GetMediaFileTitle";
|
||||
|
||||
export default function MediaPage() {
|
||||
const { canEditMediaFile, user } = useSession();
|
||||
const { canAccessStudio, canEditMediaFile, user } = useSession();
|
||||
const { token } = useParams<{ token: string }>();
|
||||
const bookmarks = useBookmarks();
|
||||
const ratings = useRatings();
|
||||
@@ -540,7 +540,7 @@ export default function MediaPage() {
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
{mediaFile?.media_type === MediaFileType.Video ? (
|
||||
{ canAccessStudio && mediaFile?.media_type === MediaFileType.Video ? (
|
||||
<Button
|
||||
{...{
|
||||
icon: faArrowRightArrowLeft,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { FrontendInferenceJobType } from "@storyteller/components/src/jobs/InferenceJob";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { useInferenceJobs } from "hooks";
|
||||
import { useInferenceJobs, useSession } from "hooks";
|
||||
import { Button, Container, Panel, TextArea, TempSelect as Select } from "components/common";
|
||||
import { EntityInput } from "components/entities";
|
||||
import {
|
||||
@@ -14,7 +14,7 @@ import { STYLE_OPTIONS } from "common/StyleOptions";
|
||||
|
||||
export default function StyleVideo() {
|
||||
const { mediaToken: pageMediaToken } = useParams<{ mediaToken: string }>();
|
||||
|
||||
const { studioAccessCheck } = useSession();
|
||||
const [style, styleSet] = useState("anime_2d_flat");
|
||||
const [mediaToken, mediaTokenSet] = useState(pageMediaToken || "");
|
||||
const [prompt, promptSet] = useState("");
|
||||
@@ -51,7 +51,7 @@ export default function StyleVideo() {
|
||||
}
|
||||
});
|
||||
|
||||
return <Container {...{ className: "fy-style-video-page mt-5", type: "panel" }}>
|
||||
return studioAccessCheck(<Container {...{ className: "fy-style-video-page mt-5", type: "panel" }}>
|
||||
<Panel {...{ padding: true }}>
|
||||
<header className="d-flex gap-3 flex-wrap">
|
||||
<h1 className="fw-semibold">
|
||||
@@ -94,5 +94,5 @@ export default function StyleVideo() {
|
||||
}} />
|
||||
</div>
|
||||
</Panel>
|
||||
</Container>;
|
||||
</Container>);
|
||||
};
|
||||
Reference in new issue
Block a user