diff --git a/frontend/libs/components/settings-modal/src/lib/panes/AccountSettingsPane.tsx b/frontend/libs/components/settings-modal/src/lib/panes/AccountSettingsPane.tsx new file mode 100644 index 0000000000..0a0badc749 --- /dev/null +++ b/frontend/libs/components/settings-modal/src/lib/panes/AccountSettingsPane.tsx @@ -0,0 +1,87 @@ +import { useState } from "react"; +import { Button } from "@storyteller/ui-button"; +import { Input } from "@storyteller/ui-input"; + +interface AccountInfo { + username: string; + subscription: string; + credits: number; +} + +export const AccountSettingsPane = () => { + const [accountInfo] = useState({ + username: "Username [logout]", + subscription: "Pro-tier [change/upgrade]", + credits: 10233, + }); + + const [palApiKey, setPalApiKey] = useState(""); + const [klingApiKey, setKlingApiKey] = useState(""); + + return ( +
+
+ ArtCraft Account: + {accountInfo.username} +
+
+ ArtCraft Subscription: + {accountInfo.subscription} +
+
+ Credits Remaining: + {accountInfo.credits} +
+ +
+

+ Note: You can optionally log into other accounts and use your credits + at those providers. Some features are only available via 3rd party + accounts, such as OpenAI / Sora GPT 4.0 Images. For other features, + ArtCraft credits are consumed unless you log into your third party + account. +

+
+ +
+ OpenAI / Sora Account: + +
+
+ Google / Veo Account: + +
+ +
+
+ + setPalApiKey((e.target as any).value)} + placeholder="Enter API Key" + /> +
+
+ + setKlingApiKey((e.target as any).value)} + placeholder="Enter API Key" + /> +
+
+
+ ); +}; diff --git a/frontend/libs/components/settings-modal/src/lib/panes/VideoSettingsPane.tsx b/frontend/libs/components/settings-modal/src/lib/panes/VideoSettingsPane.tsx new file mode 100644 index 0000000000..7148143036 --- /dev/null +++ b/frontend/libs/components/settings-modal/src/lib/panes/VideoSettingsPane.tsx @@ -0,0 +1,40 @@ +import { Select, SelectValue } from "@storyteller/ui-select"; +import { useState } from "react"; + +export const VideoSettingsPane = () => { + const [defaultVideoModel, setDefaultVideoModel] = useState("veo"); + const [humanVideoProvider, setHumanVideoProvider] = useState("artcraft"); + + return ( +
+
+ + setHumanVideoProvider(val as string)} + options={[ + { value: "artcraft", label: "ArtCraft" }, + { value: "pal", label: "Pal" }, + ]} + /> +
+
+ ); +}; diff --git a/frontend/libs/components/settings-modal/src/lib/settings-modal.tsx b/frontend/libs/components/settings-modal/src/lib/settings-modal.tsx index 72968457ef..39d5e764c7 100644 --- a/frontend/libs/components/settings-modal/src/lib/settings-modal.tsx +++ b/frontend/libs/components/settings-modal/src/lib/settings-modal.tsx @@ -1,5 +1,4 @@ import { Modal } from "@storyteller/ui-modal"; -import { Button } from "@storyteller/ui-button"; import { useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { @@ -10,39 +9,22 @@ import { faVolumeHigh, } from "@fortawesome/pro-solid-svg-icons"; import { twMerge } from "tailwind-merge"; -import { Input } from "@storyteller/ui-input"; -import { Select, SelectValue } from "@storyteller/ui-select"; import { MiscSettingsPane } from "./panes/MiscSettingsPane"; import { AudioSettingsPane } from "./panes/AudioSettingsPane"; +import { AccountSettingsPane } from "./panes/AccountSettingsPane"; +import { VideoSettingsPane } from "./panes/VideoSettingsPane"; interface SettingsModalProps { isOpen: boolean; onClose: () => void; } -interface AccountInfo { - username: string; - subscription: string; - credits: number; -} - type SettingsSection = "misc" | "audio" | "accounts" | "video" | "image"; export const SettingsModal = ({ isOpen, onClose }: SettingsModalProps) => { - const [accountInfo] = useState({ - username: "Username [logout]", - subscription: "Pro-tier [change/upgrade]", - credits: 10233, - }); - const [selectedSection, setSelectedSection] = useState("misc"); - const [palApiKey, setPalApiKey] = useState(""); - const [klingApiKey, setKlingApiKey] = useState(""); - const [defaultVideoModel, setDefaultVideoModel] = useState("veo"); - const [humanVideoProvider, setHumanVideoProvider] = useState("artcraft"); - const sections = [ { id: "audio" as const, label: "Audio", icon: faVolumeHigh }, { id: "misc" as const, label: "Misc", icon: faCog }, @@ -58,117 +40,13 @@ export const SettingsModal = ({ isOpen, onClose }: SettingsModalProps) => { case "misc": return ; case "accounts": - return ( -
-
- ArtCraft Account: - {accountInfo.username} -
-
- ArtCraft Subscription: - {accountInfo.subscription} -
-
- Credits Remaining: - {accountInfo.credits} -
- -
-

- Note: You can optionally log into other accounts and use your - credits at those providers. Some features are only available via - 3rd party accounts, such as OpenAI / Sora GPT 4.0 Images. For - other features, ArtCraft credits are consumed unless you log - into your third party account. -

-
- -
- OpenAI / Sora Account: - -
-
- Google / Veo Account: - -
- -
-
- - setPalApiKey((e.target as any).value)} - placeholder="Enter API Key" - /> -
-
- - setKlingApiKey((e.target as any).value)} - placeholder="Enter API Key" - /> -
-
-
- ); - + return ; case "video": - return ( -
-
- - - setHumanVideoProvider(val as string) - } - options={[ - { value: "artcraft", label: "ArtCraft" }, - { value: "pal", label: "Pal" }, - ]} - /> -
-
- ); - + return ; case "image": return (
- +
); }