mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-13 21:32:18 +00:00
4 files changed
+192
No files matched your search
@@ -60,6 +60,7 @@
|
||||
"react-dom": "^16.13.1",
|
||||
"react-drag-drop-files": "^2.3.9",
|
||||
"react-i18next": "^11.15.4",
|
||||
"react-iframe": "^1.8.5",
|
||||
"react-infinite-scroll-component": "^6.1.0",
|
||||
"react-paginate": "^8.2.0",
|
||||
"react-range": "^1.8.14",
|
||||
|
||||
@@ -84,6 +84,7 @@ import { GenerateSpeechPage } from "./pages/generate_speech/GenerateSpeechPage";
|
||||
import VcModelViewPage from "./pages/vc/vc_model_view/VcModelViewPage";
|
||||
import VcModelEditPage from "./pages/vc/vc_model_edit/VcModelEditPage";
|
||||
import VcModelDeletePage from "./pages/vc/vc_model_delete/VcModelDeletePage";
|
||||
import { StorytellerStudioListPage } from "./pages/storyteller_studio/vc_model_list/StorytellerStudioListPage";
|
||||
import TopNav from "components/layout/TopNav/TopNav";
|
||||
import SideNav from "components/layout/SideNav/SideNav";
|
||||
import MobileMenu from "components/layout/MobileMenu/MobileMenu";
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
import React, { useState, useEffect, useCallback } from "react";
|
||||
import { SessionWrapper } from "@storyteller/components/src/session/SessionWrapper";
|
||||
import Iframe from "react-iframe";
|
||||
|
||||
import { SessionSubscriptionsWrapper } from "@storyteller/components/src/session/SessionSubscriptionsWrapper";
|
||||
import { SsPageHero } from "./components/SsPageHero";
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper;
|
||||
sessionSubscriptionsWrapper: SessionSubscriptionsWrapper;
|
||||
}
|
||||
|
||||
function StorytellerStudioListPage(props: Props) {
|
||||
return (
|
||||
<div>
|
||||
<SsPageHero
|
||||
sessionWrapper={props.sessionWrapper}
|
||||
sessionSubscriptionsWrapper={props.sessionSubscriptionsWrapper}
|
||||
/>
|
||||
|
||||
<div className="container">
|
||||
<Iframe
|
||||
url="https://engine.fakeyou.com?mode=studio"
|
||||
width="100%"
|
||||
height="900px"
|
||||
id=""
|
||||
className=""
|
||||
display="block"
|
||||
position="relative"
|
||||
/>
|
||||
{/* <div className="alert alert-info">
|
||||
<FontAwesomeIcon icon={faMoneyBill} className="me-2" />
|
||||
<span className="fw-medium">
|
||||
Get rewarded from our $15k prize pool for creating Voice to Voice
|
||||
models!
|
||||
</span>
|
||||
<Link to="/commissions" className="fw-semibold ms-2">
|
||||
See details <FontAwesomeIcon icon={faArrowRight} className="ms-1" />
|
||||
</Link>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const LoadingIcon: React.FC = () => {
|
||||
return (
|
||||
<>
|
||||
<span
|
||||
className="spinner-border spinner-border-sm ms-3"
|
||||
role="status"
|
||||
aria-hidden="true"
|
||||
></span>
|
||||
<span className="visually-hidden">Loading...</span>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export { StorytellerStudioListPage };
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
import React, { useMemo } from "react";
|
||||
import { SessionWrapper } from "@storyteller/components/src/session/SessionWrapper";
|
||||
import { SessionSubscriptionsWrapper } from "@storyteller/components/src/session/SessionSubscriptionsWrapper";
|
||||
import { Link } from "react-router-dom";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import {
|
||||
faStar,
|
||||
faUser,
|
||||
faArrowRight,
|
||||
faMicrophoneStand,
|
||||
} from "@fortawesome/pro-solid-svg-icons";
|
||||
import { Analytics } from "../../../../../../common/Analytics";
|
||||
import { WebUrl } from "../../../../../../common/WebUrl";
|
||||
import { PageHeaderWithImage } from "../../../../_common/PageHeaderWithImage";
|
||||
import { useLocalize } from "hooks";
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper;
|
||||
sessionSubscriptionsWrapper: SessionSubscriptionsWrapper;
|
||||
}
|
||||
|
||||
export function SsPageHero(props: Props) {
|
||||
const { t } = useLocalize("VcModelListPage");
|
||||
const randomImage = useMemo(() => {
|
||||
const images = ["mascot/may4th.webp"];
|
||||
|
||||
return images[Math.floor(Math.random() * images.length)];
|
||||
}, []);
|
||||
|
||||
let signUpButton = <></>;
|
||||
let viewPricingButton = <></>;
|
||||
let upgradeButton = <></>;
|
||||
let myProfileButton = <></>;
|
||||
|
||||
if (!props.sessionWrapper.isLoggedIn()) {
|
||||
signUpButton = (
|
||||
<>
|
||||
<Link
|
||||
to="/signup"
|
||||
onClick={() => {
|
||||
Analytics.ttsClickHeroSignup();
|
||||
}}
|
||||
>
|
||||
<button type="button" className="btn btn-primary w-100">
|
||||
{t("heroButtonSignUp")}
|
||||
<FontAwesomeIcon icon={faArrowRight} className="ms-2" />
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
viewPricingButton = (
|
||||
<>
|
||||
<Link
|
||||
to={WebUrl.pricingPageWithReferer("tts_hero_new")}
|
||||
onClick={() => {
|
||||
Analytics.ttsClickHeroViewPricing();
|
||||
}}
|
||||
>
|
||||
<button type="button" className="btn btn-secondary w-100">
|
||||
<FontAwesomeIcon icon={faStar} className="me-2" />
|
||||
{t("heroButtonPricing")}
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
if (props.sessionWrapper.isLoggedIn()) {
|
||||
let displayName = props.sessionWrapper.getDisplayName() as string; // NB: If logged in, should be string
|
||||
let url = WebUrl.userProfilePage(displayName);
|
||||
myProfileButton = (
|
||||
<>
|
||||
<Link
|
||||
to={url}
|
||||
onClick={() => {
|
||||
Analytics.ttsClickHeroViewProfile();
|
||||
}}
|
||||
>
|
||||
<button type="button" className="btn btn-secondary w-100">
|
||||
<FontAwesomeIcon icon={faUser} className="me-2" />
|
||||
{t("heroButtonProfile")}
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
if (!props.sessionSubscriptionsWrapper.hasPaidFeatures()) {
|
||||
upgradeButton = (
|
||||
<>
|
||||
<Link
|
||||
to={WebUrl.pricingPageWithReferer("tts_hero_user")}
|
||||
onClick={() => {
|
||||
Analytics.ttsClickHeroUpgradePlan();
|
||||
}}
|
||||
>
|
||||
<button type="button" className="btn btn-primary w-100">
|
||||
<FontAwesomeIcon icon={faStar} className="me-2" />
|
||||
{t("heroButtonUpgradePlan")}
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const titleIcon = (
|
||||
<FontAwesomeIcon icon={faMicrophoneStand} className="me-3 me-lg-4" />
|
||||
);
|
||||
const title = <>Storyteller Studio</>;
|
||||
const subText = <>Anyone can make films.</>;
|
||||
const actionButtons = (
|
||||
<>
|
||||
{upgradeButton}
|
||||
{signUpButton}
|
||||
{viewPricingButton}
|
||||
{myProfileButton}
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageHeaderWithImage
|
||||
headerImage={randomImage}
|
||||
titleIcon={titleIcon}
|
||||
title={title}
|
||||
subText={subText}
|
||||
showButtons={true}
|
||||
actionButtons={actionButtons}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user