Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
243952e
1
Parent(s):
299bd34
up
Browse files
src/app/main.tsx
CHANGED
@@ -24,6 +24,9 @@ import { useIO } from "@/services/io/useIO"
|
|
24 |
import { ChatView } from "@/components/assistant/ChatView"
|
25 |
import { ScriptEditor } from "@/components/editor/ScriptEditor"
|
26 |
import { useSearchParams } from "next/navigation"
|
|
|
|
|
|
|
27 |
|
28 |
type DroppableThing = { files: File[] }
|
29 |
|
@@ -95,7 +98,7 @@ function MainContent() {
|
|
95 |
minSize={showTimeline ? 100 : 1}
|
96 |
maxSize={showTimeline ? 1600 : 1}
|
97 |
>
|
98 |
-
<
|
99 |
</ReflexElement>
|
100 |
<ReflexSplitter />
|
101 |
<ReflexElement
|
|
|
24 |
import { ChatView } from "@/components/assistant/ChatView"
|
25 |
import { ScriptEditor } from "@/components/editor/ScriptEditor"
|
26 |
import { useSearchParams } from "next/navigation"
|
27 |
+
import EditorMenu from "@/components/toolbars/editor-menu/EditorSideMenu"
|
28 |
+
import EditorSideMenu from "@/components/toolbars/editor-menu/EditorSideMenu"
|
29 |
+
import { Editor } from "@/components/editor/Editor"
|
30 |
|
31 |
type DroppableThing = { files: File[] }
|
32 |
|
|
|
98 |
minSize={showTimeline ? 100 : 1}
|
99 |
maxSize={showTimeline ? 1600 : 1}
|
100 |
>
|
101 |
+
<Editor />
|
102 |
</ReflexElement>
|
103 |
<ReflexSplitter />
|
104 |
<ReflexElement
|
src/components/editor/Editor.tsx
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { EditorView } from "@aitube/clapper-services"
|
2 |
+
|
3 |
+
import { useEditor } from "@/services"
|
4 |
+
|
5 |
+
import EditorSideMenu from "../toolbars/editor-menu/EditorSideMenu"
|
6 |
+
|
7 |
+
import { ScriptEditor } from "./ScriptEditor"
|
8 |
+
|
9 |
+
export function Editor() {
|
10 |
+
const view = useEditor(s => s.view)
|
11 |
+
|
12 |
+
return <ScriptEditor />
|
13 |
+
/*
|
14 |
+
this doesn't work yet:
|
15 |
+
return (
|
16 |
+
<div className="flex flex-row flex-grow w-full overflow-hidden">
|
17 |
+
<EditorSideMenu />
|
18 |
+
<div className="flex flex-row flex-grow w-full overflow-hidden">
|
19 |
+
{view === EditorView.SCRIPT
|
20 |
+
? <ScriptEditor />
|
21 |
+
: view === EditorView.PROJECT
|
22 |
+
? <div>TODO</div>
|
23 |
+
: <div>TODO</div>}
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
)
|
27 |
+
*/
|
28 |
+
}
|
src/components/toolbars/editor-menu/EditorSideMenu.tsx
CHANGED
@@ -7,12 +7,18 @@ import { LuClapperboard } from "react-icons/lu"
|
|
7 |
import { useEditor } from "@/services/editor/useEditor"
|
8 |
import { EditorSideMenuItem } from "./EditorSideMenuItem"
|
9 |
import { EditorView } from "@aitube/clapper-services"
|
|
|
10 |
|
11 |
-
export default function
|
|
|
12 |
return (
|
13 |
|
14 |
-
<div className="flex flex-col w-14 h-full items-center justify-between border-r
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
|
17 |
<EditorSideMenuItem view={EditorView.PROJECT}><LuClapperboard /></EditorSideMenuItem>
|
18 |
<EditorSideMenuItem view={EditorView.SCRIPT} label="Script editor"><MdOutlineHistoryEdu /></EditorSideMenuItem>
|
|
|
7 |
import { useEditor } from "@/services/editor/useEditor"
|
8 |
import { EditorSideMenuItem } from "./EditorSideMenuItem"
|
9 |
import { EditorView } from "@aitube/clapper-services"
|
10 |
+
import { useTheme } from "@/services/ui/useTheme"
|
11 |
|
12 |
+
export default function EditorSideMenu() {
|
13 |
+
const theme = useTheme()
|
14 |
return (
|
15 |
|
16 |
+
<div className="flex flex-col w-14 h-full items-center justify-between border-r"
|
17 |
+
style={{
|
18 |
+
borderRightColor: theme.defaultTextColor || "#eeeeee"
|
19 |
+
}}
|
20 |
+
>
|
21 |
+
<div className="flex flex-col h-full w-full items-center">
|
22 |
|
23 |
<EditorSideMenuItem view={EditorView.PROJECT}><LuClapperboard /></EditorSideMenuItem>
|
24 |
<EditorSideMenuItem view={EditorView.SCRIPT} label="Script editor"><MdOutlineHistoryEdu /></EditorSideMenuItem>
|
src/components/toolbars/editor-menu/EditorSideMenuItem.tsx
CHANGED
@@ -5,6 +5,7 @@ import { cn } from "@/lib/utils"
|
|
5 |
|
6 |
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
|
7 |
import { useEditor } from "@/services/editor/useEditor"
|
|
|
8 |
|
9 |
export function EditorSideMenuItem({
|
10 |
children,
|
@@ -29,6 +30,7 @@ export function EditorSideMenuItem({
|
|
29 |
*/
|
30 |
unmanaged?: boolean
|
31 |
}) {
|
|
|
32 |
const view = useEditor(s => s.view)
|
33 |
const setView = useEditor(s => s.setView)
|
34 |
|
@@ -59,10 +61,14 @@ export function EditorSideMenuItem({
|
|
59 |
unmanaged || isActive ? '' : `cursor-pointer`,
|
60 |
`border-l-[3px]`,
|
61 |
isActive
|
62 |
-
? '
|
63 |
-
: '
|
64 |
`group`
|
65 |
)}
|
|
|
|
|
|
|
|
|
66 |
onClick={handleClick}>
|
67 |
<div className={cn(
|
68 |
`flex-col items-center justify-center`,
|
|
|
5 |
|
6 |
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
|
7 |
import { useEditor } from "@/services/editor/useEditor"
|
8 |
+
import { useTheme } from "@/services/ui/useTheme"
|
9 |
|
10 |
export function EditorSideMenuItem({
|
11 |
children,
|
|
|
30 |
*/
|
31 |
unmanaged?: boolean
|
32 |
}) {
|
33 |
+
const theme = useTheme()
|
34 |
const view = useEditor(s => s.view)
|
35 |
const setView = useEditor(s => s.setView)
|
36 |
|
|
|
61 |
unmanaged || isActive ? '' : `cursor-pointer`,
|
62 |
`border-l-[3px]`,
|
63 |
isActive
|
64 |
+
? ' text-gray-50 fill-gray-50 hover:text-gray-50 hover:fill-gray-50'
|
65 |
+
: ' text-gray-400 fill-gray-400 hover:text-gray-200 hover:tefillxt-gray-200',
|
66 |
`group`
|
67 |
)}
|
68 |
+
style={{
|
69 |
+
background: theme.editorBgColor || "#eeeeee",
|
70 |
+
borderColor: isActive ? theme.defaultPrimaryColor || "#ffffff" : "#111827"
|
71 |
+
}}
|
72 |
onClick={handleClick}>
|
73 |
<div className={cn(
|
74 |
`flex-col items-center justify-center`,
|
src/lib/core/constants.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
export const HARD_LIMIT_NB_MAX_ASSETS_TO_GENERATE_IN_PARALLEL = 32
|
5 |
|
6 |
export const APP_NAME = "Clapper.app"
|
7 |
-
export const APP_REVISION = "r20240626-
|
8 |
|
9 |
export const APP_DOMAIN = "Clapper.app"
|
10 |
export const APP_LINK = "https://clapper.app"
|
|
|
4 |
export const HARD_LIMIT_NB_MAX_ASSETS_TO_GENERATE_IN_PARALLEL = 32
|
5 |
|
6 |
export const APP_NAME = "Clapper.app"
|
7 |
+
export const APP_REVISION = "r20240626-2017"
|
8 |
|
9 |
export const APP_DOMAIN = "Clapper.app"
|
10 |
export const APP_LINK = "https://clapper.app"
|